臭名昭著的Apache错误“父:子进程退出,状态为3221225477”


The infamous Apache error "Parent: child process exited with status 3221225477"

我已经阅读了一些与臭名昭著的Apache错误相关的问题和回答

Apache error [notice] Parent: child process exited with status 3221225477 — Restarting

但是到目前为止没有什么可以帮助我。我想问你的是,如果我使用Linux版本,脚本会因为同样的原因导致Apache崩溃吗?

顺便说一下,如果有人对我的情况有任何建议,这里是Apache的error.log

[Mon Aug 08 14:31:44 2011] [notice] Parent: child process exited with status 3221225477 -- Restarting.
[Mon Aug 08 14:31:44 2011] [crit] (22)Invalid argument: unable to replace stderr with error_log
[Mon Aug 08 14:31:44 2011] [crit] (2)No such file or directory: unable to replace stderr with /dev/null
[Mon Aug 08 14:31:44 2011] [notice] Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8c mod_autoindex_color PHP/5.1.6 configured -- resuming normal operations
[Mon Aug 08 14:31:44 2011] [notice] Server built: Aug 13 2006 19:16:43
[Mon Aug 08 14:31:44 2011] [notice] Parent: Created child process 4364
[Mon Aug 08 14:31:45 2011] [notice] Child 4364: Child process is running
[Mon Aug 08 14:31:45 2011] [notice] Child 4364: Acquired the start mutex.
[Mon Aug 08 14:31:45 2011] [notice] Child 4364: Starting 250 worker threads.
[Mon Aug 08 14:31:45 2011] [notice] Child 4364: Starting thread to listen on port 8088.
[Mon Aug 08 14:31:45 2011] [notice] Child 4364: Starting thread to listen on port 8086.

我不明白为什么在文件系统中移动库可以解决大多数问题,而相关问题中关于移动库的所有建议对我来说都不起作用。

我正在运行PHP 5.1.6的旧XAMPP版本(XAMPP for Windows 1.5.4),并使用Doctrine ORM(是的,我知道Doctrine需要PHP 5.2.3+)。

我刚刚在WAMP安装上遇到了同样的问题。我把它追溯到我自己的一段垃圾代码。我有一个方法调用它自己。

下面是一个例子:-

 <?php
echo "Welcome to stupid class!";
class stupid_class {
    public $example_data;
    function stupid_function($Data) {
        self::stupid_function($Data);
        if($Data=="Hello") return true;
        else die("Incorrect data passed through.".$Data."<br />");
    }
}
$myClass = new stupid_class();
$myvalue = $myClass->stupid_function("Hello");
?>

我知道这不是一个理想的代码示例,(它实际上是一个打字错误),但我希望在获得"连接被重置"消息之前会抛出一些错误。

所以我想答案是,检查你所有的方法,以确保你没有无限调用一个。

我希望这能帮助大家弄清楚为什么在PHP, Apache中会发生这种情况。

欢呼

t

在我的情况下,它是php扩展APC (php_apc.dll, 3.1.10-5.4-vc9-x86, threadsafe),这导致了错误。

我使用XAMPP 1.8.2与PHP 5.4.19和Apache 2.4.4

由于它也可能是由另一个扩展引起的,因此从xampp发行版恢复原始php.ini可能是一个很好的起点。如果这个可以很好地工作,尝试逐行更改它到您想要的配置(从扩展列表开始)。