2013-12-20 95 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 」。 (查找並替換全部)

相關問題