且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Apache 2.2的在Windows 8.1中安装PHP 5.6后不启动

更新时间:2023-02-22 22:42:53

检查是否存在错误Apache的日志文件!看什么

您提到的Apache 2.2,但使用的是被称为php5apache2_4.dll DLL。
此DLL是按名称专门打造的Apache 2.4。这可能导致问题,这对Apache 2.2的为 PHP网站是Windows DLL中的最后一个PHP版本PHP 35年5月4日。

I'm setting up an development environment on a Windows 8.1 machine.

I successfully installed Apache 2.2, and downloaded php-5.6.3-Win32-VC11-x86.

I added the following lines at the end of 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

I also added

application/x-httpd-php .php

to the myme.types file

If I comment out PHPIniDir or LoadModule apache will start normally.

Also, all extensions are commented out on the PHP.ini file, and the extension directory is set as

extension_dir = "ext"

Any help will be hugely appreciated.

EDIT 1: The only thing in error log is about server shutdow

[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.

Check your apache log file for errors! see what the

You mention apache 2.2, yet you are using a dll called php5apache2_4.dll. This dll is according to the name specifically build for apache 2.4. This is likely to cause issues, the last php version which has a dll for apache 2.2 for windows on the php website is php 5.4.35.