This topic is locked
[SOLVED]

 split function problem using PHP 5.3.1

12/1/2009 8:05:34 AM
PHPRunner General questions
M
maali author

Hej All
The split() function in the communication.php file is not working any more if you upgrade to PHP 5.3.1 !!!

Dose anybody knwo how to fix this problem?
BR

Maali

J
Jane 12/1/2009

Maali,
please contact support@xlinesoft.com with this problem.

M
maali author 12/1/2009



Maali,
please contact support@xlinesoft.com with this problem.


OK, thanks.

I have created a ticket.

M
maali author 12/1/2009



Maali,
please contact support@xlinesoft.com with this problem.


Hi again
I fixed the problem: I changed the followings:
xtempl.php
from: $varparams = split("",trim(substr($str,$pos+2,$endpos-$pos-2)));

to: $varparams = preg_split("/[\s,]+/",trim(substr($str,$pos+2,$endpos-$pos-2)));
commonfunctions.php
from: $keys = split(" ",$keywords);

to: $keys = preg_split("/[\s,]+/",$keywords);
I am not sure it is what is suppose to split <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=45852&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> but tings are working again.
thanks anyway.

BR

Maali

A
anu 12/1/2009



Hi again
I fixed the problem: I changed the followings:
xtempl.php
from: $varparams = split("",trim(substr($str,$pos+2,$endpos-$pos-2)));

to: $varparams = preg_split("/[\s,]+/",trim(substr($str,$pos+2,$endpos-$pos-2)));
commonfunctions.php
from: $keys = split(" ",$keywords);

to: $keys = preg_split("/[\s,]+/",$keywords);
I am not sure it is what is suppose to split <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=45853&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> but tings are working again.
thanks anyway.

BR

Maali


Hi,
In PHP5.3 split() function is deprecated,so replacing the split() function with explode ()

will solve the problem,I have used it in other examples.
--Anu

H
homer.favenir 1/5/2010



Hi,
In PHP5.3 split() function is deprecated,so replacing the split() function with explode ()

will solve the problem,I have used it in other examples.
--Anu


hi,

is there an easy way to resolve this?

because if you have lots of pages, lists pages, then all of them should be updated. what if, if you need to regenerate the project again.

you will have to go back to all pages that needs to be change again!
anyone knows how?
thanks in advance
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=46673&image=1&table=forumreplies' class='bbc_emoticon' alt=':D' />

J
Jane 1/7/2010

You should update only include/commonfunctions.php file only.

N
Nic 2/4/2010



Hi,
In PHP5.3 split() function is deprecated,so replacing the split() function with explode ()

will solve the problem,I have used it in other examples.
--Anu


Dear

I have this problem :

says your project was built successfully

but when I click View in browser I have this problem
Deprecated: Function split() is deprecated in C:\Programmi\EasyPHP5.3.0\www\DemoProgetto\output\include\phpfunctions.php on line 258
This solution would be acceptable ?
In PHP5.3 split() function is deprecated,so replacing the split() function with explode ()

will solve the problem,I have used it in other examples.
I do not know how to change function to explode

please help me

greeting



yes ok solved with local installation 5.2.0.4566

many thanks

N
Nic 2/4/2010



Hi again
I fixed the problem: I changed the followings:
xtempl.php
from: $varparams = split("",trim(substr($str,$pos+2,$endpos-$pos-2)));

to: $varparams = preg_split("/[\s,]+/",trim(substr($str,$pos+2,$endpos-$pos-2)));
commonfunctions.php
from: $keys = split(" ",$keywords);

to: $keys = preg_split("/[\s,]+/",$keywords);
I am not sure it is what is suppose to split <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=47428&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' /> but tings are working again.
thanks anyway.

BR

Maali


Dear

I have this problem :

says your project was built successfully

but when I click View in browser I have this problem
Deprecated: Function split() is deprecated in C:\Programmi\EasyPHP5.3.0\www\DemoProgetto\output\include\phpfunctions.php on line 258
I want to try your experiment
xtempl.php (I found this line)
from: $varparams = split("",trim(substr($str,$pos+2,$endpos-$pos-2)));

to: $varparams = preg_split("/[\s,]+/",trim(substr($str,$pos+2,$endpos-$pos-2)));
commonfunctions.php
from: $keys = split(" ",$keywords); This line not This line not tell me exact location and number line

to: $keys = preg_split("/[\s,]+/",$keywords);



Sincerely