在httpd.conf中加入了 “LoadModule php5_module d:/Program files/PHP5/php5apache2.dll”后启动不了,但在前面加了“#”又可以启动了,这是为什么,本人刚自学不久,求高手解答!这里的"#"又是代表什么?php5apache2.dll也试过了,也是不行!

解决方案 »

  1.   

    #是注释
    去掉了可能出错,重复载入或是dll不存在
    出错apache就重启不了,在log里会有错误日志
      

  2.   

    这是ERROR.LOG日志上的内容,但我看不出错误代码在哪一句,能麻烦你告知下吗?
    Starting the Apache2.2 service
    The Apache2.2 service is running.
    rmine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Sat Sep 01 23:18:29 2012] [notice] Apache/2.2.22 (Win32) configured -- resuming normal operations
    [Sat Sep 01 23:18:29 2012] [notice] Server built: Jan 28 2012 11:16:39
    [Sat Sep 01 23:18:29 2012] [notice] Parent: Created child process 3608
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Sat Sep 01 23:18:29 2012] [notice] Child 3608: Child process is running
    [Sat Sep 01 23:18:29 2012] [notice] Child 3608: Acquired the start mutex.
    [Sat Sep 01 23:18:29 2012] [notice] Child 3608: Starting 64 worker threads.
    [Sat Sep 01 23:18:29 2012] [notice] Child 3608: Starting thread to listen on port 80.
    [Sat Sep 01 23:26:04 2012] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Sat Sep 01 23:26:04 2012] [notice] Child 3608: Exit event signaled. Child process is ending.
    [Sat Sep 01 23:26:05 2012] [notice] Child 3608: Released the start mutex
    [Sat Sep 01 23:26:06 2012] [notice] Child 3608: All worker threads have exited.
    [Sat Sep 01 23:26:06 2012] [notice] Child 3608: Child process is exiting
    [Sat Sep 01 23:26:06 2012] [notice] Parent: Child process exited successfully.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Sat Sep 01 23:27:01 2012] [notice] Apache/2.2.22 (Win32) configured -- resuming normal operations
    [Sat Sep 01 23:27:01 2012] [notice] Server built: Jan 28 2012 11:16:39
    [Sat Sep 01 23:27:01 2012] [notice] Parent: Created child process 472
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Sat Sep 01 23:27:01 2012] [notice] Child 472: Child process is running
    [Sat Sep 01 23:27:01 2012] [notice] Child 472: Acquired the start mutex.
    [Sat Sep 01 23:27:01 2012] [notice] Child 472: Starting 64 worker threads.
    [Sat Sep 01 23:27:01 2012] [notice] Child 472: Starting thread to listen on port 80.
    [Sat Sep 01 23:27:05 2012] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Sat Sep 01 23:27:05 2012] [notice] Child 472: Exit event signaled. Child process is ending.
    [Sat Sep 01 23:27:06 2012] [notice] Child 472: Released the start mutex
    [Sat Sep 01 23:27:07 2012] [notice] Child 472: All worker threads have exited.
    [Sat Sep 01 23:27:07 2012] [notice] Child 472: Child process is exiting
    [Sat Sep 01 23:27:07 2012] [notice] Parent: Child process exited successfully.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Sat Sep 01 23:31:07 2012] [notice] Apache/2.2.22 (Win32) configured -- resuming normal operations
    [Sat Sep 01 23:31:07 2012] [notice] Server built: Jan 28 2012 11:16:39
    [Sat Sep 01 23:31:07 2012] [notice] Parent: Created child process 2752
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Sat Sep 01 23:31:07 2012] [notice] Child 2752: Child process is running
    [Sat Sep 01 23:31:07 2012] [notice] Child 2752: Acquired the start mutex.
    [Sat Sep 01 23:31:07 2012] [notice] Child 2752: Starting 64 worker threads.
    [Sat Sep 01 23:31:07 2012] [notice] Child 2752: Starting thread to listen on port 80.
    [Sat Sep 01 23:31:27 2012] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Sat Sep 01 23:31:27 2012] [notice] Child 2752: Exit event signaled. Child process is ending.
    [Sat Sep 01 23:31:28 2012] [notice] Child 2752: Released the start mutex
    [Sat Sep 01 23:31:29 2012] [notice] Child 2752: All worker threads have exited.
    [Sat Sep 01 23:31:29 2012] [notice] Child 2752: Child process is exiting
    [Sat Sep 01 23:31:29 2012] [notice] Parent: Child process exited successfully.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Sat Sep 01 23:34:15 2012] [notice] Apache/2.2.22 (Win32) configured -- resuming normal operations
    [Sat Sep 01 23:34:15 2012] [notice] Server built: Jan 28 2012 11:16:39
    [Sat Sep 01 23:34:15 2012] [notice] Parent: Created child process 2520
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Sat Sep 01 23:34:15 2012] [notice] Child 2520: Child process is running
    [Sat Sep 01 23:34:15 2012] [notice] Child 2520: Acquired the start mutex.
    [Sat Sep 01 23:34:15 2012] [notice] Child 2520: Starting 64 worker threads.
    [Sat Sep 01 23:34:15 2012] [notice] Child 2520: Starting thread to listen on port 80.
    [Sat Sep 01 23:41:10 2012] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Sat Sep 01 23:41:10 2012] [notice] Child 2520: Exit event signaled. Child process is ending.
    [Sat Sep 01 23:41:11 2012] [notice] Child 2520: Released the start mutex
    [Sat Sep 01 23:41:12 2012] [notice] Child 2520: All worker threads have exited.
    [Sat Sep 01 23:41:12 2012] [notice] Child 2520: Child process is exiting
    [Sat Sep 01 23:41:12 2012] [notice] Parent: Child process exited successfully.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Sun Sep 02 22:35:23 2012] [notice] Apache/2.2.22 (Win32) configured -- resuming normal operations
    [Sun Sep 02 22:35:23 2012] [notice] Server built: Jan 28 2012 11:16:39
    [Sun Sep 02 22:35:23 2012] [notice] Parent: Created child process 1828
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Sun Sep 02 22:35:23 2012] [notice] Child 1828: Child process is running
    [Sun Sep 02 22:35:23 2012] [notice] Child 1828: Acquired the start mutex.
    [Sun Sep 02 22:35:23 2012] [notice] Child 1828: Starting 64 worker threads.
    [Sun Sep 02 22:35:23 2012] [notice] Child 1828: Starting thread to listen on port 80.
    [Sun Sep 02 22:44:55 2012] [notice] Parent: Received shutdown signal -- Shutting down the server.
    [Sun Sep 02 22:44:55 2012] [notice] Child 1828: Exit event signaled. Child process is ending.
    [Sun Sep 02 22:44:56 2012] [notice] Child 1828: Released the start mutex
    [Sun Sep 02 22:44:57 2012] [notice] Child 1828: All worker threads have exited.
    [Sun Sep 02 22:44:57 2012] [notice] Child 1828: Child process is exiting
    [Sun Sep 02 22:44:57 2012] [notice] Parent: Child process exited successfully.
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Mon Sep 03 22:32:02 2012] [notice] Apache/2.2.22 (Win32) configured -- resuming normal operations
    [Mon Sep 03 22:32:02 2012] [notice] Server built: Jan 28 2012 11:16:39
    [Mon Sep 03 22:32:02 2012] [notice] Parent: Created child process 1580
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    [Mon Sep 03 22:32:02 2012] [notice] Child 1580: Child process is running
    [Mon Sep 03 22:32:02 2012] [notice] Child 1580: Acquired the start mutex.
    [Mon Sep 03 22:32:02 2012] [notice] Child 1580: Starting 64 worker threads.
    [Mon Sep 03 22:32:02 2012] [notice] Child 1580: Starting thread to listen on port 80.
      

  3.   

    看前面时间,是递增的 [Mon Sep 03 22:32:02 2012] 九月三号周一晚上十点半的
      

  4.   

    你的php是哪个版本的2.2的php5apache2.dll要改成php5apache2_2.dll
      

  5.   

    有改成php5apache2_2.dll的,但还是运行不了!
      

  6.   

    d:/Program files/PHP5/php5apache2.dll 该目录下 你确定有这个文件吗?
      

  7.   

    你确定你的目录下d:/Program files/PHP5/php5apache2.dll改文件存在吗?
      

  8.   

    1.注意一下php Thread Safe问题,版本要对应
    2.注意VC9编译的php的apache问题,请看 http://windows.php.net/download/   左边的说明