Build a PHP development environment in Windows _ PHP Tutorial

Source: Internet
Author: User
Tags php development environment vc9
Build a PHP development environment in Windows. There are many Integrated PHP development environments, such as XAMPP and AppServ ...... the PHP environment can be set up with one-click installation. However, this installation method is not flexible enough, and the free combination of software is not convenient. There are many PHP integrated development environments, such as XAMPP and AppServ ...... you only need to install the PHP environment with one click. However, this installation method is not flexible enough, the free combination of software is not convenient, and it is not conducive to learning. Therefore, I still like to build a PHP development environment manually. you only need to install the module or upgrade the software without affecting other software, very convenient.

  

  • Apache httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
  • PHP php-5.3.10-Win32-VC9-x86.zip
  • MySQL mysql-5.5.20-win32.msi

  

    : Double-click installation, which is no different from installing other Windows software. when you enter Server Infomation, there is no special rule as long as the entered information conforms to the format.

: Extract php-5.3.10-win32-vc9-x86.zip to a directory.

  

Install MySQL: Double-click the installation. to change the installation directory, select Custom in Choose Setup Type.

3. integrate Apache + PHP + MySQL

Apache: first, modify the Apache configuration file so that Apache can parse the php file. The Apache configuration file is httpd. conf in the conf Directory of the Apache installation directory.

1. Apache can parse the php file and find it in the configuration file.

# LoadModule vhost_alias_module modules/mod_vhost_alias.so

Add in the next line (the green position depends on the directory where PHP is located)

LoadModule php5_module""
PHPIniDir""
AddType application/x-httpd-php. php. html. htm

2. find

DirectoryIndex index.html

Change

DirectoryIndexIndex.html

3. modify the Directory of the Apache site and find it in the configuration file (the directory for Apache installation is different and the displayed value is different)

DocumentRoot""

Change

DocumentRoot""

      

Find

         ">

Change

         ">

PHP: rename php. ini-development to php. ini as the PHP configuration file. Modify php. ini

1. set the Directory of the PHP extension package and find

; On windows:
; Extension_dir = "ext"

Change to (the value is the Directory of the ext folder)

; On windows:
Extension_dir =""

2. enable the corresponding library function and find the row of the library to be enabled

; Extension = php_curl.dll

; Extension = php_gd2.dll

; Extension = php_mbstring.dll

; Extension = php_mysql.dll

; Extension = php_xmlrpc.dll

Remove the semicolon (comment) and change it

Extension = php_curl.dll

Extension = php_gd2.dll

Extension = php_mbstring.dll

Extension = php_mysql.dll

Extension = php_xmlrpc.dll

      

3. set the time zone and find

; Date. timezone =

Change

Date. timezone = Asia/Shanghai

       

After the configuration is complete, check whether the configuration is successful. Restart Apache, create the file index. php in the site directory, and enter the following content:

     ();
?>

Open the browser and enter http: // localhost. if the following content is displayed, the installation is successful and MySQL is associated successfully.

Bytes. However, this installation method is not flexible enough, and it is inconvenient to freely combine the software...

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.