Home > php教程 > php手册 > body text

windows下Apache+mysql+php+phpMyAdmin的安装及配置

WBOY
Release: 2016-06-06 19:42:33
Original
956 people have browsed it

相关软件可以在这里下载哦 http://pan.baidu.com/s/1jGe1w 1、下载Apache ( httpd-2.2.25-win32-x86-no_ssl.msi ) http://httpd.apache.org/download.cgi#apache24 根据提示安装到路径(建议自定义路径),NetWork Domain和Server Name都输入 localhost(访

相关软件可以在这里下载哦   http://pan.baidu.com/s/1jGe1w


1、下载Apache  ( httpd-2.2.25-win32-x86-no_ssl.msi )

   http://httpd.apache.org/download.cgi#apache24

  根据提示安装到路径(建议自定义路径),NetWork Domain和Server Name都输入 localhost(访问时使用的域名);

安装完后打开http://localhost

windows下Apache+mysql+php+phpMyAdmin的安装及配置

      

2、下载mysql  (mysql-5.5.34-win32.msi )

   http://dev.mysql.com/downloads/mysql/5.5.html       根据提示安装到路径(建议自定义路径)

      windows下Apache+mysql+php+phpMyAdmin的安装及配置

 

3、下载PHP  (建议下载安装包而非解压包: php-5.3.27-Win32-VC9-x86.msi )

   http://windows.php.net/download/#php-5.5       根据提示安装到路径(建议自定义路径)

   

 

4、下载phpMyAdmin ( phpMyAdmin-4.0.8-all-languages.tar.gz )

   http://www.phpmyadmin.net/home_page/downloads.php       解压到要安装的路径;

      

5、复制php.ini-production并重命名为 php.ini

    将 php.ini中extension_dir= "./"(大概819行)修改成extension_dir ="D:/php5.3/ext"(php的安装路径中的ext);

  

6、复制php.exephp.iniphp5ts.dll 到 C:\Windows 下

 

7、修改Apache的conf下的httpd.conf文件中的大概在242

  DirectoryIndexindex.htmlDirectoryIndex index.html index.jsp index.php     

  找到很多LoadModule的地方130行左右),添加:

  LoadModulephp5_module D:/Develop/php5.3/php5apache2_2.dll  (php安装路径下的php5apache2_2.dll )     

  找到AddType(385行左右)添加AddType application/x-httpd-php .php

  

8、 新建一个index.php 文件,写入如些内容:           

<?php phpinfo();
?>
Copy after login

删除Apache的htdocs下的 index.html文件(可以先备份一个),

这样访问http://localhost的时候访问的就是index.php;

       windows下Apache+mysql+php+phpMyAdmin的安装及配置      

9、复制phpMyAdmin下libraries中的 config.default.php 复制到 phpMyAdmin下并重命名为 config.inc.php ;

  将 config.inc.php 大概200行处$cfg['Servers'][$i]['auth_type']= 'cookie'修改成$cfg['Servers'][$i]['auth_type'] = 'http'

 

10、修改Apache下 conf 中 httpd.conf 文件,在大概310处添加

         Alias /phpMyAdmin "D:/phpMyAdmin"  (指向phpMyAdmin安装路径);

               

11、重启Apache,访问http://localhost/phpMyAdmin ,出现403错误:

        windows下Apache+mysql+php+phpMyAdmin的安装及配置

修改httpd.conf中的大概195,把Deny from all 修改为Allow from all

      

12、如果出现以下错误,

       windows下Apache+mysql+php+phpMyAdmin的安装及配置   

     需要修改 phpMyAdmin下的 config.inc.php文件中的大概 132

    $cfg['Servers'][$i]['port']= '' $cfg['Servers'][$i]['port'] = '3306';  (MySQL的端口号)

 

13、最后即可正确访问http://localhost/phpMyAdmin ,根据提示输入数据库的用户名和密码后进入:

windows下Apache+mysql+php+phpMyAdmin的安装及配置

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!