Apache + MySQL + PHP + phpMyAdmin在WinXP的簡單安裝和配置

所需軟件包:
apache_2.2.4-win32-x86-openssl-0.9.8d
mysql-5.0.22-win32
php-5.2.1-Win32
phpMyAdmin-2.10.0.2-all-languages
 
安裝步驟:
1.安裝Apache
2.安裝MySQL
3.安裝PHP
4.修改php.ini文件
     a.修改php.ini-dist文件名爲php.ini
     b.修改php.ini文件
register_globals = Off->register_globals = On
extension_dir = "./"->extension_dir = "c:\php\ext"
去掉三個前面的冒號
;extension=php_mbstring.dll->extension=php_mbstring.dll
;extension=php_mcrypt.dll->extension=php_mcrypt.dll
;extension=php_mysql.dll->extension=php_mysql.dll
5.複製php文件夾目錄下的libmysql.dll和libmcrypt.dll到c:\windows\system32目錄下。
6.修改httpd.conf,添加下面幾行:
LoadModule php5_module C:/php/php5apache2_2.dll
PHPIniDir "C:/php/"
 
DirectoryIndex index.php index.html
 
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
7.解壓縮phpMyAdmin到Apache指定的Documentroot目錄下
8.修改config.sample.inc.php文件名爲config.inc.php
9.配置config.inc.php文件(亦可以參考phpMyAdmin目錄下的Documentation.html的"Quick Install")
10.
a.手工修改(這是我的配置實例,僅供參考)
<?php
/*
 * Generated configuration file
 * Generated by: phpMyAdmin 2.10.0.2 setup script by Michal Čihař <
[email][email protected][/email]>
 * Version: $Id: setup.php 9697 2006-11-13 08:32:28Z nijel $
 * Date: Sat, 14 Apr 2007 08:27:28 GMT
 */
/* Servers configuration */
$i = 0;
/* Server localhost (cookie) [1] */
$i++;
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = true;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* End of servers configuration */
$cfg['blowfish_secret'] = '46208fe1319777.57747900';
?>

b.通過Web界面進行修改
 
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章