apache2.0.39 php4.2.3在windowsXP下模組方式搭建.

來源:互聯網
上載者:User
apache|window WindowsXP+Apache2.0.39+php-4.2.3-dev
源檔案下載:
1. http://www.apache.org/dist/httpd/binaries/win32/
下面的 apache_2.0.39-win32-x86-no_ssl.msi
或者apache_2.0.39-win32-x86-no_ssl.exe

(A full setup package (.exe) containing the Win9x/WinNT
Microsoft System Installer installer is available.
If the Microsoft System Installer is already on the machine,
there is no need to download the .exe, save yourself 3MB and
download the .msi package.)

2. http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

安裝伺服器和php:
1.選中下載的apache的msi檔案,單擊右鍵選擇安裝,預設即可
2.解壓縮php4-win32-STABLE-snapshotnumber.zip,得到
php4-win32-STABLE-snapshotnumber檔案夾,重新命名為php,並
複製到c:下.
3.將c:php下的php4ts.dll複製到c:wondowssystem32下(即PATH環境變數的
第一個路徑名)
(4.將c:phpdll下所有.dll檔案複製到c:wondowssystem32下.)見下面
配置php.ini和http.conf
1.將c:phpphp.ini-dist複製到c:windows下,改名為php.ini
2.開啟php.ini檔案,找到'doc_root='項,置為
doc_root="C:Program FilesApache GroupApache2htdocs"
即在這個目錄(apache伺服器主文件目錄)下的php檔案才可以執行.
找到'extension_dir='項,置為
extension_dir ="C:PHPsapi"這裡面有擴充庫的.dll檔案(注意,
當網頁不能執行,給出錯誤不能找到.dll檔案時,將c:phpsapi下所有
.dll複製到c:windowssystem32下).
儲存php.ini並退出編輯.
3.開啟c:progame filesapache groupapache2confhttpd.conf
確保servername 設定好(最起碼localhost),
找到一系列 LoadModule開頭的指令項,在最後加入如下內容:

LoadModule php4_module c:/php/sapi/php4apache2.dll
<FilesMatch ".php$">
SetOutputFilter PHP
</FilesMatch>

接下來找到AddTYpe application/x-tar.tgz 指令,在其後加入:

AddType application/x-httpd-php .php

儲存httpd.conf,並退出編輯.
重啟apache2服務
可以在命令列方式下鍵入:
net stop apache2
net start apache2


在....htdocs/目錄下加入.php檔案如index.php,在瀏覽器地址欄內鍵入
http://localhost/index.php
試試看,希望你好運!!



相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.