WIN2003下安裝amp(apache+mysql+php+phpmyadmin)環境_win伺服器

來源:互聯網
上載者:User
一、軟體準備:
apache_2.2.14-win32-x86-no_ssl.msi
php-5.2.11-Win32.zip
mysql-5.0.45-win32.exe
phpMyAdmin-3.2.3-all-languages.zip

二、安裝並設定環境變數:
安裝 apache_2.2.14到 c:\apache
解壓PHP5.2.11到 c:\php
安裝mysql-5.0.45到c:\mysql
解壓phpMyAdmin-3.2.3到apache的htdoc目錄
在環境變數->系統變數Path後添加 ;c:\php

三、修改設定檔:
首先是Apache的配置:
1.編輯httpd.conf 檔案
尋找 LoadModule 塊,在後面添加:
LoadModule php5_module c:\php\php5apache2_2.dll
2.尋找 DocumentRoot,將後面的第一個 <Directory></Directory>塊替換為:
<Directory "c:/php">
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
</Directory>
3.尋找 ScriptAlias 塊,在後面添加:
ScriptAlias /php/ "c:/php/"
4.尋找 DirectoryIndex 塊,修改為:
DirectoryIndex index.php default.php index.html
index.htm default.html default.htm
5.尋找 AddType 塊, 在後面添加:
AddType application/x-httpd-php .php
Action Application/x-httpd-php "c:/php/php.exe"

接著修改PHP配置:
6.php.ini-recommended 檔案改名為 php.ini,開啟php.ini檔案,尋找 extension_dir,修改為:extension_dir = "c:\php"
修改如下幾處:
extension=/ext/php_gd2.dll
extension=/ext/php_mbstring.dll
extension=/ext/php_mcrypt.dll
extension=/ext/php_mssql.dll
extension=/ext/php_mysql.dll
extension=/ext/php_mysqli.dll
extension=/ext/php_pdo_mssql.dll
extension=/ext/php_pdo_mysql.dll
7.為phpmyadmin安裝成功,修改php.ini檔案,尋找session.save_path成:
session.save_path = "c:\temp",去年前面的;號
8.拷貝php.ini到WINDOWS目錄
9.拷貝libmysql.dll到WINDOWS/SYSTEM32目錄下


四、測試php、mysql:
1.在c:\Apache\htdocs下寫index.php檔案(phpinfo();)
2.再修改index.php,測試mysql資料庫連接
五、over

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.