【问题标题】:The connection was reset on wamp连接已在 wamp 上重置
【发布时间】:2012-07-20 12:55:48
【问题描述】:

我已经在我的电脑上安装了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

【问题讨论】:

    标签: apache localhost wamp


    【解决方案1】:

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

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

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

    <IfModule mpm_winnt_module>
       ThreadStackSize 8388608
    </IfModule>
    

    【讨论】:

    • 这个解决方案在 Windows 7、WAMP 3.1.4 x64 上帮助了我,这很奇怪,因为低于 3.x.x 版本的 WAMP 版本没有这个问题。
    • 为我使用 Windows10 WAMPServer 3.1.9
    • 这在 Windows 10 上非常适合我。谢谢
    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-04-25
      • 2022-10-05
      • 2012-07-03
      • 1970-01-01
      • 1970-01-01
      • 2020-10-16
      • 2016-01-16
      相关资源
      最近更新 更多