Could x10 upgrade PHP to 5.3?

welch

New Member
Messages
18
Reaction score
0
Points
0
At the current version (5.2.6), the function strstr() doesn't allow me to use the optional true or false statement to read strings as I do in some of my scripts and would be very beneficial. Just curious as to see if this might happen or if I'll need to work around it.

Thanks!
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
It probably does, however an administrator may have disabled it for securty reasons
 
T

themasterrocker

Guest
You need to upgrade you're PHP to intermediate via the Account Management Panel which can be found here. www.x10hosting.com/login at the bottom click intermediate PHP and explain why you need it.
 

welch

New Member
Messages
18
Reaction score
0
Points
0
I am already at the Intermediate level of PHP access :\

I get the error that I'm using too many parameters for strstr() and I've already done a lot of work to make sure it is not my error.

I'm using it like this:

if (strstr($data, "://", true) == "http") { /* code */ }

to check if the string "$data" is a URL that starts with http and it won't allow me to use that last true/false statement that, in the PHP manual, says is there as of version 5.3.0.

(The value "true" should make it so it gets the string before the occurrence of "://")

Thanks for the help thus far! This is quite the hassle currently as I'm building a lot of code on this particular function.

EDIT: http://us.php.net/manual/en/function.strstr.php is the location of strstr() in the PHP manual where this is mentioned. Apologies for the lack of thoroughness in the original post.
 
Last edited:

AttackBunnyPro

New Member
Messages
26
Reaction score
0
Points
0
Welch is correct; the third parameter was added in 5.3.0. Thus, one can't use it unless x10 upgrades
 

welch

New Member
Messages
18
Reaction score
0
Points
0
Even though this particular function still will not work as desired, I have since replaced this with the strpos() function to check for an occurrence of "http://" and check if the value is not false.

However, a lot of updates have been done in version 5.3.x so I'd still recommend the update if at all possible.

Thanks,
GrapeJuice
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
I will ask an admin for you when it is gonna be installed. I myself had no idea php 5.3 was out lol :D.

Ok I have an answer:

Since php 5.3 is in Alpha1 stage it would be unsecure to install on a live environement. Alpha releases is only made for personal testing purposes only.

When php 5.3 gets final, it needs to get beta first too, then they gonna think about updating it.
The normal way a software is released is Alpha>Beta>RC>Final
 
Last edited:

welch

New Member
Messages
18
Reaction score
0
Points
0
ahhh I see. My mistake! I had thought it to be a final release to be documented so quickly!

Thanks for the review of my issue though this has been more helpful than I thought it would be. I'll definitely hang around and try to help people out on the forums.
 
Top