#37064 [Opn->Fbk]: mod_ext_filter causes a filtered php page to hang with calls to eval()
| From: | tony2001@php.net | Date: | Tue, 20 Jun 2006 15:14:00 +0000 |
| Subject: | #37064 [Opn->Fbk]: 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-98581@lists.php.net to get a copy of this message | ||
ID: 37064
Updated by: tony2001@php.net
Reported By: jason at merchant dot to
-Status: Open
+Status: Feedback
Bug Type: Apache2 related
Operating System: Windows XP
PHP Version: 5.1.2
New Comment:
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
Previous Comments:
------------------------------------------------------------------------
[2006-04-13 19:13:54] jason at merchant dot to
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.
------------------------------------------------------------------------
[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