ID: 21236
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 4.3.0
New Comment:
Definately optimizer bug. You need to report that to Zend..
Previous Comments:
------------------------------------------------------------------------
[2003-01-21 01:58:38] [EMAIL PROTECTED]
Aha!
Trying it with the CLI inspired me. I tried it myself and still had
problems, but that eliminated apache2 as the problem. Then I realized
I had Zend Optimizer enabled and that proved to be the problem
-disabling Optimizer makes it work properly. I guess that makes a
certain amount of sense.
Do you have any idea if that would be considered a bug in Optimizer or
if it's just an unavoidable problem?
------------------------------------------------------------------------
[2003-01-21 00:27:21] [EMAIL PROTECTED]
This worked for me with both PHP/CLI and under Apache2 just fine..
How did you configure PHP and Apache2?
What MPM is Apache2 running as?
Which Apache2 version?
------------------------------------------------------------------------
[2003-01-20 21:36:19] [EMAIL PROTECTED]
Ok... you need 2 files.
--------------file1.php-----------------------
<?php
require 'file2.php';
function f2($param) {
f3($param);
}
function f1($param) {
f2($param);
}
f1('foo');
?>
----------end file1.php---------------
----------file2.php---------------
<?php
function f3($param) {
echo '<table border="1">';
$backtrace = debug_backtrace();
foreach ( $backtrace as $frame ) {
echo
"<tr><td>$frame[file]</td><td>$frame[line]</td><td>$frame[function]</td><td>";
print_r($frame['args']);
echo "</td></tr>\n";
}
echo '</table>';
}
?>
-------------end file2.php---------------
On my server (apache2, php4.3) I get:
/home/julian/public_html/file1.php 5 f3 Array ( [0] => foo )
/home/julian/public_html/file1.php 9 f2
/home/julian/public_html/file1.php 12 f1
But on my friend's server (apache1.3, php4.3) - though there are surely
plenty of other differences as well - I get:
/web/sites/Julian/docs/file1.php 5 f3 Array ( [0] => foo )
/web/sites/Julian/docs/file1.php 9 f2 Array ( [0] => foo )
/web/sites/Julian/docs/file1.php 12 f1 Array ( [0] => foo )
------------------------------------------------------------------------
[2003-01-20 21:02:27] [EMAIL PROTECTED]
Please add a short example script which shows the problem
clearly.
------------------------------------------------------------------------
[2003-01-20 18:31:47] [EMAIL PROTECTED]
A friend tried this and doesn't seem to see the problem. The main
difference is that he is testing with Apache 1.3 whereas I was testing
with Apache 2... perhaps that is the key somehow? I will try to test
it myself when I have time but I thought it might click for someone so
I'm noting it now.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/21236
--
Edit this bug report at http://bugs.php.net/?id=21236&edit=1