close

Step I:

(1) 安裝 Appserv 但不要裝 PHP & MySQL (本文假設為C:\AppServ\Apache2.2)

Step II:

(1) 下載 PHP (本文為PHP5.4.6.zip)
(2) 解壓縮 PHP 到希望的路徑 (本文為 C:\AppServ\PHP546) 
(3) 設定 Apache 的 http.conf (應在 /Apache2.2 / 下) :
> 在 LoadModule 區塊最後加入

LoadModule php5_module "C:\AppServ\PHP546/php5apache2_2.dll"
AddHandler application/x-httpd-php .php
# configure the path to php.ini(php.ini 的路徑)
PHPIniDir "C:\AppServ\PHP546"

> 在 http.conf 最後加入

  AddType application/x-httpd-php .php
  AddType application/x-httpd-php .php3
  AddType application/x-httpd-php-source .phps


> 變更網頁根附錄 (如果想變的話)
* Apache 預設為 DocumentRoot 安裝路徑/Apache2.2/htdocs
* Appserv 預設為 DocumentRoot "C:/AppServ/www"
* 變更方法 :
  - 更改 DocumentRoot "喜歡的路徑"
  - 將預設的 改成
    

> 做以下檢查
* 尋找「Options Indexes FollowSymLinks」,拿掉「Indexes」,避免沒有放置index的網頁資料夾被瀏覽

* 尋找「DirectoryIndex」,加入「index.php」、「index.htm」,讓Apache認識這兩種首頁。

* 尋找「mod_rewrite.so」,拿掉前方的「#」→這個和動態網頁的短檔名設定有關。

* 尋找

Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all

修改為

Options FollowSymLinks
AllowOverride All →這個是配合開啟「mod_rewrite.so」,和動態網頁的短檔名設定有關。
Order deny,allow
Deny from all


* 尋找,將其下 Deny from all 改為 Allow from all


(4) 設定 php.ini :
> 另存 php.ini-production 為 php.ini

> 設定 extension_dir = "C:/AppServ\php546\ext" (以本文路徑為例)

> 打開以下 extensions
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_exif.dll
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_openssl.dll
extension=php_pdo_mysql.dll
extension=php_sockets.dll
extension=php_sqlite3.dll
and 其他想開的extension

> 檢查 Error reporting 是否開啟
display_errors = On
display_startup_errors = On

(5) Restart Apache for testing

Step III:
安裝 MySQL Community Server 到喜歡目錄下


Step IV:
(1) 如果想要 Upgrade phpMyadmin
Simply copy ./config.inc.php from your previous installation into the newly unpacked one. 
Configuration files from old versions may require some tweaking as some options have been changed or removed. For compatibility with PHP 6, remove a set_magic_quotes_runtime(0); statement that you might find near the end of your configuration file.

You should not copy libraries/config.default.php over config.inc.php because the default configuration file is version-specific.




[Reference]
> http://elesson.tceb.edu.tw/~yunol/eec.thu_course01/day1.html
> http://www.php.net/manual/en/install.windows.manual.php
> http://www.phpmyadmin.net/localized_docs/en_GB/Documentation.html#upgrading
> http://phpbb-tw.net/phpbb/viewtopic.php?t=36012

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 Foxbrush 的頭像
    Foxbrush

    Foxbrush

    Foxbrush 發表在 痞客邦 留言(1) 人氣()