"PHP" PHP development environment building?? Windows Chapter (apache2.2.22+php5.3.29+mysql5.7)

Source: Internet
Author: User
Tags php development environment
Always have the idea of learning PHP, but also a little bit PHP, used to be XMPP or wamp to achieve this will make many beginners blind, do not know what. Now build the development environment and explain the use of each one.

1, download Apache HTTP Server official website: http://httpd.apache.org/Download: httpd-2.2.22-win32-x86-openssl-0.9.8t.msi PHP official website:/http php.net/Download: http://windows.php.net/download This download page, PHP has a NTS version for non thread safe download: Php-5.3.29-win32-vc9-x86.zip

MySQL is too much, in fact, any version of the line, my blog has a detailed installation of MySQL instructions.


2, install Apache httpd Server This is the Web application server provided by Apache it can provide HTTP static service, support PHP needs its PHP components. This is all a fool-mounted installation:








The installation of Apache is complete. Open the browser and enter http://localhost:80 on the address bar to see it works! to show success.

Then you can see the icon in the lower right corner: the Green Drop


3, install PHP: will download the zip package, unzip to any path, I unzipped the path is: D:\PHP-5.3.29-install


4, the Apache + PHP + MySQL integration run

Apache is an HTTP Web server that needs to add a component to support PHP

A) first modify the Apache configuration file so that Apache supports parsing PHP files. Apache configuration files are httpd.conf in the Conf directory of the Apache installation directory. Our path here is: D:\Program Files\apache software foundation\apache2.2\conf Open the Conf configuration file to locate 128 rows, in fact, there is no matter here and there:

LoadModule php5_module "D:/php-5.3.29-install/php5apache2_2.dll" Phpinidir "D:/php-5.3.29-install" AddType application/x-httpd-php. php. html. htm
Add this in, and then we open the PHP extract directory that is the installation directory to see if there is php5apache2_2.dll this file.



From the above you can see that the php5.3.29 version also supports the Apache2.4 version ... Did you see it?


b) Continue to modify the configuration file to find


DirectoryIndex index.html

Modified to:


DirectoryIndex index.php index.html

This means that the site below the homepage is set to index.php or index.html in fact this can be set or not set.


c) Modify the two nodes of the Apache Service Site Directory documentroot and directory.

DocumentRoot "D:/program Files/apache software Foundation/apache2.2/htdocs"


Modify it to a directory on your disk, which is the directory where the Apache server is looking for PHP files


Apache modified, then modified PHP:

Rename the php.ini-development to php.ini as a PHP configuration file. Modify PHP.ini

1. Set the specific directory for the PHP expansion pack to find

; On Windows:
; Extension_dir = "ext"

Change to (value is the directory of Ext folder)

; On Windows:
Extension_dir = "D:/php-5.3.29-install/ext"



2. Turn on the library function to locate the row of the library you want to open

; Extension=php_curl.dll

; Extension=php_gd2.dll

; Extension=php_mbstring.dll

; Extension=php_mysql.dll

; Extension=php_xmlrpc.dll

Remove the preceding semicolon (note) and change to

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 to find

;d Ate.timezone =

Switch

Date.timezone = Asia/shanghai


Configured here, in the directory configuration of a new index.php file, enter and then browser input localhost will be able to see the PHP information, indicating that the installation was successful.

  • 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.