连接在wamp上重置

时间:2012-07-21 14:36:08

标签: apache localhost wamp

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

 The connection was reset

我已经通过了许多答案 https://serverfault.com/questions/74313/what-could-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

2 个答案:

答案 0 :(得分:9)

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

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

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

<IfModule mpm_winnt_module>
   ThreadStackSize 8388608
</IfModule>

答案 1 :(得分:3)

我多次遇到此错误,我的解决方案是增加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的实用程序。使用适合您的平台或逐个尝试,直到它工作(如我所做)。