ID: 26771 Comment by: fredrik at demomusic dot nu Reported By: info at tphnet dot com Status: Verified Bug Type: Apache2 related Operating System: * (ZTS only!) PHP Version: 5CVS, 4CVS (2005-06-17) New Comment:
What is with the "* (ZTS only!)"? Does it stand for Zend Thread Safety?? I am not familiar with ZTS, but shouldn't this be marked as an Windows-issue? It certainly should, is my opinion. As it works nicely when running PHP as CGI, same compile-options, same php.ini, I don't see how this could be a Zend Engine-problem... It is clearly a Windows Apache+PHP as module combination problem. Please update this report. Previous Comments: ------------------------------------------------------------------------ [2005-08-10 12:54:14] fredrik at demomusic dot nu Previous bug-reports that address the exact same issue are as follows: 29 May 2004 - #28567 (Status: Bogus) Ticks crash Apache SAPI (http://bugs.php.net/bug.php?id=28567) [solace at ezmail dot ru] 28 Jan 2002 - #15267 (Status: Closed) "declare" makes apacke crashes under Windows (http://bugs.php.net/bug.php?id=) [ferguson at becon dot org] 16 May 2002 - #17283 (Status:No Feedback) register_tick_function(); [sendidmax at yahoo dot com dot cn] 18 Nov 2002 - #20486 (Status: No Feedback) register_tick_function crashes apache [junkie at overdoos dot org] 4 Aug 2004 - #29519 (Status: No Feedback) PHP5.0.0 call to declare(ticks=1) crashes apache 1.3.31 [peter dot belt at gmail dot com] Here is a short summary of those reports as well as extra info (my own). The above mentioned should be marked as Duplicates or such, and this report (#26771) should be the official bug-report of this particular problem. Please prioritize this problem, PHP-developers, as it has existed in release after release, year after year, regardless of Apache-version! Systems reported having this problem: Windows Unspec. - PHP 4.3.6 - Apache Unspec. Windows 2000 - PHP 4.0.6 - Apache 1.3.20 Windows 2000 - PHP 4.1.1 - Apache 1.3.22 Windows 2000 - PHP 4.2.3 - Apache 1.3.22 Windows XP Pro - PHP 4.2.2 - Apache Unspec. Windows Unspec. - PHP 4.2.4-dev - Apache Unspec. Windows 2000 - PHP 4.2.1 - Apache 1.3.24 Windows Unspec. - PHP 4.3.4 - Apache 2.0.48 Windows 2000 - PHP 4.2.2 - Apache 1.3.22 Windows 2000 - PHP 4.2.3 - Apache 1.3.22 Windows 2000 - PHP 4.4.0-dev - Apache 1.3.22 Windows 2000 - PHP 4.4.0-dev - Apache 2.0.43 Windows XP - PHP 5.0.0b3 - Apache 2.0.48 Windows Unspec. - PHP 5.0.0 - Apache 1.3.31 Windows XP Pro - PHP 5.0.4 - Apache 2.0.50 Windows XP Pro - PHP 5.0.4 - Apache 2.0.54 (The latest stable versions as of this comment) Variant: Windows 2000 - PHP 4.0.6 - Apache 1.3.22 - No crash, but internal server error Probably a bug with php4apache2.dll and php5apache2.dll, ey? ------------------------------------------------------------------------ [2005-08-10 12:52:43] fredrik at demomusic dot nu It seems to be the "declare(ticks=1);" that causes the crash. Some have reported that it does not crash when the reg-function is commented out (I am one of those). Although it could also be the combination of register_tick_function() and declare(ticks=1). Apache log when crashing: [Sat Jan 03 01:11:04 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Sat Jan 03 01:11:04 2004] [notice] Parent: Created child process 3036 [Sat Jan 03 01:11:04 2004] [notice] Child 3036: Child process is running [Sat Jan 03 01:11:04 2004] [notice] Child 3036: Acquired the start mutex. [Sat Jan 03 01:11:04 2004] [notice] Child 3036: Starting 250 worker threads. When apache crashes, it comes up with the standard XP error reporting window. The data it wants to send to Microsoft includes the following: <?xml version="1.0" encoding="UTF-16"?> <DATABASE> <EXE NAME="Apache.exe" FILTER="GRABMI_FILTER_PRIVACY"> <MATCHING_FILE NAME="Apache.exe" SIZE="20545" CHECKSUM="0xD47235F3" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="05/11/2004 17:03:35" UPTO_LINK_DATE="05/11/2004 17:03:35" /> <MATCHING_FILE NAME="ApacheCore.dll" SIZE="331845" CHECKSUM="0x59DF3602" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="05/11/2004 17:03:34" UPTO_LINK_DATE="05/11/2004 17:03:34" /> <MATCHING_FILE NAME="Win9xConHook.dll" SIZE="20560" CHECKSUM="0x252AB831" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="05/11/2004 17:02:44" UPTO_LINK_DATE="05/11/2004 17:02:44" /> <MATCHING_FILE NAME="xmlparse.dll" SIZE="36946" CHECKSUM="0xE27B203F" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="05/11/2004 17:03:08" UPTO_LINK_DATE="05/11/2004 17:03:08" /> <MATCHING_FILE NAME="xmltok.dll" SIZE="73808" CHECKSUM="0x2B9F157F" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="05/11/2004 17:03:07" UPTO_LINK_DATE="05/11/2004 17:03:07" /> <MATCHING_FILE NAME="bin\htdigest.exe" SIZE="20555" CHECKSUM="0x3EE134D3" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="05/11/2004 17:03:02" UPTO_LINK_DATE="05/11/2004 17:03:02" /> <MATCHING_FILE NAME="bin\htpasswd.exe" SIZE="36939" CHECKSUM="0xD7F4A01C" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="05/11/2004 17:03:01" UPTO_LINK_DATE="05/11/2004 17:03:01" /> <MATCHING_FILE NAME="bin\logresolve.exe" SIZE="16461" CHECKSUM="0xCEEDE9C6" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="05/11/2004 17:03:02" UPTO_LINK_DATE="05/11/2004 17:03:02" /> <MATCHING_FILE NAME="bin\rotatelogs.exe" SIZE="24653" CHECKSUM="0x90CD346A" MODULE_TYPE="WIN32" PE_CHECKSUM="0x0" LINKER_VERSION="0x0" LINK_DATE="05/11/2004 17:03:05" UPTO_LINK_DATE="05/11/2004 17:03:05" /> </EXE> <EXE NAME="kernel32.dll" FILTER="GRABMI_FILTER_THISFILEONLY"> <MATCHING_FILE NAME="kernel32.dll" SIZE="930304" CHECKSUM="0xCBCCF8A9" BIN_FILE_VERSION="5.1.2600.1106" BIN_PRODUCT_VERSION="5.1.2600.1106" PRODUCT_VERSION="5.1.2600.1106" FILE_DESCRIPTION="Windows NT BASE API Client DLL" COMPANY_NAME="Microsoft Corporation" PRODUCT_NAME="Microsoft® Windows® Operating System" FILE_VERSION="5.1.2600.1106 (xpsp1.020828-1920)" ORIGINAL_FILENAME="kernel32" INTERNAL_NAME="kernel32" LEGAL_COPYRIGHT="© Microsoft Corporation. All rights reserved." VERFILEDATEHI="0x0" VERFILEDATELO="0x0" VERFILEOS="0x40004" VERFILETYPE="0x2" MODULE_TYPE="WIN32" PE_CHECKSUM="0xE7ED3" LINKER_VERSION="0x50001" UPTO_BIN_FILE_VERSION="5.1.2600.1106" UPTO_BIN_PRODUCT_VERSION="5.1.2600.1106" LINK_DATE="08/29/2002 10:40:40" UPTO_LINK_DATE="08/29/2002 10:40:40" VER_LANGUAGE="English (United States) [0x409]" /> </EXE> </DATABASE> Hope this helps resolve the matter more quickly! ------------------------------------------------------------------------ [2004-01-02 19:23:33] info at tphnet dot com Description: ------------ While searching the bug database I found some similar problems, but all were suspended. I wasn't sure if it was useful to reply to one of those (Most recent one: http://bugs.php.net/bug.php?id=26286). Well anyways, here goes: The problem is very simple. I just copy and paste the 'tick' example from the php manual into a new php file an try to execute it on my apache2 server. The apache child process crashes, restarts, crashes, restarts and eventually just stops restarting. When I comment out the line 'register_tick_function', everyting works just fine. Also, when I start the file from the CLI version of PHP it is executed without any problems. I'm using PHP 4.3.4 and Apache 2.0.48 (in conjunction with php4apache2.dll). Reproduce code: --------------- http://nl.php.net/manual/en/control-structures.declare.php See Example 11-1 Actual result: -------------- [Sat Jan 03 01:11:04 2004] [notice] Parent: child process exited with status 3221225477 -- Restarting. [Sat Jan 03 01:11:04 2004] [notice] Parent: Created child process 3036 [Sat Jan 03 01:11:04 2004] [notice] Child 3036: Child process is running [Sat Jan 03 01:11:04 2004] [notice] Child 3036: Acquired the start mutex. [Sat Jan 03 01:11:04 2004] [notice] Child 3036: Starting 250 worker threads. Small snippit from my apache2 error.log. It's filled with the above lines, the status code is the same for every restart. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=26771&edit=1
