WAMP environment under the Windows environment.

Source: Internet
Author: User
Tags learn php

Learn PHP to build WAMP environment, often use is wampserver, also very useful, a key fool-type installation, very convenient. But programmers are love toss, always ask for a perfect environment. So used to use, think or the bulk of the environment most can reflect their own force lattice.

In fact, what is the PHP environment, it does not matter, the key is the level of your PHP code. Therefore, it is strongly recommended that "novice" do not waste too much energy on the configuration environment, the integrated Wampserver is enough. If you are determined to toss, then follow me my tutorial go, less go some detours.

The environment is divided into three chunks:

First, Apache

Second, PHP

Third, MySQL

Briefly describe the attachment relationship between the three.

Apache provides Web services. In real life, for example, Apache is the recipient, specifically for the mail sent by the client (HTTP request). Then the client is the sender. The addressee has no ability to understand the large number of letters he is facing.

The purpose of the HTTP request is to bring back a static HTML or XML text to allow the browser to parse.

PHP is a dynamic script that is sent to the client browser and cannot be parsed by the client. This time, you need to combine Apache and PHP to cooperate. Apache received a letter from the ability to send letters, then full-time job to send letters. PHP has a strong ability to parse dynamic scripts. Specifically parses the dynamic script and then gives the results to Apache. Apache is returned to the browser.

So what does MySQL do, MySQL is the database, dedicated to storing the data of the website. As for the location of the database where it doesn't matter, you just give PHP an address, PHP can find just fine. So MySQL is like a big warehouse.

In summary, this means that PHP is just a component of Apache. In the lamp architecture, p represents more than just PHP, and Perl and Phython. So their relationship is at a glance.

After compressing the pack documentation, give the link:

First, install Apache

Before installing Apache, please uninstall the previously installed environment and clean up the registry.

1. Create a new "Wamp" folder in the D drive. Create a new Apache, PHP, MySQL three folder under the folder.

2, follow my picture to go.

Second, install PHP

PHP does not have to be installed, directly extracted into the d:/wamp/php folder on the line.

Third, install MySQL

See figure installation.

See here. All three components of Wamp have been installed. But the installation is ready. There was no connection between them.

Now let's do the most important steps in today's operation, configuring Apache and PHP. MySQL is not configured.

Configure the D:\wamp\apache\conf\httpd.conf file.

Add this configuration at the end

 #---------------------------myconfig-------------------------#加载php模块. LoadModule php5_module "D:\wamp\php\php5apache2_2.dll" #加载php文档类型. Tell Apache that I have loaded a httpd component named PHP. The suffix is the. php file format. AddType application/x-httpd-php. php# loads the configuration folder for PHP. To go to the d:/lamp/php php.ini-development file first. Copy and rename it to php.ini. Then change this configuration file for Apache. Phpinidir "D:\wamp\php" #再该文档中搜索关键字. html. Add the index.php document type. About 239 lines. #  <  ifmodule  dir_module  >  # DirectoryIndex index.php index.html#  ifmodule  >   #修改rewrite模式. #LoadModule Rewrite_module modules/mod_rewrite.so is about 116 rows. #将前面的 # is removed. #------------------------------Apache configuration is complete------------------ 

Then we go to configure PHP.

D:\wamp\php\php.ini

Search for TimeZone. About 909 lines.;d Ate.timezone =

To remove from the front; Then change to Date.timezone = Asia/shanghai

Search for Extension_dir. It's about 857 lines.

Add extension_dir = "D:\wamp\php\ext"

# turn on MySQL, Crul. SUB_STRING.PDO_MYSQL,GD and other services. How much to use, how much to open.

Then save the file. Restart Apache.

Then the WAMP environment is installed.

You can write a index.php file under the Htdoc directory. Write Php.info (). Then look at the environment to install it.

There are errors. You can ask questions after the article. I will answer in time.

The installation package address is here:

Link: http://pan.baidu.com/s/1dDAVkjv Password: N5M5

WAMP environment under the Windows environment.

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.