6

我已经在我的电脑上安装了wamp服务器。然后我安装了一个zend应用程序。我把它放在medaffiliate.com目录中的www目录中。当我通过它访问该目录时,localhost/medaffiliate.com它只会显示

 The connection was reset

我经历了很多答案,例如 https://serverfault.com/questions/74313/what-c ​​ould-cause-an-101-error-in-wamp-under-windows-7

他们都在说关门mysql_close($connect);。我的Apache错误日志显示

     [Sat Jul 21 18:35:45 2012] [notice] Parent: child process exited with status 255 -- Restarting.
[Sat Jul 21 18:35:45 2012] [notice] Apache/2.2.17 (Win32) PHP/5.3.4 configured -- resuming normal operations
[Sat Jul 21 18:35:45 2012] [notice] Server built: Oct 24 2010 13:33:15
[Sat Jul 21 18:35:45 2012] [notice] Parent: Created child process 6768
[Sat Jul 21 18:35:45 2012] [notice] Child 6768: Child process is running
[Sat Jul 21 18:35:45 2012] [notice] Child 6768: Acquired the start mutex.
[Sat Jul 21 18:35:45 2012] [notice] Child 6768: Starting 64 worker threads.
[Sat Jul 21 18:35:45 2012] [notice] Child 6768: Starting thread to listen on port 80.
[Sat Jul 21 18:36:21 2012] [notice] Parent: child process exited with status 255 -- Restarting.
[Sat Jul 21 18:36:21 2012] [notice] Apache/2.2.17 (Win32) PHP/5.3.4 configured -- resuming normal operations
[Sat Jul 21 18:36:21 2012] [notice] Server built: Oct 24 2010 13:33:15
[Sat Jul 21 18:36:21 2012] [notice] Parent: Created child process 1140
[Sat Jul 21 18:36:21 2012] [notice] Child 1140: Child process is running
[Sat Jul 21 18:36:21 2012] [notice] Child 1140: Acquired the start mutex.
[Sat Jul 21 18:36:21 2012] [notice] Child 1140: Starting 64 worker threads.
[Sat Jul 21 18:36:21 2012] [notice] Child 1140: Starting thread to listen on port 80.
[Sat Jul 21 18:40:39 2012] [notice] Parent: child process exited with status 255 -- Restarting.
[Sat Jul 21 18:40:39 2012] [notice] Apache/2.2.17 (Win32) PHP/5.3.4 configured -- resuming normal operations
[Sat Jul 21 18:40:39 2012] [notice] Server built: Oct 24 2010 13:33:15
[Sat Jul 21 18:40:39 2012] [notice] Parent: Created child process 7892
[Sat Jul 21 18:40:39 2012] [notice] Child 7892: Child process is running
[Sat Jul 21 18:40:39 2012] [notice] Child 7892: Acquired the start mutex.
[Sat Jul 21 18:40:39 2012] [notice] Child 7892: Starting 64 worker threads.
[Sat Jul 21 18:40:39 2012] [notice] Child 7892: Starting thread to listen on port 80.

我发现其他人在创建与数据库的连接时面临此类问题。我在我的 www 目录上创建了另一个项目并与数据库建立连接。这是工作。但不是我的项目。

我在用os:window 7. Apache : 2.2.17, PHP:5.3.4, Mysql : 5.1.53

4

2 回答 2

16

我有一个类似的问题,我无法通过增加超时和内存限制来解决。

经过数小时的反复试验,我终于偶然发现了另一个帖子:https ://drupal.org/node/1597820 ,它为我解决了这个问题。

将以下内容添加到 httpd.conf 的末尾以将 Apache 堆栈大小增加到 8MB。

<IfModule mpm_winnt_module>
   ThreadStackSize 8388608
</IfModule>
于 2016-06-06T22:38:46.650 回答
4

我多次遇到此错误,我的解决方案是增加 apache 二进制文件(apache.exe 或 httpd.exe)堆栈大小。您将需要 Visual Studio 来执行此操作,但您可以像我一样使用试用版。你甚至不需要打开它。命令是:

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64>editbin /STACK:8000000 "c:\Program Files (x86)\WAMP\apache\bin\apache.exe"

当然,根据您的环境更改上述路径。

在 Visual Studio 目录 VC/binary/ 中有几个名为 editbin.exe 的实用程序。使用适合您平台的一个或一个一个尝试,直到它起作用(就像我一样)。

于 2013-01-05T16:22:15.030 回答