#48907 [Fbk->Opn]: Apache restarts due to a regular expression
ID: 48907
User updated by: sworddragon2 at aol dot com
Reported By: sworddragon2 at aol dot com
-Status: Feedback
+Status: Open
Bug Type: PCRE related
Operating System: Windows XP Professional SP3
PHP Version: 5.3.0
New Comment:
I'm using PHP 5.3.0 x86 VC6 Thread Safe. I have installed PHP 5.2.10
and can reproduce it too. After this i have installed PHP 5.3.0 again
without any extensions and have used a standard php.ini and httpd.conf
(just the entry from the PHP installer is written).
I have cleared the error.log from Apache and after executing the
reproduce code the log says:
[Thu Jul 16 02:40:03 2009] [notice] Parent: child process exited with
status 3221225477 -- Restarting.
httpd.exe: Could not reliably determine the server's fully qualified
domain name, using 192.168.1.2 for ServerName
[Thu Jul 16 02:40:03 2009] [notice] Apache/2.2.11 (Win32) PHP/5.3.0
configured -- resuming normal operations
[Thu Jul 16 02:40:03 2009] [notice] Server built: Dec 10 2008 00:10:06
[Thu Jul 16 02:40:03 2009] [notice] Parent: Created child process 3196
httpd.exe: Could not reliably determine the server's fully qualified
domain name, using 192.168.1.2 for ServerName
httpd.exe: Could not reliably determine the server's fully qualified
domain name, using 192.168.1.2 for ServerName
[Thu Jul 16 02:40:03 2009] [notice] Child 3196: Child process is
running
[Thu Jul 16 02:40:03 2009] [notice] Child 3196: Acquired the start
mutex.
[Thu Jul 16 02:40:03 2009] [notice] Child 3196: Starting 64 worker
threads.
[Thu Jul 16 02:40:03 2009] [notice] Child 3196: Starting thread to
listen on port 80.
But i figured out another thing. If I'm changing the pattern from
'#a((?:.|\n)*?)a#' to '#a((?:\n|.)*?)a#' all works fine. Oddly seems
that Avira AntiVir Personal with the definition file from the last days
and today says after saving the reproduce code that the file is a
heuristic found HEUR/HTML.Malware.
Previous Comments:
------------------------------------------------------------------------
[2009-07-15 12:08:40] jani@php.net
Exactly what PHP version are you using? This works fine on both 5.2.10
and 5.3.0 for me..
------------------------------------------------------------------------
[2009-07-13 19:35:00] sworddragon2 at aol dot com
Description:
------------
I found a regular expression with which i can restart the apache
service with the notification: [notice] Parent: child process exited
with status 3221225477 -- Restarting. I'm using Apache 2.2.11.
Reproduce code:
---------------
<?php
preg_replace('#a((?:.|\n)*?)a#','a$1a','a11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111a');
?>
Expected result:
----------------
I expected that preg_replace() repaces the string.
Actual result:
--------------
Apache restarts with the above message an Firefox 3.5 tells me that the
connection to the server was recessed.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48907&edit=1
Thread (6 messages)