PHP development environment setup in Windows environment-full text tutorial

Source: Internet
Author: User
Tags php development environment

Build a PHP Development Environment Based on Windows (apache + mysql + php)

I. PreparationsApache2.2.11: http://www.apache.org MySQL5.0: http://www.mysql.com PHP5.2.9: http://www.php.net 2. Configure PHP1, unzip php-5.2.9-win32.zip to a specified location (such as C: \), and change it to php [such as] 2. Open the php folder, and set php. ini-dist is renamed to php. ini [Example] 3. Double-click php. ini, enter php. ini editing status 4. Find extension = php_gd2.dll and extension = php_mysql.dll, remove the semicolon (;) in front of it, and save the settings, close the file [for example] 5. Copy php_gd2.dll and php_mysql.dll in the php/ext folder to c: \ windows \ system32 6. Copy libmysql in the php folder. dll to c: \ windows \ system32 7. save settings 3. Install MySQL1. double-click the MySQL installation file. The page shown in Figure 2 is displayed. select the installation type: Typical (Typical installation) and Custom (Custom installation). 3. the system prompts you to follow the typical installation configuration as shown in Figure 4. installation progress bar 5. advertisement 1 6. advertisement 2 7. ask if you want to configure the MySQL Server 8. welcome Page of the MySQL Server Configuration Wizard 9. select the configuration type: Detailed (Detailed configuration), Standard (Standard configuration) 10. select the Server type: Developer Machine (development and testing class, MySQL occupies a small amount of resources), Server Machine (Server type, MySQL occupies a large amount of resources) "," Dedicated MySQL Server Machine (Dedicated database Server, MySQL occupies all available resources )"

11. select the MySQL Database purpose: Multifunctional Database (Universal multi-function type, good) "and" Transactional Database Only (server type, dedicated to transaction processing, General) "," Non-Transactional Database Only (non-transaction processing type, relatively simple, mainly used for monitoring and recording, the support for MyISAM data type is limited to Non-transactional)

12. configure InnoDB Tablespace to select a bucket for the InnoDB database file. If you modify the bucket, remember the location and select the same place for the reinstallation. Otherwise, the database may be damaged. 13. select the average mysql access volume of your website and the number of connections at the same time. For example, "demo-support (DSS)/OLAP (about 20 connections)" and "Online Transaction Processing (OLTP) (about 500) "," Manual Setting (manually set, enter a number by yourself) "14. whether to enable TCP/IP connection and set the port. If it is not enabled, you can only access the MySQL database on your own machine 15. set the default MySQL database language encoding 16. select whether to install MySQL as a windows Service, specify the Service Name (Service ID Name), and add the mysql bin directory to Windows PATH 17. ask if you want to modify the password of the default root user (Super Management) (null by default) 18. confirm that the settings are correct. If any error occurs, press "Back" to return for the check. Press Execute to make the settings take effect. 4. install Apache 1. Double-click the Apache installation file, and the page shown in is displayed. 2. Confirm to agree to the software installation license and select "I accept the terms in the license agreement ", click "Next" to continue 3. Instructions for installing Apache on Windows. After reading the instructions, press "Next". 4. Set the system information, enter your Domain Name (for example, wuhua.com) under Network Domain, and enter your Server Name (for example, www.wuhua.com, that is, the host Name and Domain Name) under Server Name ), fill in the system Administrator's contact Email Address (for example, admin@wuhua.com) under Administrator's Email Address, the above three information is for reference only, the contact email address will be provided to the visitor when the system fails. All three pieces of information can be filled in at will. The following two options are available: the image is installed for all users of the system, the default port 80 is used, and automatically started as the system service; the other is installed only for the current user, use port 8080 to manually start the instance. Generally. Press "Next" to continue. 5. Select the installation type: typical (typical installation), custom (custom installation) 6. Select the installed components and installation location 7. specify the installation location as c: \ apache. You can also choose custom installation. If you select Custom installation, steps 6th and 7 are omitted. return to the interface you just set 9. confirm the settings. If you still need to adjust the settings, click the Back button and set the settings again. If the settings are correct, click "Install" to Install the SDK! 10. The installation progress bar appears. 11. Normally, the Apache icon is displayed in the lower right corner of the screen. The color of the icon should be green, it indicates that Apache is running normally, but sometimes red may occur. This indicates that an error occurs during Apache configuration. It does not matter. We will debug this error later! 5. Configure Apache 1. open the Apache configuration file-httpd. conf. Open method 2. search for the keyword "DocumentRoot" (the root directory of the website), find the place shown in, and change the address in "" to the root directory of your website. Write the address format as shown in the figure, generally, the file address "\" should be changed to "/" in Apache. 3. Search for the Directory keyword. The Directory location must be the same as that set by DocumentRoot. 4. Search for the DirectoryIndex keyword, that is, the default file name displayed when only the Directory is specified. The specified parameter file name is arbitrary. It is not necessarily set to "index.html", such as "test. php. 5. search for the LoadModule keyword and add the following statement php5_module "c: \ php \ php5apache2_2.dll" PHPIniDir "c: \ php" AddType application/x-httpd-php. php 6. specify the port number listened by the apache server Listen 8080. save settings and restart Apache. 6. Install and test. Create a text file in the main directory. Double-click the file to edit the file and add the following statement <? Php phpinfo ();?> After saving the file, rename it index. php and start the browser. in the address bar, enter http: // 127.0.0.1: 8080
If you see the following interface, it proves that the Apache environment has been set up. Now you can start the PHP journey...

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.