通過(guò)一個(gè)小時(shí)的研究和設(shè)置.實(shí)現(xiàn)了最新的 PHP 5.0 + MYSQL 5.0 + WIN2003. ========================= 相關(guān)軟件均可以在 WWW.SKYCN.NET 下載. MYSQL 5.0 FOR WINDOWS ========================= 首先安裝 MYSQL .本來(lái)以為新版本的安裝界面應(yīng)該會(huì)花哨點(diǎn). 推薦安裝在獨(dú)立的 NTFS 分區(qū)上.比如我服務(wù)器的 F盤.只放服務(wù)器軟件. 然后進(jìn)入 F:\MYSQL\BIN\ 鼠標(biāo)雙點(diǎn) winmysqladmin.exe 到這里.MYSQL就安裝完畢了.如果不明白請(qǐng)參看深空同學(xué)的相關(guān)文章. ========================= 下面安裝 PHP 5.0 其實(shí)沒(méi)什么安裝不安裝的.解壓縮文件.推薦放到 到這里就應(yīng)該進(jìn)入關(guān)鍵步驟了. COPY F:\PHP\Php.ini-dist C:\Windows 如果是 WINDOWS 2000 就是: C:\WINNT\ 然后復(fù)制 PHP 目錄下 DLLS 目錄里的所有文件到 SYSTEM32 目錄. COPY F:\PHP\dlls\*.* C:\Windows\System32\ 如果是 WINDOWS 2000 就是: C:\WINNT\System32\ 繼續(xù).復(fù)制PHP目錄下 php4ts.dll 文件到 System32 目錄里. COPY F:\PHP\php4ts.dll C:\Windows\System32\ ========================= 到這里復(fù)制工作全部完成.下面修改 C:\Windows\Php.ini 文件. 請(qǐng)注意.5.0的版本修改與4.0并不完全相同.需要注意的如下. 查找 extension_dir 字串.修改為你 PHP 目錄里 extensions 的路徑. ; Directory in which the loadable extensions (modules) reside. 相關(guān)官方技術(shù)資料: Edit your php.ini file: You will need to change the ‘extension_dir‘ setting to If you are using OmniHTTPd, do not follow the next step. Choose which extensions you would like to load when PHP Note that on a new installation it is advisable to first get On PWS and IIS, you can set the browscap.ini More information on the capabilities of browscap can be found here: www./manual/en/function.get-browser.php Note that the mibs directory supplied with the Windows distribution 然后與 PHP 4.0 不同的是.需要修改 Php.ini 文件里的如下內(nèi)容: 即: ; cgi.force_redirect is necessary to provide security running PHP as a CGI under 切記如上修改的地方.否則PHP 5.0是無(wú)法運(yùn)行的.會(huì)有如下提示. Security Alert! The PHP CGI cannot be accessed directly. 相關(guān)官方技術(shù)資料: !NOTE!: Since 4.1.2, the php.ini setting cgi.force_redirect defaults to ‘1‘ cgi.force_redirect = 0 If it doesn‘t work immidiately, make sure you have the php.ini file in the 接下來(lái)修改 Php.ini 文件關(guān)于 MYSQL 5.0 的設(shè)置. 查找 [MySQL] 字段內(nèi)的內(nèi)容.修改如下. mysql.default_port = 3306 mysql.default_host = localhost mysql.default_user = root mysql.default_password = Wjwsfjn29szjwh~mysql 修改到這里就可以讓 Php 與 MYSQL 關(guān)聯(lián)了. 查找 extension=php_mysql.dll 字串.刪除掉前面的 ; 號(hào) extension=php_mysql.dll 請(qǐng)注意.如果不啟動(dòng) PHP 對(duì) MYSQL 模塊支持.將無(wú)法使 PHPMYADMIN 正常工作.將提示: cannot load MySQL extension, please check PHP Configuration 相關(guān)官方技術(shù)資料: To connect to a MySQL server, PHP needs a set of MySQL functions called "MySQL extension". ========================= 到這里應(yīng)該就沒(méi)有很大問(wèn)題了.如果有配置基礎(chǔ)的朋友應(yīng)該完全可以理解了. |
|