Click to See Complete Forum and Search --> : Don't upgrade from 4.3.9 to 4.3.10 !!!!


minorgod
12-16-2004, 05:09 PM
I recently upgraded PHP on my server from 4.3.9 to 4.3.10. Damn was that a mistake. Suddenly half my scripts stopped working correctly, warnings were being thrown from preg_match function calls as well as "invalid offset" errors reported by my users within a few minutes of upgrading. I switched back to 4.3.9 and all problems went away. So upgrade with extreme caution unless you know how to revert back when it screws up your scripts.

tsinka
12-17-2004, 03:04 AM
Hi,

weird ... can you post some example code ? I've tested php 4.3.10 a little bit and didn't have any problems so I'd be interested in reproducing some of the problems.

Thomas

MarkR
12-18-2004, 09:40 AM
I tried 4.3.10 on my dev box, and it crashes on every page of my app.

It appears that the PEAR libraries I'm using crash it with 100% reliability.

Don't use it.

Mark

PickledOnion
12-18-2004, 02:58 PM
A lot of people have been reporting this problem but, as far as I can see, updating zend optimiser and clearing the cache solved all of them.

Not sure if that will help but, as I say, it seemed to work for everyone else I know who had the same problem.(which isn't that many admittedly!)

It certainly fixed any problems I had and I am now using 10 with no problems at all now.

minorgod
12-18-2004, 03:24 PM
Thanks for the info, I'll give it another try some night when there's no customers on our server.

minorgod
12-18-2004, 03:31 PM
Originally posted by tsinka
Hi,

weird ... can you post some example code ? I've tested php 4.3.10 a little bit and didn't have any problems so I'd be interested in reproducing some of the problems.

Thomas

I looked at the line of code that was causing phplist (phplist.com) to throw a preg_match error on the main user subscription page and I saw no reason for it. preg_match was complaining that it was being given an array as the second parameter, but it wasn't being given an array as the second parameter, so I decided it was a PHP bug and quit looking for additional errors after my users complained about an invalid offset error in php script that I had written. I'm assuming the invalid offset error is happening on either a foreach loop or a for loop. Sorry I can't offer better diagnostics, but I never saw the additional errors myself before I downgraded my PHP version as an emergency solution. There is a possible solution posted above which I will try as soon as possible.

JDcrack
12-19-2004, 04:11 PM
I too had this problem with upgrading from 4.3.9 to 4.3.10

My preg_match arrays returned very strange results.

Here is some sample code:
$string='<a href="http://www.example.com">Some Text</a> <a href="http://www.example2.com">Some Text2</a>';

preg_match_all('/<\\s*a\\s*href="([^\\"]+)"\\s*>([^>]*)<\\/a>/i', $string, $main_array, PREG_SET_ORDER);
foreach($main_array as $main_code){
$url = $main_code[1];
$text = $main_code[2];
echo "$url $text\\n";
}
/*
In Version 4.3.10 it prints:
0
1

In 4.3.9 it prints:
http://www.example.com Some Text
http://www.example2.com Some Text2
*/

JDcrack
12-19-2004, 04:29 PM
I have submitted a bug that you can follow here:



http://bugs.php.net/31187

PickledOnion
12-19-2004, 04:47 PM
displays fine in mine: http://www.example.com Some Text http://www.example2.com Some Text2

Are you sure you cleared the cache (cleared /tmp, etc) and updated any optimizer used?

People are reporting the same sort of thing, until they do that.

JDcrack
12-19-2004, 05:31 PM
Yes, how embarrasing..... I forgot to update Zend to version 2.5.7

Once I updated Zend it fixed the problem.

minorgod
12-19-2004, 05:44 PM
I guess I'm just not that savvy when it comes to upgrading PHP. I'm running on a VPS and am doing the upgrade through Cpanel's "upgrade apache" function. I've never had problems upgrading through Cpanel before and I don't know how to upgrade Zend or clear the cache on my server. I do have SSH access so if someone were to tell me how to do it, I'd be happy to give it a try.

JDcrack
12-19-2004, 05:49 PM
If you are using CPanel, there are instructions for updating zend / php in the Cpanel forums:

http://forums.cpanel.net/showthread.php?t=33247