php Apache 错误 [notice] 父:子进程退出,状态为 3221225477 -- 正在重新启动
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1138269/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Apache error [notice] Parent: child process exited with status 3221225477 -- Restarting
提问by SamH
I'm using PHP5, CodeIgniter and Apache. The localhost php pages were loading fine and then suddenly they started crashing Apache.
我正在使用 PHP5、CodeIgniter 和 Apache。本地主机 php 页面加载良好,然后突然它们开始使 Apache 崩溃。
The web pages seem to get to different stages of loading when apache crashes.
当 apache 崩溃时,网页似乎进入了不同的加载阶段。
The only interesting line in the Apache error log file says :
Apache 错误日志文件中唯一有趣的一行说:
[notice] Parent: child process exited with status 3221225477 -- Restarting.
[注意] 父进程:子进程退出,状态为 3221225477 -- 正在重新启动。
There is a lot of discussion of this issue on the web but it seems there is no one solution, different people have described different solutions that worked for their system.
网络上有很多关于这个问题的讨论,但似乎没有一种解决方案,不同的人描述了适用于他们系统的不同解决方案。
Suggestions Appreciated.
建议赞赏。
采纳答案by SamH
I found a solution that worked for me.
我找到了一个对我有用的解决方案。
I copied the following two files from my PHP directory to the Win32 directory and the errors stopped : php5apache.dll, libmysql.dll.
我将以下两个文件从我的 PHP 目录复制到 Win32 目录,错误停止了:php5apache.dll、libmysql.dll。
So even though these files should have been found in the PHP directory under certain circumstances they needed to be in the system dir
因此,即使在某些情况下这些文件应该在 PHP 目录中找到,它们也需要在系统目录中
回答by Mostafa Rostami
This problem often happens in Windows because of smaller Apache's default stack size. And it usually happens when working with php code that allocates a lot of stacks.
这个问题经常发生在 Windows 中,因为 Apache 的默认堆栈大小较小。它通常发生在使用分配大量堆栈的 php 代码时。
To solve this issue, add the following at the end of apache config file, httpd.conf
要解决此问题,请在 apache 配置文件 httpd.conf 的末尾添加以下内容
<IfModule mpm_winnt_module>
ThreadStackSize 8888888
</IfModule>
AND restart apache. i take this solution from this site.
并重新启动apache。我从这个网站上获取了这个解决方案。
回答by SvenT
In my case it was the php extension APC (php_apc.dll, 3.1.10-5.4-vc9-x86, threadsafe), which caused the error.
就我而言,是 php 扩展 APC(php_apc.dll,3.1.10-5.4-vc9-x86,线程安全)导致了错误。
I used XAMPP 1.8.2 with PHP 5.4.19 and Apache 2.4.4
我使用 XAMPP 1.8.2 和 PHP 5.4.19 和 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).
由于它也可能是由另一个扩展引起的,因此从 xampp 发行版中恢复原始 php.ini 可能是一个很好的起点。如果此方法运行良好,请尝试将其逐行更改为所需的配置(从扩展列表开始)。
回答by hanco ike
So my php directory did not have libmysql.dll in it this seems to have resolved the problem.
所以我的 php 目录中没有 libmysql.dll 这似乎解决了问题。
I also added this to the win32 directory and the apache bin directory
我也把这个加到了 win32 目录和 apache bin 目录
回答by Ron Meske
We are running two copies of Apache, each with their own version of PHP.
我们正在运行两个 Apache 副本,每个副本都有自己的 PHP 版本。
After searching for this error and trying different suggestions of copying files into the windows system32 folder, I finally found that the issue seems to be multiple copies of libmysql.dll found in the windows path.
在搜索这个错误并尝试将文件复制到windows system32文件夹的不同建议后,我终于发现问题似乎是在windows路径中找到了libmysql.dll的多个副本。
After copying the libmysql.dll file into the apache bin folder we no longer have this problem.
将 libmysql.dll 文件复制到 apache bin 文件夹后,我们不再有此问题。
回答by Liz Rainey
I had the problem - and after checking my folders, I realized I did not have the php5apache.dll in my php directory. So I tried copying it from the Win32 folder - and it has improved matters considerably (I won't hold my breath yet :))
我遇到了问题 - 检查我的文件夹后,我意识到我的 php 目录中没有 php5apache.dll。所以我尝试从 Win32 文件夹中复制它 - 它已经大大改善了问题(我不会屏住呼吸:))
回答by pylon
I just had this problem for a while, apache restarted in every 5-15 minutes. My server serves a lot of sites and a portal with a big traffic, I programmed that portal and I just figured it out that the get_browser() function gives a memory error sometimes (depends on the agent). I refreshed the browscap.ini, no effect, the restarting still happens but as far as I removed to use this function, the apache didn't restart anymore. I use PHP 5.2.6 with Apache 2.0.5x I hope this helps for some other people too.
我只是遇到了这个问题一段时间,apache 每 5-15 分钟重新启动一次。我的服务器为很多站点和一个流量很大的门户提供服务,我对该门户进行了编程,我发现 get_browser() 函数有时会出现内存错误(取决于代理)。我刷新了browscap.ini,没有效果,重启仍然发生,但就我删除使用此功能而言,apache不再重启。我使用 PHP 5.2.6 和 Apache 2.0.5x 我希望这对其他人也有帮助。
回答by Aldekein
This is an openssl_public_encrypt() function in my case.
在我的例子中,这是一个 openssl_public_encrypt() 函数。
回答by AllanT
I had this same problem. Copying dll's didn't fix it. So I looked around some more and found this thread with the answer that worked for me. Why does my XAMPP Apache service keep restarting?
我有同样的问题。复制dll的没有修复它。所以我环顾四周,发现这个线程的答案对我有用。为什么我的 XAMPP Apache 服务不断重启?
In my Nvidia control panel I didn't see the FIrstPacket settings initially, so I uninstalled the Nvidia ForceWare Network Access Manager, then reinstalled it through the Nvidia drivers. After the restart the FirstPacket settings were visible and I made sure it was disabled, then everything worked.
在我的 Nvidia 控制面板中,我最初没有看到 FIRstPacket 设置,所以我卸载了 Nvidia ForceWare 网络访问管理器,然后通过 Nvidia 驱动程序重新安装它。重启后 FirstPacket 设置可见,我确保它被禁用,然后一切正常。
回答by Mathias Larsson
I experienced tha same problem when I called
我打电话时遇到了同样的问题
$link = mysql_connect('127.0.0.1', $user, $password);
from a PHPscript when running a clean install of WampServer (http://www.wampserver.com/en/)
运行全新安装的 WampServer (http://www.wampserver.com/en/) 时从 PHPscript
I tried to copy DLLs, as suggested above, but I could not get it to work.
我尝试复制 DLL,如上所述,但我无法让它工作。
Finally I changed to UniformServer (http://www.uniformserver.com/) 5.6.16, and it worked as a charm.
最后我改为 UniformServer (http://www.uniformserver.com/) 5.6.16,它很有魅力。
Hope this post can save some time for somebody :-)
希望这篇文章可以为某人节省一些时间:-)

