Win2000安裝Apache PHP4 MySQL
來源:互聯網
上載者:User
一、 安裝APACHE1.3.9(配置conf目錄下的httpd.conf檔案)
1.
#BindAddress * 改為 BindAddress 127.0.0.1
#Servername new.host.name 改為 Servername localhost
2.
讓你的APACHE來支援PHP4.加上下面這麼幾句:
ScriptAlias /php4/ "C:/php4/"
AddType application/x-httpd-php4 .php
AddType application/x-httpd-php4 .php3
AddType application/x-httpd-php4 .php4
Action application/x-httpd-php4 "/php4/php.exe"
3.
設定Apache虛擬目錄,加入以下行:
Alias /test/ "c:/php3/test/"
Alias /jjjj/ "d:/timenet/"
4.
增加預設啟動文件:
DirectoryIndex index.html
DirectoryIndex index.htm
DirectoryIndex index.php
DirectoryIndex index.php3
DirectoryIndex index.php4
5.
測試檔案info.php:
<? phpinfo(); ?>
在瀏覽器中輸入http://localhost/info.php
二、php4安裝(php-4.0.2pl2-Win32.zip)
1.將軟體包解壓到c:php4下。
2. 再將目錄下的所有dll檔案拷到c;winntsystem32下,不要覆蓋已有的dll檔案。將目錄下的php.exe和php.ini-dist兩個檔案拷到c:winnt下;
3. 將winntphp.ini-dist改名為php.ini,並找到;Windows Extensions項將
extension_dir =c:php4
extension=php_zlib.dll
extension =php_ldap.dll
extension =php_zlib.dll
extension =php_calendar.dll
extension =php_exif.dll
extension =php_ftp.dll
extension =php_mssql70.dll (這一項不要加,沒有MSSQL7.0呀)
extension =php_imap.dll
有就去掉前面的分號,沒有就自己加上。這個部分容易出現錯誤,是因為在php.ini檔案中指定載入了無效的或者不存在的php_*.dll檔案,載入這些錯誤資訊還可能導致瀏覽器尋找不到伺服器。
4. PHP.INI其他設定:
asp_tags = On ; 允許使用ASP風格的標記
upload_max_filesize = 2097152;上傳檔案的最大位元組 (關於mysql的設定)