在 Windows 8.1 上安装 PHP 5.6 后 Apache 2.2 无法启动

2024-02-02

我正在 Windows 8.1 计算机上设置开发环境。

我成功安装了Apache 2.2,并下载了php-5.6.3-Win32-VC11-x86。

我在 httpd.conf 的末尾添加了以下几行

PHPIniDir "C:/PHP5"
LoadModule php5_module "C:/PHP5/php5apache2_4.dll"
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php

我还添加了

application/x-httpd-php .php

to the myme.types file

如果我评论掉PHPIniDir or LoadModuleapache将正常启动。

此外,所有扩展都被注释掉了PHP.ini文件,扩展目录设置为

extension_dir = "ext"

任何帮助将不胜感激。

编辑1: 错误日志中唯一的内容是关于服务器关闭

[Sun Nov 23 14:56:07 2014] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sun Nov 23 14:56:07 2014] [notice] Child 6192: Exit event signaled. Child process is ending.
[Sun Nov 23 14:56:08 2014] [notice] Child 6192: Released the start mutex
[Sun Nov 23 14:56:09 2014] [notice] Child 6192: All worker threads have exited.
[Sun Nov 23 14:56:09 2014] [notice] Child 6192: Child process is exiting
[Sun Nov 23 14:56:09 2014] [notice] Parent: Child process exited successfully.

检查您的 apache 日志文件是否有错误!看看是什么

您提到了 apache 2.2,但您正在使用名为 php5apache2_4.dll 的 dll。 这个dll是根据名字专门为apache 2.4构建的。这可能会导致问题,最后一个 php 版本有一个适用于 Windows 的 apache 2.2 的 dllPHP网站 http://windows.php.net是 php 5.4.35。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

在 Windows 8.1 上安装 PHP 5.6 后 Apache 2.2 无法启动 的相关文章

随机推荐