2013-12-20 94 views
0

我已经从http://windows.php.net/download/下载并安装了PHP 5.5.7(VC11 x86线程安全)。Apache错误 - 在Windows 2008 R2服务器上的Apache 2.2中安装PHP 5.5.7

按照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/无济于事。

Apache不会从httpd.conf中添加的PHP配置开始......如果我注释掉所有PHP配置Apache开始时没有问题。

Apache & PHP Configuration

编辑

Updated php.ini to forward slashes

更新php.ini中斜线

+0

您运行的是哪个版本的Apache2?如果你运行2.4以下的任何版本,这是你的问题。 –

回答

1

删除和卸载你迄今所做的一切。从阿帕奇椅http://www.apachelounge.com/download/VC11/binaries/httpd-2.4.7-win64-VC11.zip Ectract至c

下载Apache:/ apache24

下载模块modules-2.4-win64-VC11.zip http://www.apachelounge.com/download/VC11/modules/modules-2.4-win64-VC11.zip

Extrct并复制到mod_fcgid.soapache24\modules

打开命令提示符管理员

cd\ c:\Apache24\bin,在它

类型httpd.exe文件的文件夹:httpd -k install 类型:net start apache2.4

应该运行提供任何错误。从windows.php.net提取文件

下载PHP来Apache24\php

删除php.ini-production 重命名php.ini-developmentphp.ini

php.ini

取消注释行731:extension_dir = "ext"

取消对follownig行数:(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 

httpd.conf在管线218下面一行的注解和编辑到:ServerName localhost

变更线58 Listen 80更改服务器端口

httpd.conf包括这条线。:

LoadModule fcgid_module modules/mod_fcgid.so 

在httpd结尾。CONF添加以下几行:

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

在276线附近的index.html附加的index.php

启用htacess

取消评论:LoadModule rewrite_module modules/mod_rewrite.so 更换所有有 “AllowOverride无” 到“所有的AllowOverride ”。 (查找并替换全部)

相关问题