ID: 31108 Updated by: [EMAIL PROTECTED] Reported By: pierre at zenutech dot com -Status: Feedback +Status: Bogus Bug Type: *General Issues Operating System: Red Hat 9 - Linux PHP Version: 4.3.10 New Comment:
Not a bug in PHP then, but in the Zend Optimizer. In case you encounter this problem, please upgrade to the latest version of the Zend Optimizer! Previous Comments: ------------------------------------------------------------------------ [2004-12-16 09:49:50] baroiller at daoditu dot com fixed! :) just upgrade ZendOptimizer to last version, and it'll work. ------------------------------------------------------------------------ [2004-12-16 09:33:31] baroiller at daoditu dot com I've got the same problem whith foreach. here is an example : $func_key is an array, var_dump($func_key) return this :array(4) { [0]=> string(4) "link" [1]=> string(3) "var" [2]=> string(8) "rubrique" [3]=> string(4) "code" } the code that doens't work : foreach($func_key as $key ) { var_dump($key); // for testing $key content $approved_tags[]="{".$key."\:}"; } and the "bad" result .. what's wrong ??? array(2) { [0]=> string(4) "link" [1]=> int(0) } array(2) { [0]=> string(3) "var" [1]=> int(1) } array(2) { [0]=> string(8) "rubrique" [1]=> int(2) } array(2) { [0]=> string(4) "code" [1]=> int(3) } Before upgrage, $key was filled like this : string(3) "var" string(8) "rubrique" string(4) "code" any idea ? ------------------------------------------------------------------------ [2004-12-16 09:28:41] [EMAIL PROTECTED] So, does it work if you remove (or upgradE) the Zend Optimizer? ------------------------------------------------------------------------ [2004-12-16 07:42:35] php-bugs-041216 at Tech dot FutureQuest dot net Ran into the same problem with 'foreach' during preliminary testing... The solution is to ensure that your ZendOptimizer has been upgraded to a minimum of 2.5.7... -- Terra ------------------------------------------------------------------------ [2004-12-16 03:22:49] pierre at zenutech dot com Description: ------------ Hi, We are running php-4.3.9 with Apache 1.3.33 on red hat 9 linux, kernel 2.4.x (latest version). Upgrading to php-4.3.10 broke several web sites using "postnuke" software, and also broke our webmail application. (and perhaps other things but decided to revert back to avoid frustrating customers) We were using the exact same config (php.ini and apache) between the two versions. In postnuke, we received: Fatal error: Call to undefined function: themeheader() in /home/(userhere)/public_html/header.php on line 206 Now looking at the error log of this user before the upgrade, we see: round-4.gif [Wed Dec 15 17:17:08 2004] [error] [client 156.34.155.69] File does not exist: /home/(userhere)/public_html/themes/CorpBlue/images/backg round-4.gif [Wed Dec 15 17:17:15 2004] [error] [client 24.141.52.184] File does not exist: /home/(userhere)/public_html/themes/CorpBlue/images/backg round-4.gif [Wed Dec 15 17:17:16 2004] [error] [client 209.217.93.107] File does not exist: /home/(userhere)/public_html/themes/CorpBlue/images/back ground-4.gif Now after upgrading to php-4.3.10, we see: [Wed Dec 15 17:17:53 2004] [error] [client 24.222.246.27] File does not exist: /home/(userhere)/public_html/themes//style/styleNN.css [Wed Dec 15 17:17:53 2004] [error] [client 24.222.246.27] File does not exist: /home/(userhere)/public_html/themes//style/style.css [Wed Dec 15 17:17:56 2004] [error] [client 209.217.93.107] File does not exist: /home/(userhere)/public_html/themes//style/styleNN.css As you can see, the "style" variable doesn't seem to get properly defined. At first I thought it was a postnuke (http://www.postnuke.com) bug, but after it also crashed our webmail application v-webmail (http://webmail.zenutech.com), I doubt it would be postnuke's fault. V-webmail doesn't provide stuff in error log, but have found what seems to be causing problems: * Get list of languages. Needs formating * into usable array. */ foreach($LANGUAGES as $key => $value){ $selected = $key == $CONFIG['default_lang'] ? 'selected="selected"' : ''; $languages[] = array('code' => $key, 'desc' => $value, 'selected' => $selected); } appears to return 0 results, whereas in the previous version of php (php-4.3.9), it works fine. I understand that the information I have submitted doesn't give you much to work with, but to be honest with you, it is the most I could find. For now I am obligated to run on 4.3.9 and I cannot provide more info regarding 4.3.10 because I don't really have the flexibility and time of setting up a "test" box. I hope we can find a solution. Regards, Pierre Grandmaison ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31108&edit=1