软件环境(windowsXP):Apache2.0.55 + PHP4.3.5 + MySQL4.0.24 + phpMyAdmin-2.5.6-rc2
配置方法:
1、复制%PHP_HOME%\php4ts.dll文件到%Apache_HOME%\bin\php4ts.dll;
2、修改%Apache_HOME%\conf\httpd.conf查找:
#
# Commonly used filename extensions to character sets. You probably
# want to avoid clashes with the language extensions, unless you
# are good at carefully testing your setup after each change.
# See http://www.iana.org/assignments/character-sets for the
# official list of charset names and their respective RFCs.
#
在后面加上:AddDefaultCharset GB2312
即:
#
# Commonly used filename extensions to character sets. You probably
# want to avoid clashes with the language extensions, unless you
# are good at carefully testing your setup after each change.
# See http://www.iana.org/assignments/character-sets for the
# official list of charset names and their respective RFCs.
#
AddDefaultCharset GB2312
3、在文件末尾加上:
LoadModule php4_module "%PHP_HOME%/sapi/php4apache2.dll"
AddType application/x-httpd-php .php
通过上述配置,将php与apche2整合在一起了,即apache2能解析*.php文件了。
测试配置:在%Apache_HOME%\htdocs\目录下新建test.php文件,内容如下:
<? echo phpinfo(); ?>
启动apache2,输入:http://localhost/test.php,就能看到php的相关配置信息的页面。
4、将下载的phpMyAdmin-2.5.6-rc2压缩包解压到%Apache_HOME%\htdocs\下。
5、打开phpMyAdmin-2.5.6-rc2目录下的config.inc.php文件,
查找:
$cfg['Servers'][$i]['user'] = 'root'; // MySQL user
$cfg['Servers'][$i]['password'] = ''; // MySQL password (only needed
上述代码,设置连接MySQL的用户名和密码。
查找:
// Default language to use, if not browser-defined or user-defined
$cfg['DefaultLang'] = 'en-iso-8859-1';
更改为:
// Default language to use, if not browser-defined or user-defined
$cfg['DefaultLang'] = 'zh';
查找:
$cfg['DefaultCharset'] = 'iso-8859-1';
更改为:
$cfg['DefaultCharset'] = 'gbk';
保存config.inc.php文件。
6、将%PHP_HOME%目录下的php.ini-dist文件复制到系统目录(C:\WINDOWS),并将php.ini-dist修改为php.ini,打开php.ini文件,查找extension_dir,将该值更改为%PHP_HOME%\extensions(PHP5为:%PHP_HOME%\ext);查找;extension=php_mysql.dll,将前面的";"去掉;再将%PHP_HOME%根目录下的libmysql.dll和extensions(PHP5为:ext)目录下的php_mysql.dll复制到C:\WINDOWS\system32下。
7、启动apache2,输入:http://localhost/phpMyAdmin-2.5.6-rc2,就能对mysql数据库进行相关操作了。
posted on 2006-05-29 16:30
想飞的鱼 阅读(331)
评论(0) 编辑 收藏 所属分类:
database