PHP Development Environment Configuration for Win32 (X86)

Source: Internet
Author: User
Tags apache download apache php php server php development environment

In view of the current development of PHP Web page, the author tried to build a PHP development environment, but also refer to many of the online predecessors of the article, the final configuration, the sharing of experience, but also called on colleagues to share their experience to the Internet, to help more people, so that more network resources to fly a while, nonsense not much to say, The configuration environment starts now (for Win32):

1. Software Preparation

    • VC: Provide the environment of PHP Server Building, here based on VC11, provide address: http://www.microsoft.com/en-us/download/details.aspx?id=30679,VC11 (vsu_4\ Vcredist_x86.exe)

Select the following version, download, download complete, run (Administrator rights), click Next until completed, that is, the successful installation.

    • Apache Server: Apache2.4.16 (httpd-2.4.16-win32-vc11.zip) website: http://www.apachelounge.com/download/VC11/,

    • PHP5.5.29 (php-5.5.29-win32-vc11-x86.zip) Here we choose a thread-safe version, URL: http://windows.php.net/download/#php -5.5-ts-vc11-x86,

    • MySQL5.6.26 (mysql-5.6.26-win32.zip), url: http://dev.mysql.com/downloads/mysql/, here is the free install version, the mark in the figure is the software we want to download

Finally put all the software in the folder, unzip the compressed file, put it anywhere, as long as the storage space (C, D, E, F ... All), for ease of operation, I put it in a folder,

2. Start the installation

    • Install VC11:

      Double click to open, click on a number of next steps until the installation is successful OK

    • Installing Apache2.4

Apache download is a zip package, extracted to the appropriate location after decompression, here with the software ordinal identification: Apache2.4

    • Installing PHP5.5

PHP after download is also a zip package, the same decompression to the appropriate location, where the software serial number identification: php5.5

    • Installing MySql5.6

MySQL chose the free installation version, it is more simple, the same is extracted to the appropriate location, here with the software serial number identification: mysql5.6

3. Configuring the Environment

    • Configure PHP

Copy the C:\Program files\php5.5\php.ini-production and rename it to php.ini;

Add C:\Program files\php5.5 and C:\Program files\php5.5\ext to the environment variable path (select Computer, right-click Properties--Advanced system settings-environment variables--System variables, Find path, edit, add after;), such as:

    • Configure Apache

Open the httpd.conf file inside C:\Program files\apache24\conf with Notepad, find ServerRoot, modify ServerRoot "C:/apache24" and ServerRoot "c:/ Program Files/apache24 "(This is where you put the Apache installation package after you unzipped it).

Find the #servername www.example.com:80, and modify it to ServerName www.example.com:80 (remove the previous #).

Find DocumentRoot "C:/apache24/htdocs" and modify it to DocumentRoot "C:/Program Files/apache24/htdocs" (if same, don't change).

Find <directory "C:/apache24/htdocs" >, modify it to <directory "C:/Program Files/apache24/htdocs" > (if same, do not change).

Find DirectoryIndex index.html, modified to DirectoryIndex index.html index.php index.htm (Here we have added index.php index.htm).

Find scriptalias/cgi-bin/"c:/apache24/cgi-bin/", modify to Scriptalias/cgi-bin/"C:/Program files/apache24/cgi-bin" (if Same, not change it).

Find <directory "C:/apache24/cgi-bin" > Modify to <directory "C:/Program files/apache24/cgi-bin/" > (if same, do not change).

Add LoadModule php5_module "C:/Program Files/php5.5/php5apache2_4.dll" to the last line in httpd.conf to let Apache support PHP.

Add AddType application/x-httpd-php. php. html. htm

Add Phpinidir "f:/phptools/php5.5" (Tell Apache PHP.ini location)

At this point, httpd.conf configuration is complete, save httpd.conf.

    • Installing Apache Services

Under the command line (that is, cmd running under Administrator privileges), enter the directory of your Apache httpd.exe files, in my case, I extracted the location after: C:\Program Files\apache24\bin, in the cmd command line input: cd \ C Program Files\apache24 \ Bin, which enters the file directory,

Install below, enter code: HTTPD-K Install (Apache service is installed in the system)

    • Open PHP Extensions

Use Notepad to open the C:\Program files\php5.5 in the php.ini, will; Extension_dir = "ext" modified to Extension_dir = "ext" (remove the semicolon in front of extension)

Change the Extension=php_mbstring.dll to Extension=php_mbstring.dll (remove the semicolon in front of the extension, which is the PHP multibyte string extension)

Change the Extension=php_mysql.dll to Extension=php_mysql.dll (remove the semicolon in front of the extension)

Change the Extension=php_mysqli.dll to Extension=php_mysqli.dll (remove the semicolon in front of the extension)

    • MySQL Environment configuration

Similar to the PHP environment configuration described above, after extracting the MySQL installation package, take my example: C:\Program files\mysql5.6\mysql-5.6.26-win32\bin path added to environment variables

    • Turn on the MySQL service,

Find the MySQL service, and turn on (if there is a problem, unable to open the service, please go to the registry, modify the relevant information, according to the directory in the diagram to find their corresponding program file path, to modify):

    • Open Apache Service

As with the previous start of the MySQL service,

At this point, the PHP installation environment is set up, but also in the configuration of the environment in the process of reference to the predecessors of the things to get the experience, if you have problems, you can leave a message, definite reply! With this article to encourage!

Reference article link: http://jingyan.baidu.com/article/154b46315242b328ca8f4101.html

http://blog.csdn.net/z_cf1985/article/details/22454749

PHP Development Environment Configuration for Win32 (X86)

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.