Poechant quick installation and configuration Tutorial: Apache + MySQL + PHP development environment in Windows 7

Source: Internet
Author: User
Tags php development environment vc9
1. Download the PHP environment set up in Windows 7 today. First, download the PHP code package and the installation package of Apache and MySQL. PHP version: php-5.3.6-Win32-VC9-x86.zip: windows. php. netdownload (Be sure to download the threadsafe version, only this has apache options .) MySQ

1. Download the PHP environment built in Windows 7 today. First, you need to download the PHP code package and the installation package of Apache and MySQL. PHP version: php-5.3.6-Win32-VC9-x86.zip: http://windows.php.net/download/ (Be sure to download the thread safe version, only this has apache options .) MySQ

1. Download

To build a PHP environment in Windows 7 today, you must first download the PHP code package and the installation package for Apache and MySQL.

PHP version: php-5.3.6-Win32-VC9-x86.zip

: Http://windows.php.net/download/

(Be sure to download the thread safe version. Only this version has the apache option .)


MySQL version: mysql Ver 14.14 Distrib 5.5.12, for Win32 (x86)

: Http://www.mysql.com/downloads/mysql/

Apache version: httpd-2.2.18-win32-x86-openssl-0.9.8r-r2.msi

: Http://httpd.apache.org/download.cgi#apache22

(Note: openssl indicates that the openssl module is included. You can use openssl to configure an SSL Secure link for Apache .)

2. Install the Apache service in Windows 7

Double-click the installation package.

3. Install MySQL in Windows 7

Double-click the installation package.

4. Configure PHP

4.1 decompress the zip package

Download PHP, decompress it to the C: root directory, and name the folder "php", that is, "C:/php ".

4.2 Modify file name

Locate php-development.ini and change its name to php. ini ".

4.3 modify the "php. ini" File

Find the following code snippet:

; On windows:; extension_dir = "ext"

To:

; On windows: extension_dir = "C:/php/ext"

Find the following code snippet:

Extension = php_curl.dllextension = php_gd2.dllextension = php_mbstring.dllextension = php_mysql.dllextension = php_pdo_mysql.dllextension = php_xmlrpc.dll

To:

Extension = php_curl.dllextension = php_gd2.dllextension = php_mbstring.dllextension = php_mysql.dllextension = php_pdo_mysql.dllextension = php_xmlrpc.dll

Find the following code snippet:

; Session. save_path = "/tmp"

To:

Session. save_path = "D:/phpsessiontmp"

Find the following code snippet:

; Upload_tmp_dir =

To:

Upload_tmp_dir = "D:/phpfileuploadtmp"

Find the following code snippet:

; Date. timezone =

To:

Date. timezone = Asia/Shanghai

5. Configure Apache

Find the httpd. conf file under the conf directory in the Apache installation directory.

Find the following code snippet:

# LoadModule vhost_alias_module modules/mod_vhost_alias.so

Insert below:

LoadModule php5_module "c:/php/php5apache2_2.dll" PHPIniDir "c:/php" AddType application/x-httpd-php. php. html. htm

Find the following code snippet:

DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

To:

DocumentRoot "E:/PHPWeb"

Find the following code snippet:

<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">

To:

<Directory "D:/PHPWeb">

Find the following code snippet:

DirectoryIndex index.html

To:

DirectoryIndex index. php index.html

5. Restart the Apache service.

Create a PHP file under "E:/PHPWeb/" and write the following content:

<? Phpphpinfo ();?>

Open "http: // localhost/" in the browser to view the php configuration page.

6. Configure MySQL

After installing MySQL, you can select all the default options as prompted to complete MySQL configuration.

7. Solution to failure to use localhost

Find the hosts file in the "C:/Windows/System32/drivers/etc" directory, and remove the "#" header indicating the annotator in the following line.

#127.0.0.1 localhost

8. You can install a program such as discuz, sablog, phpwind, or wordpress. If any problem occurs, refer to the following blog:

Http://blog.csdn.net/Poechant/archive/2011/05/14/6419895.aspx

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.