手记

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]michal@cihar.com[/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界面进行修改

[url]http://yourdomain/phpmyadmin/script/setup.php[/url]进行配置

 

 

©著作权归作者所有:来自51CTO博客作者sharp.zeng的原创作品,如需转载,请注明出处,否则将追究法律责任

phpmysqlapache网络


0人推荐
随时随地看视频
慕课网APP