Apache PHP phpMyAdmin
基本配置
一、软件版本:
a
、Apache
1
、下载地址:[url]http://httpd.apache.org/download.cgi[/url]
2
、版本:apache_ 2.2.8 -win32-x86-no_ssl.msi
b
、php
1
、下载地址:[url]http://www.php.net/downloads.php[/url]
2
、版本:php- 5.2.5 -Win32.zip
c
、phpmyadmin
1
、下载地址:[url]http://www.phpmyadmin.net/home_page/downloads.php[/url]
2
、版本:phpMyAdmin- 2.11.5 .1-all-languages.zip
d
、mysql
1
、下载地址:[url]http://download.mysql.cn/[/url]
2
、版本:mysql- 5.0.22 -win32
二、目录结构:
D:\Inetpub
D:\Inetpub\apache
D:\Inetpub\php
D:\Inetpub\websites
D:\Inetpub\websites\phpmyadmin
D:\Inetpub\mysql
三、安装配置:
a
、Apache
配置改D:\Inetpub\apache\conf\httpd.conf文件;
ServerRoot "D:/Inetpub/apache"
Listen 80
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
#
自定义
LoadModule php5_module "D:/Inetpub/php/php5apache2_2.dll"
PHPIniDir "D:/Inetpub/php"
User daemon
Group daemon
ServerAdmin [email][email protected][/email]
#
自定义
DocumentRoot "D:/Inetpub/websites"
#
自定义
Options FollowSymLinks
AllowOverride None
Order deny,allow
#Deny from all
Allow from all
DirectoryIndex index.php index.html
#
自定义
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
AddType application/x-httpd-php-source .phps
Order allow,deny
Deny from all
Satisfy All
ErrorLog "logs/error.log"
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
CustomLog "logs/access.log" common
ScriptAlias /cgi-bin/ "D:/Inetpub/apache/cgi-bin/"
AllowOverride None
Options None
Order allow,deny
Allow from all
DefaultType text/plain
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
自定义
AddType application/x-httpd-php .php
AddType application/x-httpd-php .html
ErrorDocument 500 "The server made a boo boo."
ErrorDocument 404 /missing.html
ErrorDocument 404 "/cgi-bin/missing_handler.pl"
ErrorDocument 402 [url]http://localhost/subscription_info.html[/url]
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
B
、php
另存:D:\Inetpub\php\php.ini-recommended文件为php.int,修改php.ini文件:
(1)、设置扩展路径
;extension_dir = "./"
去掉前面”;”,改为extension_dir = "D:\Inetpub\php\ext"
(2)、查找 extension 去掉以下项目前的 “;”号;
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mhash.dll
extension=php_mime_magic.dll
extension=php_ming.dll
extension=php_mysql.dll
extension=php_xmlrpc.dll
增加:extension_dir = "D:\Inetpub\php\ext"
C
、phpmyadmin
1
、另存:D:\Inetpub\websites\phpmyadmin\config.sample.inc.php文件为config.int.php,配置该文件
$cfg['blowfish_secret'] = 'alan.xue';
/* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
$i = 0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = '123';
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
?>
2
、或者另存:D:\Inetpub\websites\phpmyadmin\libraries\ config.default.php文件到D:\Inetpub\websites\phpmyadmin\目录下,改为 config.ini.php 配置该文件相应项
四、环境变量
1
、编辑系统变量:
变量名:Path
变量值:D:\Inetpub\php;D:\Inetpub\php\ext;
五、测试
[url]http://localhost/phpmyadmin[/url]