我正在尝试在本地进行 Wordpress 开发,但我甚至无法让 WAMP 运行。
我安装它并启动它,但它挂在橙色图标上,并显示消息“服务器离线”。
我尝试将其监听的端口从 80 更改为 8888。我不确定的一件事是我应该在哪里以及在哪个文件中编辑?
httpd.conf
两者都有该文件C:\wamp\bin\apache\apache2.4.9\conf
,并且C:\wamp\bin\apache\apache2.4.9\conf\original
它们位于80
几个不同的地方。
更新:找到了如何修复该问题的方法,但并不完全理解。运行后net stop WAS
WAMP 即可启动。我发现此处有路线并且默认情况下红色的 IIS 从 Windows 8 开始启动。我想如果 WAMP 默认在 Windows 8 上不起作用,那么在 Google 上找到它会更容易吗?
更新 2:别介意它不再工作了 :( 这里是错误日志
[05-Jul-2015 11:50:56 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.
in Unknown on line 0
[05-Jul-2015 11:50:56 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.
in Unknown on line 0
[05-Jul-2015 11:50:57 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.
in Unknown on line 0
[05-Jul-2015 11:50:57 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.
in Unknown on line 0
[05-Jul-2015 12:07:00 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.
in Unknown on line 0
[05-Jul-2015 12:07:00 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.
in Unknown on line 0
[05-Jul-2015 12:07:01 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_intl.dll' - The specified module could not be found.
in Unknown on line 0
[05-Jul-2015 12:07:01 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.5.12/ext/php_ldap.dll' - The specified module could not be found.
in Unknown on line 0
[05-Jul-2015 14:08:39 Europe/Paris] PHP Parse error: syntax err
或者,C:\wamp\www\test.php 第 3 行出现意外的“echo”(T_ECHO)
[Sun Jul 05 04:50:56.884946 2015] [mpm_winnt:notice] [pid 100:tid 532] AH00455: Apache/2.4.9 (Win64) PHP/5.5.12 configured -- resuming normal operations
[Sun Jul 05 04:50:56.884946 2015] [mpm_winnt:notice] [pid 100:tid 532] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:42:59
[Sun Jul 05 04:50:56.884946 2015] [core:notice] [pid 100:tid 532] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.9'
[Sun Jul 05 04:50:56.885945 2015] [mpm_winnt:notice] [pid 100:tid 532] AH00418: Parent: Created child process 2572
[Sun Jul 05 04:50:57.109714 2015] [mpm_winnt:notice] [pid 2572:tid 440] AH00354: Child: Starting 64 worker threads.
[Sun Jul 05 04:54:23.655588 2015] [mpm_winnt:notice] [pid 100:tid 532] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sun Jul 05 04:54:25.671621 2015] [mpm_winnt:notice] [pid 2572:tid 440] AH00364: Child: All worker threads have exited.
[Sun Jul 05 04:54:25.687247 2015] [mpm_winnt:notice] [pid 100:tid 532] AH00430: Parent: Child process 2572 exited successfully.
[Sun Jul 05 05:07:00.824045 2015] [mpm_winnt:notice] [pid 5128:tid 528] AH00455: Apache/2.4.9 (Win64) PHP/5.5.12 configured -- resuming normal operations
[Sun Jul 05 05:07:00.824045 2015] [mpm_winnt:notice] [pid 5128:tid 528] AH00456: Apache Lounge VC11 Server built: Mar 16 2014 12:42:59
[Sun Jul 05 05:07:00.824045 2015] [core:notice] [pid 5128:tid 528] AH00094: Command line: 'c:\\wamp\\bin\\apache\\apache2.4.9\\bin\\httpd.exe -d C:/wamp/bin/apache/apache2.4.9'
[Sun Jul 05 05:07:00.825045 2015] [mpm_winnt:notice] [pid 5128:tid 528] AH00418: Parent: Created child process 5296
[Sun Jul 05 05:07:01.032475 2015] [mpm_winnt:notice] [pid 5296:tid 440] AH00354: Child: Starting 64 worker threads.
[Sun Jul 05 12:45:12.001476 2015] [mpm_winnt:notice] [pid 5128:tid 528] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sun Jul 05 12:45:14.003754 2015] [mpm_winnt:notice] [pid 5296:tid 440] AH00364: Child: All worker threads have exited.
[Sun Jul 05 12:45:14.030760 2015] [mpm_winnt:notice] [pid 5128:tid 528] AH00430: Parent: Child process 5296 exited successfully.
答案1
这是因为 IIS 和 WAMP 都尝试设置一个监听端口 80 的服务器。一次只有一个应用程序可以使用本地端口。
您有两个选择:
- 通过关闭IIS服务使WAMP服务器设置监听80端口的服务器套接字;
- 将监听端口更改为另一个端口,例如端口 8080。您可以通过编辑文件
httpd.conf
,然后将所有 :80 替换为 :8080 来实现此目的。如果您单击系统托盘图标,则Apache ▶ httpd.conf,它将使用正确的httpd.conf
文件打开您的默认文本编辑器(通常是记事本)。
答案2
您实际上在使用 IIS 吗?如果没有,则可能需要卸载它,从而为 Apache 释放端口 80,并避免过多地修改 httpd.conf 文件。
IIS 集成在 Windows 8.1 中,但需要将其添加为可选的 Windows 组件,除非您使用定制的安装媒体。