4images Forum & Community
4images Issues / Ausgaben => Feedback & Suggestions => Topic started by: stubentigger on April 30, 2005, 07:32:42 PM
-
Starting from PHP Version 4.3.10 with Zend Optimizer there seems to be an issue with nearly all versions of 4images:
As you can read here (http://www.php.net/ChangeLog-4.php), here (http://www.php.net/foreach) and here (http://bugs.php.net/bug.php?id=30914), there are some changes to the foreach-construct
foreach($Array as $Value) doesn't work anymore.
Sure, from another point of view, it works, but returns always an indexed array with the key-value and the data inside the current array-Item, so that all further operations fail because they do not get their expected data.
A work-around is to switch to "foreach ($Array as $Key => $Value)" or using "while (list(, $Value) = each($Array))". Both solutions require a huge amount of nasty work (belive me, I did it already :D)... From my point of view its an essential bug and needs to be fixed soon, but on the other hand there are not so many people out there using Zend Optimizer combined with your scripts ;)
Beside the fact that I already fixed this issue once, I'm not involved into that problem - I'm only doing some small hosting (that's where I noticed this problem here) but my business is ASP (that's why there is Zend Optimizer on my servers)
-
actualy its not 4images that should be fixed, its Zend Optimizer that should be updated.
Yeah, we saw that error for a while before the forum was hacked. It actually turned out to be a bug in the Zend Optimizer and upgrading to the latest patch cured the problem. Details are here:
http://www.zend.com/store/products/zend-optimizer.php
Due to incompatibility of the previous version of Zend Optimizer with PHP 4.3.10, it is strongly recommended that owners of Zend Performance Suite, Zend Accelerator, Zend Studio Server, and Zend WinEnabler, upgrade to Zend Optimizer 2.5.7.
It is also recommended you upgrade to PHP 4.3.10 or PHP 5.0.3.
http://bugs.php.net/bug.php?id=31108
-
actualy its not 4images that should be fixed, its Zend Optimizer that should be updated.
Ups... Sorry for that fault ;)
But for those ones who are not able to update their Zend Optimizers (because of shared hosting, etc.) I have made my patch available here (http://blaaa.tiggerswelt.net/4images.diff).
I don't understand why I hadn't this idea earlier - sometimes the simplest solution is the hardest to recognize :D
I'll upgrade my Zend Optimizer immediatly :D
-
Even if they have shared hosting, they should simply contact their hosting provider and have them apply the Zend patch. I don't know of a single hosting provider who would refuse to fix their system if it was brought to their attention that there was this kind of problem