On the construction of local WAMP environment

Source: Internet
Author: User
Tags manual ini learn php php and port number root directory

The so-called WAMP environment is the windows+apache+mysql+php development of the environment, which for us to learn PHP development is the most basic step, although the integrated development environment is now a catch a lot, but as basic skills or must learn to hand.

PHP environment configuration is a vital part of PHP's local set-up process, and this article gives a brief description of PHP's local environment configuration. For everyone to learn!

Configure windows+apache+mysql+php Development Run environment

Install Apache

Get Apache Server Downloads

This is a window executable program that includes the Open SSL module, running directly under the directory where we need to put it. Note that you use port 80 so that you can access the local HTTP server without having to make an extra port number

After everything is installed, open the browser, enter http://localhost for testing, appear "It works" then the installation is successful

installing MySQL

Get Mysql Downloads

Install Mysql, this is a packaged installation package, all the way according to the prompts to install the

There is also a MySQL Workbench, this is a visual MySQL management software, can be down together or choose other convenient management client can be.

Use the Admin client link local MySQL, can connect on the description of the successful installation

Installing PHP

Get PHP downloads. We can see more than one version available. Select:

If the version of Apache is 1 or 2, then download the VC6 compiled version

If you choose IIS as the server, the version compiled with VC9

X86 represents a 32-bit operating system and X64 represents a 64-bit operating system

thread safe and non thread safe depend on how the Web server performs PHP. If it is an ISAPI, you need to call the DLL to handle the user request, and since the associated DLL does not disappear immediately after processing, you need to conduct a thread security check to use multithreading to improve efficiency and better use of thread safe. If it is fast CGI, because only single-threaded operation, so there is no need for thread concurrency security checks, remove thread security check is equal to eliminate unnecessary system consumption to improve running speed, use Non Thread safe better.

There is also a direct installation package, direct installation can be, but we choose the ZIP package for manual installation, one more flexible manual installation, and then you can understand the internal structure of PHP, this for further use of PHP is more important oh.

Extract the compressed package to your target disk directory, such as the extracted directory similar to c:php, note that the directory between the best use of space, because some Web server may not support the path with spaces.

Configure environment variables for Php5ts.dll Lu Jing. Some DLLs under the root directory contain the name of the Web server, and these associated server modules make it more efficient for Web server to run PHP. All modules need to be php5ts.dll, so the system needs to know where to find the order:

The execution location of the php.exe, or the execution directory of the Web server (typically bin) if the Web server uses the server module

Path contained in environment variable path

Add the current root directory to the path so that regardless of how the Web server is configured, the system can find the Php5ts.dll

Configure PHP initialization information, directly to the php.ini-production copy renamed to PHP.ini can be, PHP runtime will automatically find and read php.ini files. Also, if you are using the NTFS format on Windows NT, XP, or 2003, make sure that the user running the Web server has read access to the php.ini.

Associated with PHP and Apache, Apache will have PHP parsing capability after this configuration. Here are two ways to set up PHP's work in conjunction with Apache. One is as a CGI, the other is installed as an Apache module, which mentions the server module better, so I install it this way and add the following three lines to the Apache httpd.conf.

The code is as follows:

LoadModule php5_module "C:/php/php5apache2_2.dll"

AddType application/x-httpd-php. php

Phpinidir "c:/php"

Integrated detection

Finally, check to see if our environment is working properly.

Creates a new text name with the extension Test.ini

Add the following code to the file:

The code is as follows:

  

Phpinfo ();

?>

Put it in the Htdocs directory of Apache server

Then enter http://localhost/test.php in the browser, if the version of PHP and components related statistics, indicating that the normal work. Which mysqlnd to enable the MySQL driver is also the normal operation.

Such a WAMP environment is built up, this environment is the basis for development and learning, first introduced here. Finally, I wish you all a happy learning, early cock silk reverse attack wow ...

The above is the entire content of this article, I hope you can enjoy.

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.