php - 在 Windows 8.1 上安装 Apache、PHP、MySQL - Apache 无法启动 - 请求的操作失败

标签 php mysql windows apache wamp

关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。












想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。

7年前关闭。




Improve this question




我在 Windows 8.1 中安装家庭个人 LAMP 开发服务器时遇到问题。
我尝试在 Windows 8.1 上手动安装 Apache、MySQL 和 PHP。似乎 Apache 和 MySQL 都安装正确,因为我可以在 MySQL 中执行“选择数据库”,并且 localhost 说了一些大意为“如果您看到此消息,则表示 Apache 安装正确”。
当我尝试启动 Apache2 服务时,它说:

The requested operation has failed.


但是,服务在我安装后就启动了。只有在重新启动后它才开始给我这个错误并拒绝启动。
我想知道为什么这这么麻烦?我完美地遵循了说明,但它没有给我预期的结果。
规范

OPERATING SYSTEM:

Windows 8.1 64-bit

APACHE SERVER:

httpd-2.0.65-win32-x86-openssl-0.9.8y.msi

MYSQL SERVER:

mysql-installer-community-5.6.19.0.msi

PHP for Windows:

php-5.3.28-Win32-VC9-x86.msi VC9 x86 Thread Safe (2013-Dec-12 01:59:01)


一些最后的笔记
  • 此计算机上未安装 IIS。
  • 按照 3dmasters 的建议禁用防火墙
  • 我不是 Apache 专家,这就是我在以前的系统上使用 WAMP 的原因,但我记得当我在 2009 年安装它时,即使使用了应该消除问题的交 key “包”,我仍然遇到兼容性问题并且安装后配置。我最终在 WAMP 上取得了成功,并将其用于学习 PHP。
  • 我知道有像 XAMPP 和 WAMP 这样的预制包,但这次我不想使用它们,除非有人可以明确地告诉我,即使是经验丰富的程序员/计算机专家/网络管理员也绝对不可能在 Windows 8.1 上手动安装 Apache/MySQL/PHP。
  • 在 3dmasters 的教程视频中,他使用的是 VirtualBox 和 Apache 的 no-ssl 版本。同样,他的教程看起来很棒,也许其他人能够按照他的说明第一次启动并运行。但是,我非常接近地遵循了他的指示,但这对我不起作用。需要注意的是,我用于安装的两个来源(我能找到的最新来源)都是去年夏天(2013 年)发布的。在 McMillian 的文章中,他总结了可能导致“请求的操作失败”错误的各种并发问题:

  • "The problem seems to by [sic] that there are numerous versions of Apache and PHP. Most combinations of them are incompatible with each other. Support does not seem to have been kept remotely up to date and the documentation is terrible. Vital information is missing and in places it seems to be inaccurate. This paper describes what worked mid 2013."


    因此,至少有一个人知道并且能够表达和写出冲突。然而,我没有发现其他资源可以逐步解决这个问题,“这是你应该做的,这就是为什么”以及“不要这样做,因为”的方式。这种最接近的警告是确保您正在安装该软件的“线程安全”版本,我就是。
    来源

    Installing Apache 2.2.22, Php 5.3.26 and Mysql 5.6.12 Microsoft
    Publisher: 3dmasters
    Published: Jun 28, 2013
    https://www.youtube.com/watch?v=UKbEzmMliNM

    Installing Apache and PHP on Windows
    Author: John McMillan
    Published: July 25, 2013
    http://johnrmcmillan.wordpress.com/2013/07/25/installing-apache-and-php-on-windows./

    最佳答案

    您正在使用 Apache 2.0 VC6 构建和 PHP 5.3 VC9 构建。这些构建至少必须匹配;您不能让 Apache VC6 加载 PHP VC9 模块/扩展。而且我什至不确定 Apache 2.0 是否可以将 PHP5 加载到 5.2 以上。

    这些旧版本有原因吗?

    But, the service started after I installed it just fine. Only after a reboot did it start giving me this error and refusing to start



    以管理员模式打开命令行(右键cmd.exe,选择以管理员身份运行),执行:
    httpd -t
    httpd -k start
    

    它会输出问题。

    如果它说明无法绑定(bind)到端口 80,请检查本指南中概述的服务:

    Opening Up Port 80 For Apache to Use On Windows

    unless somebody can tell me unequivocally that there is absolutely no way even a seasoned programmer/computer specialist/network administrator can manually install Apache/MySQL/PHP on Windows 8.1



    如果您真的想让它完全工作并针对所有边缘情况进行纠正,至少需要几天到几周的时间。否则,您应该查看 Xampp、WampServer、WampDeveloper Pro(非免费)、EasyPHP。

    关于php - 在 Windows 8.1 上安装 Apache、PHP、MySQL - Apache 无法启动 - 请求的操作失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24075025/

    相关文章:

    php - 如何使用 Magento/PHP 在另一个图像之上添加图像?

    php - 如何根据id数组获取表记录?

    windows - 在操作系统级别更改后更新 IntelliJ 环境变量

    php - 条件偏好 sql 的更好方法

    windows - 如何从 github 构建 Golang 博客?

    c - 无需复制的 Windows 环形缓冲区

    php - 如何设计数据库让用户输入和保存食谱

    PHP 析构函数显示错误?

    javascript - 使用循环处理 javascript 中的 json 数组

    mysql - has_many 上的条件通过