I've downloaded and installed PHP 5.5.7 (VC11 x86 Thread Safe) from http://windows.php.net/download/ .
Followed instructions from http://www.php.net/manual/en/install.windows.apache2.php & http://www.reaper-x.com/2007/09/24/installing-and-setting-up-apache-22-series-with-php-5-on-windows/ to no avail.
Apache simply will not start with the added PHP configuration in httpd.conf...if I comment out all PHP configuration Apache starts with no issues.
EDIT
Updated php.ini to forward slashes
Delete and uninstall everything you have done so far.
Download apache from apache longue http://www.apachelounge.com/download/VC11/binaries/httpd-2.4.7-win64-VC11.zip
Ectract to c:/apache24
Download module modules-2.4-win64-VC11.zip http://www.apachelounge.com/download/VC11/modules/modules-2.4-win64-VC11.zip
Extrct and copy mod_fcgid.so
into apache24\\modules
Open command prompt AS ADMINISTRATOR
cd\\ c:\\Apache24\\bin
to the folder with the httpd.exe file in it
type: httpd -k install
type: net start apache2.4
Should be running provided no errors.
Download php from windows.php.net extract files to Apache24\\php
Delete php.ini-production
Rename php.ini-development
to php.ini
In php.ini
:
Uncomment line 731: extension_dir = "ext"
Uncomment the follownig lines: (873 ...):
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_pdo_mysql.dll
In httpd.conf
in line 218 uncomment the following line and edit to : ServerName localhost
Change line 58 Listen 80
to change server port
In httpd.conf
include this line.:
LoadModule fcgid_module modules/mod_fcgid.so
in the end of httpd.conf add the following lines:
<IfModule fcgid_module>
FcgidInitialEnv PHPRC "C:\\Apache24\\php"
FcgidInitialEnv PATH "C:\\Apache24\\php;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;"
FcgidInitialEnv SystemRoot "C:\\Windows"
FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "C:\\WINDOWS\\TEMP"
FcgidInitialEnv TMP "C:\\WINDOWS\\TEMP"
FcgidInitialEnv windir "C:\\WINDOWS"
FcgidIOTimeout 40
FcgidConnectTimeout 10
FcgidMaxProcesses 8
FcgidOutputBufferSize 64
ProcessLifeTime 0
FcgidMaxRequestsPerProcess 0
FcgidMinProcessesPerClass 0
FcgidMaxProcesses 50
FcgidFixPathinfo 1
FcgidZombieScanInterval 20
FcgidMaxRequestLen 536870912
FcgidIOTimeout 120
<Files ~ "\.php$">
Options Indexes FollowSymLinks ExecCGI
AddHandler fcgid-script .php
FcgidWrapper "C:/Apache24/php/php-cgi.exe" .php
</Files>
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
In line 276 add index.php near index.html
Enable htacess
un-comment: LoadModule rewrite_module modules/mod_rewrite.so
Replace all "AllowOverride None" to "AllowOverride All". (find and replace all)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.