#37064 [Fbk->Opn]: mod_ext_filter causes a filtered php page to hang with calls to eval()
| From: | jason at merchant dot to | Date: | Thu, 13 Apr 2006 19:13:54 +0000 |
| Subject: | #37064 [Fbk->Opn]: mod_ext_filter causes a filtered php page to hang with calls to eval() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95767@lists.php.net to get a copy of this message | ||
ID: 37064
User updated by: jason at merchant dot to
Reported By: jason at merchant dot to
-Status: Feedback
+Status: Open
Bug Type: Apache2 related
Operating System: Windows XP
PHP Version: 5.1.2
New Comment:
The link you gave me for the win32 debug packs is broken on
http://snaps.php.net/
It is giving php warnings for all the win32 packages.
Previous Comments:
------------------------------------------------------------------------
[2006-04-13 10:29:36] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
------------------------------------------------------------------------
[2006-04-13 03:51:37] jason at merchant dot to
Description:
------------
I am using Apache2's mod_ext_filter to modify the output filtering of
html and php pages. It works fine on html pages. On php pages with to
many calls to eval(), the filter will cause it to hang until the script
times out. Within the 30 second timeout my filter was only able to
return the first line unmodified.
Reproduce code:
---------------
//******** httpd.conf directives *************/
ExtFilterDefine myfilter mode=output intype=text/html
cmd="C:/php/php.exe C:/myfilter.php"
SetOutputFilter myfilter
/////////////////////////////////////////////////////
//*** C:/myfilter.php(The filter called by php.exe) **/
<?php
$fp = fopen("php://stdin", "r");
while (!feof($fp)) {
echo fgets($fp);
}
fclose($fp);
?>
/////////////////////////////////////////////////////
//******** the php page that will be filtered *******/
// This script was copied from a previous bug report with a similar
issue in php3 here: http://bugs.php.net/bug.php?id=3744
<?php
$b = "";
for ($i = 1; $i < 10000; $i++)
$b .= "b";
echo "b: $b\n";
for ($i = 1; $i < 10000; $i++)
{
echo "i: $i\n"; flush();
eval("\$a = '$b';");
}
?>
/////////////////////////////////////////////////////
Expected result:
----------------
when run with the filter turned off I get the expected echoed
information.
Actual result:
--------------
The script hangs until it reaches the maximum execution time.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37064&edit=1