On the construction of local WAMP environment _php tutorial

Source: Internet
Author: User
Tags mysql download php development environment

On the construction of local WAMP environment


The so-called WAMP environment is windows+apache+mysql+php development run environment, which for us to learn PHP development is the most basic step, although the integration of the development environment now a lot of grasping, but as the basic skills must be learned.

PHP environment configuration is a critical part of PHP local build process, this article briefly explains PHP in the local environment configuration. For everyone to learn!

Configuring the windows+apache+mysql+php Development Run environment

Installing Apache

Get Apache Server Download

This is the window executable that includes the Open SSL module and runs directly under the directory we need to place. Note Use port 80 so that you do not have to make additional port numbers to access the local HTTP server

After everything is installed, open the browser, enter the http://localhost to test, the "It Works" appears, then the installation is successful

Install MySQL

Get Mysql Download

Install Mysql, this is a packaged installation package, all the way to install on the prompt

There is also a MySQL Workbench, this is a visual MySQL management software, can come down together or choose another handy management client can be.

Using the Manage Client link local MySQL, can connect on the instructions to install the success

Install PHP

Get PHP downloads. You can see multiple versions available for us to choose from:

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

If IIS is selected as the server, then the version compiled with VC9

X86 represents a 32-bit operating system, while X64 represents a 64-bit operating system

The thread safe and non thread safe depend on how the Web server executes PHP. In the case of ISAPI, the DLL needs to be called to handle user requests, and because the associated DLLs do not disappear immediately after processing, thread safety checks are required to use multithreading, which improves efficiency and uses thread safe. If it is fast CGI, because only single-threaded operation, so there is no need for thread concurrency security checks, remove the thread security check is equal to eliminate unnecessary system costs to improve the speed of operation, using Non Thread safe is better.

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

Unzip the package to your target disk directory, such as the extracted directory is similar to C:\php, note that it is best to use no space between the directory, because some Web server may not support the path with spaces.

Configure the environment variables for Php5ts.dll brutishness. Under the root directory, some DLLs contain the name of the Web server, and these related 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 his location, and the search order is generally:

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 under environment variable path

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

Configure PHP initialization information, directly php.ini-production copy after renaming to PHP.ini, PHP runtime will automatically find and read php.ini files. In addition, if you use the NTFS format on Windows NT, 2003, XP, or php.ini, make sure that the user running Web server has Read permission to the.

Associated with PHP and Apache, this configuration after Apache will have PHP parsing capabilities. There are two ways to set up PHP to work together with Apache. One is as CGI, the other is to install as an Apache module, the above mentioned server module is better, so I install in this way, add the following three lines to 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 inspection

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

Create a new text name with the extension Test.ini

Add the following code to the file:

The code is as follows:

  

Phpinfo ();

?>

Place it in the Htdocs directory of Apache server

Then enter http://localhost/test.php in the browser, if there is a PHP version and component-related statistics, indicating that the normal work. One of the MYSQLND for enable explains that MySQL driver is also enabled normally.

Such a WAMP environment is set up, the environment is the basis for development and learning, first introduced here. Finally, I wish you all a happy study, the early cock-attack wow ...

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

http://www.bkjia.com/PHPjc/1000094.html www.bkjia.com true http://www.bkjia.com/PHPjc/1000094.html techarticle on the construction of local WAMP environment the so-called WAMP environment is windows+apache+mysql+php development environment, which is the most basic step for us to learn PHP development, although now ...

  • Related Article

    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.