windows下apache+php+mysql配置

时间:2022-10-22 07:49:09

apache:版本apache_2.0.63-win32-x86-no_ssl.msi,安装后报端口冲突,修改httpd.conf中端口为8080,报“No installed service name Apache2”。原因:winxp下apache默认不安装serverName。解决:进bin目录,apache.exe -k install -n apache2即可。

php:版本php-5.0.4-installer.exe,选apache模式,提示未能写入apache的httpd.conf,需手动写入,安装后文件夹中内容很少,删除。用php-5.2.4-Win32.zip,php有两种方式,CGI模式与apache模块。php5+apche2的配置:

CGI模式,修改httpd.confi

ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php

Action application/x-httpd-php "/php/php-cgi.exe"

Apache module模式,修改httpd.conf

LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php

PHPIniDir "C:/php"

mysql:版本mysql-5.0.18-win32.zip,安装后,修改php.ini,去掉extension=php_mysql.dll,extension=php_mysqli.dll前的";"修改extension_dir = "D:\PHP\ext",在windows环境变量PATH中增加D:\php和D:\php\ext,并重启电脑。

phpmyadmin:版本phpMyAdmin-2.5.6.zip,输入index.php提示"can not load mysql module",是环境变量未生效,需重启机器;提示“#1045 - Access denied for user 'root'@'localhost' (using password: NO) ”,修改phpmyadmin目录中config.inc.php的mysql密码。