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

我怕爱的太早我们不能终老 提交于 2019-12-10 15:38:14

问题


I've read some questions and responses related to the infamous Apache error

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

But nothing could help me so far. What I'm asking to you is if I used a Linux version, could the script crash Apache for the same reason?

By the way if anyone has any suggestion for my case here is Apache's 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.

I can't understand why moving dlls around the filesystem solve most problems and all the suggestions in the related questions which were about moving libraries didn't work for me.

I'm running an old XAMPP release with PHP 5.1.6 (XAMPP for Windows 1.5.4) and working with Doctrine ORM (Yes, I'm aware that Doctrine requires PHP 5.2.3+).


回答1:


I've just had this same problem on a WAMP installation. I tracked it down to a bit of my own rubbish code. I had a method calling itself.

Here's an example:-

 <?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");

?>

I know this is hardly an ideal example of great code, (it was actually a typo) but I would have expected there to be some error thrown before getting a 'connection was reset' message.

So I guess an answer would be, check through all your methods to make sure that you're not calling one infinitely.

I hope this helps someone to figure out why this is happening in PHP, Apache.

Cheers

Tee




回答2:


In my case it was the php extension APC (php_apc.dll, 3.1.10-5.4-vc9-x86, threadsafe), which caused the error.

I used XAMPP 1.8.2 with PHP 5.4.19 and Apache 2.4.4

Since it could be caused by another extension as well, it might be a good starting point to restore the original php.ini from the xampp distribution. If this one works well, try to change it line by line to your desired configuration (starting with the extension list).



来源:https://stackoverflow.com/questions/6982581/the-infamous-apache-error-parent-child-process-exited-with-status-3221225477

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!