Apache with PHP 5.1.4 registered as module refuses to stop
Posted: Mon Jul 31, 2006 8:39 pm
I won't go into the details of how I discovered this peculiar behavior, but here's what happens:
I am running Apache with PHP 5.1.4 registered as a SAPI module. I open up cmd.exe and execute Apache.exe -k stop. The script hangs. A while later, I get a "Memory cannot be referenced error." Press OK, and the shutdown finishes, killing all Apache processes. I can now start it up again.
I do not have this trouble when PHP 5.1.4 is registered as CGI. I do not have this trouble on PHP 4.4.2 as SAPI or CGI. I believe this behavior has manifested only recently, before, it was working.
Attempting to stop Apache via the Apache Monitor has similar results (Press stop, webserver stops working, but the monitor continues to claim that Apache is running until a bit later, when the memory cannot be referenced error comes up, and then Apache is reported to be shut down.)
This is the PHP specific configuration in httpd.conf:
With php.conf looking like:
Starting the server has no problems.
Generally, the precursor to this behavior is a svchost process skyrocketing to the sky in terms of CPU and memory usage (I am still unable to determine the trigger condition or the service at fault). Aborting the thread that is causing the CPU problems fixes it, but also causes the Apache process to cease proper functioning.
I will be attempting a reboot and will try to coax this behavior out again. If anyone has experienced something similar, please help!
I am running Apache with PHP 5.1.4 registered as a SAPI module. I open up cmd.exe and execute Apache.exe -k stop. The script hangs. A while later, I get a "Memory cannot be referenced error." Press OK, and the shutdown finishes, killing all Apache processes. I can now start it up again.
I do not have this trouble when PHP 5.1.4 is registered as CGI. I do not have this trouble on PHP 4.4.2 as SAPI or CGI. I believe this behavior has manifested only recently, before, it was working.
Attempting to stop Apache via the Apache Monitor has similar results (Press stop, webserver stops working, but the monitor continues to claim that Apache is running until a bit later, when the memory cannot be referenced error comes up, and then Apache is reported to be shut down.)
This is the PHP specific configuration in httpd.conf:
Code: Select all
SetEnv PHPRC "C:\php\ini_dir\webserver"
Include conf/php.conf
AddType application/x-httpd-php .phpCode: Select all
# 5.1.4 sapi
LoadModule php5_module "C:/php/5.1.4/php5apache2.dll"
PHPIniDir "C:/php/ini_dir/webserver/"
Generally, the precursor to this behavior is a svchost process skyrocketing to the sky in terms of CPU and memory usage (I am still unable to determine the trigger condition or the service at fault). Aborting the thread that is causing the CPU problems fixes it, but also causes the Apache process to cease proper functioning.
I will be attempting a reboot and will try to coax this behavior out again. If anyone has experienced something similar, please help!