php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31108 Upgrading to PHP 4.3.10 brakes several applications
Submitted: 2004-12-16 03:22 UTC Modified: 2004-12-16 12:27 UTC
Votes:2
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: pierre at zenutech dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.3.10 OS: Red Hat 9 - Linux
Private report: No CVE-ID:
 [2004-12-16 03:22 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-16 07:42 UTC] 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 09:28 UTC] derick@php.net
So, does it work if you remove (or upgradE) the Zend Optimizer?
 [2004-12-16 09:33 UTC] 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:49 UTC] baroiller at daoditu dot com
fixed! :)

just upgrade ZendOptimizer to last version, and it'll work.
 [2004-12-16 10:08 UTC] derick@php.net
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!
 [2004-12-16 12:27 UTC] pierre at zenutech dot com
Thank you for helping find a solution to this problem. Any chance we could add a small message next to the php download saying that if you use Zend Optimizer, you need latest version to work with this new php?  I'm sure it would help the public right?
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Wed Apr 23 14:02:33 2014 UTC