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
安裝服務(wù)器和php:
1.選中下載的apache的msi文件,單擊右鍵選擇安裝,默認(rèn)方式即可
2.解壓縮php4-win32-stable-snapshotnumber.zip,得到
php4-win32-stable-snapshotnumber文件夾,重命名為php,并
復(fù)制到c:下.
3.將c:php下的php4ts.dll復(fù)制到c:wondowssystem32下(即path環(huán)境變量的
第一個(gè)路徑名)
(4.將c:phpdll下所有.dll文件復(fù)制到c:wondowssystem32下.)見下面
配置php.ini和http.conf
1.將c:phpphp.ini-dist復(fù)制到c:windows下,改名為php.ini
2.打開php.ini文件,找到'doc_root='項(xiàng),置為
doc_root="c:program filesapache groupapache2htdocs"
即在這個(gè)目錄(apache服務(wù)器主文檔目錄)下的php文件才可以執(zhí)行.
找到'extension_dir='項(xiàng),置為
extension_dir ="c:phpsapi"這里面有擴(kuò)展庫的.dll文件(注意,
當(dāng)網(wǎng)頁不能執(zhí)行,給出錯(cuò)誤不能找到.dll文件時(shí),將c:phpsapi下所有
.dll復(fù)制到c:windowssystem32下).
保存php.ini并退出編輯.
3.打開c:progame filesapache groupapache2confhttpd.conf
確保servername 設(shè)置好(最起碼localhost),
找到一系列 loadmodule開頭的指令項(xiàng),在最后加入如下內(nèi)容:
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服務(wù)
可以在命令行方式下鍵入:
net stop apache2
net start apache2
在....htdocs/目錄下加入.php文件如index.php,在瀏覽器地址欄內(nèi)鍵入
http://localhost/index.php
試試看,希望你好運(yùn)!!