9527 寫:以上文字是剛剛在PHP的install.txt中發現的
我想,我的網站不能執行phpbb的安裝畫面應該是沒有啟動PHP4模組吧
沒錯~正確觀念~只是你少看到一段~
這是給APACHE 1.3.X的使用者看的~
你只要在編輯軟體中分別尋找\r
LoadModule
AddModule
AddType
你就會知道要放在哪~
APACHE 2 必須使用這個ISAPI
php4apache2.dll
而非教學的
php4apache.dll
PHP的說明文件清楚寫到~
Installing PHP on Windows with Apache 1.3.x
------------------------------------------------------------
ATTENTION: Apache 2 Users
At this time, support for Apache 2 is experimental. It's
highly recommended you use PHP with Apache 1.3.x and not
Apache 2. Documentation for installing Apache 2 on windows
can be seen here:
http://www.php.net/manual/en/install.apache2.php
With the basic difference being that when installing as a
module you'll use php4apache2.dll instead of php4apache.dll
Both files are included within this release.
------------------------------------------------------------
而你是屬於虛線包起來的部分
不過在我印象中~只是ISAPI的檔案換一個就OK了~
另外~安裝PHP有兩種方式~
1.用ISAPI去執行
安裝方式是說明文件的這段\r
Installing PHP for Apache as module
2.用CGI的方式執行~
安裝方式是說明文件的這段\r
Installing PHP for Apache as CGI binary
APACHE用CGI的方式應該比較簡單~
但CGI的方式是執行一次程式就需要一個執行序
ISAPI則是共用一個執行序~
兩種方式各有優缺點~~我之前文章有說過了~在此不多提
另外~老實說~
不建議用APACHE 2~
真的不穩~~
怕你找不到APACHE 2 安裝PHP4的文件~在這裡附上PHP官網的文件\r
http://www.php.net/manual/en/install.wi ... pache2.php
文中提到~
Installing as a CGI binary
You need to insert these three lines to your Apache httpd.conf configuration file to set up the CGI binary: Example 6-5. PHP and Apache 2.0 as CGI
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
# For PHP 4
Action application/x-httpd-php "/php/php.exe"
# For PHP 5
Action application/x-httpd-php "/php/php-cgi.exe"
Installing as an Apache module
You need to insert these two lines to your Apache httpd.conf configuration file to set up the PHP module for Apache 2.0: Example 6-6. PHP and Apache 2.0 as Module
# For PHP 4 do something like this:
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php
# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
紅色是CGI方式執行PHP
藍色是ISAPI方式執行PHP
看完文件後才發現~
原來PHP.INI不一定要放在系統目錄裡~
只要在httpd.conf裡多下一行
PHPIniDir "C:/php"
那麼~php.ini就可以放在\r
c:/php/php.ini
因為這個問題~今天又讓自己多學一點