【问题标题】:Apache freezes at a single PHP pageApache 冻结在一个 PHP 页面
【发布时间】:2010-11-18 11:33:09
【问题描述】:

我所有的 PHP 页面都可以正常工作,但是有一个 PHP 页面过去可以正常工作,但现在它冻结了(当我在浏览器中访问它时,它超时而没有响应)。

这是写入日志的唯一错误:

[Thu Nov 18 12:23:18 2010] [notice] Apache/2.2.15 (Win32) PHP/5.2.13 configured -- resuming normal operations
[Thu Nov 18 12:23:18 2010] [notice] Server built: Mar  4 2010 11:27:46
[Thu Nov 18 12:23:18 2010] [notice] Parent: Created child process 3928
[Thu Nov 18 12:23:19 2010] [notice] Child 3928: Child process is running
[Thu Nov 18 12:23:19 2010] [notice] Child 3928: Acquired the start mutex.
[Thu Nov 18 12:23:19 2010] [notice] Child 3928: Starting 64 worker threads.
[Thu Nov 18 12:23:19 2010] [notice] Child 3928: Starting thread to listen on port 80.
[Thu Nov 18 12:23:59 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Thu Nov 18 12:24:05 2010] [notice] Apache/2.2.15 (Win32) PHP/5.2.13 configured -- resuming normal operations
[Thu Nov 18 12:24:05 2010] [notice] Server built: Mar  4 2010 11:27:46
[Thu Nov 18 12:24:05 2010] [notice] Parent: Created child process 388
[Thu Nov 18 12:24:06 2010] [notice] Child 388: Child process is running
[Thu Nov 18 12:24:06 2010] [notice] Child 388: Acquired the start mutex.
[Thu Nov 18 12:24:06 2010] [notice] Child 388: Starting 64 worker threads.
[Thu Nov 18 12:24:06 2010] [notice] Child 388: Starting thread to listen on port 80.
[Thu Nov 18 12:24:24 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Thu Nov 18 12:24:25 2010] [notice] Apache/2.2.15 (Win32) PHP/5.2.13 configured -- resuming normal operations
[Thu Nov 18 12:24:25 2010] [notice] Server built: Mar  4 2010 11:27:46
[Thu Nov 18 12:24:25 2010] [notice] Parent: Created child process 2816
[Thu Nov 18 12:24:26 2010] [notice] Child 2816: Child process is running
[Thu Nov 18 12:24:26 2010] [notice] Child 2816: Acquired the start mutex.
[Thu Nov 18 12:24:26 2010] [notice] Child 2816: Starting 64 worker threads.
[Thu Nov 18 12:24:26 2010] [notice] Child 2816: Starting thread to listen on port 80.
[Thu Nov 18 12:24:26 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Thu Nov 18 12:24:27 2010] [notice] Apache/2.2.15 (Win32) PHP/5.2.13 configured -- resuming normal operations
[Thu Nov 18 12:24:27 2010] [notice] Server built: Mar  4 2010 11:27:46
[Thu Nov 18 12:24:27 2010] [notice] Parent: Created child process 3680
[Thu Nov 18 12:24:28 2010] [notice] Child 3680: Child process is running
[Thu Nov 18 12:24:28 2010] [notice] Child 3680: Acquired the start mutex.
[Thu Nov 18 12:24:28 2010] [notice] Child 3680: Starting 64 worker threads.
[Thu Nov 18 12:24:28 2010] [notice] Child 3680: Starting thread to listen on port 80.
[Thu Nov 18 12:28:52 2010] [notice] Parent: child process exited with status 255 -- Restarting.
[Thu Nov 18 12:28:53 2010] [notice] Apache/2.2.15 (Win32) PHP/5.2.13 configured -- resuming normal operations
[Thu Nov 18 12:28:53 2010] [notice] Server built: Mar  4 2010 11:27:46
[Thu Nov 18 12:28:53 2010] [notice] Parent: Created child process 3828
[Thu Nov 18 12:28:54 2010] [notice] Child 3828: Child process is running
[Thu Nov 18 12:28:54 2010] [notice] Child 3828: Acquired the start mutex.
[Thu Nov 18 12:28:54 2010] [notice] Child 3828: Starting 64 worker threads.
[Thu Nov 18 12:28:54 2010] [notice] Child 3828: Starting thread to listen on port 80.

我添加到该页面的唯一内容是一些 JavaScript 代码。我还尝试将页面的全部内容注释掉,以防代码中出现无穷无尽的递归。

我已经多次重启 Apache 和 PC。

我的操作系统是 Windows 7。可能有什么问题?

【问题讨论】:

  • 删除已添加的 javascript 代码后会发生什么?
  • 发布该页面的代码,在某处无限循环?

标签: php windows apache


【解决方案1】:

尝试通过命令行而不是通过服务器运行脚本 - 这可能会在控制台中为您提供更具体的错误消息。据我所知,您发布的错误日志似乎没有显示任何与您的脚本相关的内容。

在 Linux 中,您只需键入:

提示> php myScript.php

我想你可以在 Windows 的命令终端上做同样的事情?

【讨论】:

    【解决方案2】:

    我认为您可以下载非线程安全 (nts) PHP 二进制文件。它们无法在 Windows 上正常工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-06-28
      • 2013-08-19
      • 1970-01-01
      • 2023-02-14
      • 2021-04-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多