WINDOWS7 System Environment Assembly configuration PHP development environment

Source: Internet
Author: User
Tags benchmark configuration php php development environment
WINDOWS7 system Environment Installation configuration PHP development environment

One, Apache installation
Version explanation: OpenSSL is a representation with the OpenSSL module, which uses OpenSSL to configure SSL secure links for Apache, that is, access using the https://method.
Nossl means no OpenSSL module and cannot be used for SSL secure links, where we download with OpenSSL.
Select version: Apache_2.2.14-win32-x86-openssl-0.9.8k.msi
Download Address:http://www.apache.org/dist/httpd/binaries/win32/

First we create a new directory in the D-Drive (the drive letter is chosen according to the actual situation)
Some of the content that is named "WAMP" after the meaning of "wdindows Apache Mysql PhpMyAdmin" will also be installed in this directory.

1. Installation Instructions:
Run the Apache installer, the method is very simple, after the installation interface has been "next"

Then there will be an interface, you need to fill in 3 content, respectively: Network Domain, Server Name, Administrator's Email Address to fill in the right, do not affect the content.
There are 2 options, the default is 80 port, the second is 8080 port, according to the individual needs of the choice, is generally the default 80 port.
We continue to install, choose Custom (Customized installation)-"Next"

There are components with red X in it, we click this component, select "This feature, and all subfeatures, will is installed on the local hard drive.", i.e. "this section, and the subordinate sub-section content, all installed on the local On the hard disk. -"Next"

Then select "Change" in the lower right corner to alter the installation path and install to the directory you just created "D:\WAMP\Apache\"-"Next"
After installation, the lower right corner of the computer will be an extra icon, double-click to open, select Start or restart, can run normally, this installation is complete.

2. Modify the configuration:
Open the installation record D:\WAMP\Apache\conf\httpd.conf file (when modifying a profile, it is not recommended to use Notepad, it may affect it, it is recommended to use notepad++ or other editing software to open the changes)

Open later ctrl+f find what you want to modify

Under #loadmodule vhost_alias_module modules/mod_vhost_alias.so add:
LoadModule php5_module "D:/wamp/php/php5apache2_2.dll"
Phpinidir "d:/wamp/php"
AddType application/x-httpd-php. php
AddType application/x-httpd-php. htm
AddType application/x-httpd-php. html

DocumentRoot "E:/wamp/apache/htdocs"
Modified to (where the path is the same as the Wwwroot directory in IIS, for storing web pages, customizing or not modifying the default): DocumentRoot "D:/wamp/www"


Modify to (custom or do not modify default):

DirectoryIndex index.html
Modified to: DirectoryIndex index.php default.php index.html index.htm default.html default.htm

3. Testing
Create a index.html page in the D:/wamp/www directory
Enter in the browser ? http://localhost/
If normal display, Apache configuration is complete, has been operating normally.

Second, MySQL installation
Version explained: The Essentials package: does not contain embedded server and benchmark suite, there is an automatic installer and Configuration Wizard, there is no MySQL documentation.
The complete package: Includes embedded server and benchmark suite with automatic installer and Configuration Wizard with MySQL documentation.
The Noinstall Archive: contains embedded server and benchmark suite, there is no automatic installer and Configuration Wizard, there is MySQL documentation.
Select version: Mysql-essential-5.1.44-win32.msi
Download Address:http://www.mysql.com/downloads/mysql/

1. Installation Instructions:
Open the installer and click "Next"
Select Custom, the component is the default selection, we do not change-"next"

Path set to "D:\WAMP\Mysql"-"Next"

Click "Finish" after installation.
Then a configuration wizard appears-"Next"

Select "Detailed Configuration"-"Next"

Here are 3 options:
Developer machine, will only use as little memory;
Server machine, a medium amount of memory will be used;
Dedicated MySQL server machine, this server only runs MySQL database, will occupy all the memory.
Can choose according to their own needs, here we choose the second type of "Server machine"-"Next"

There are also 3 options for selecting a database purpose:
Mutltifunctional database is a versatile application that optimizes databases to be a good InnoDB storage type and a high-efficiency MyISAM storage type;
Transactional Database Only is used for transaction types, the best optimization innodb, but also supports MyISAM;
Non-transactional databse only non-transactional type, suitable for simple applications, only myisam types that do not support transactions are supported.
Generally choose the first multifunctional, also we are. -"Next"

Choose INNODDB data storage location, generally default on the line, in order to unify I filled out "wamp/mysql datafiles"-"Next"

Choose the maximum number of connections allowed by MySQL, the first is the maximum number of 20 connection concurrency, the second is the maximum number of 500 concurrent connections, the last one is custom, I can choose according to demand, I choose the second-"Next"

The following is the selection of the database listening port, the general default is 3306, if you change to another port, the subsequent connection to the database to remember the modified port, otherwise you can not connect to the MySQL database, more trouble, here do not modify, with mysq default port: 3306-"Next"

This step sets MySQL's default encoding, we select the third one, and in the Character set menu, select "GBK" Encoding-"next"
(Note: If you want to use the original database data, it is best to determine what the original database is encoded, if the code set here and the original database data encoding inconsistent, in the use of the time may appear garbled.) )

This step is whether to set up MySQL as Windows, the general choice to set up a service, so that you can later start and close the MySQL database through the service. The following check boxes are also checked, so that in cmd mode, you do not have to execute commands in the bin directory of MySQL. That is, the top and bottom 2 hooks are hit, the middle Default-"next"

This step is to set up the MySQL super user password, this super user is very important, for MySQL has full permissions, please set up and remember the superuser password, below is a check box is to choose whether to allow the remote machine root user to connect to your MySQL server above, if there is this need, Please also tick. Here we use the default selection and enter the password in new root password and confirm. "Next"

Click "Execute" to configure, slightly wait for a while, the dots on the tick all hit, on behalf of the configuration is complete.

2. Modify the configuration:
Open D:\WAMP\MySQL\my.ini
Set DataDir to d:/wamp/mysql/data/or the directory where you want to store the data.

Third, PHP installation
Version Explanation: VC9 is specifically for IIS-valued scripts, compiled with the visual Studio 2008 compiler, and supports the latest Microsoft builds for increased efficiency.
VC6 is intended for other Web services software provided by scripts such as Apache.
Thread safe is readily available, and the star will be threaded for security checks to prevent the intention of running out of system resources on the way the CGI execution of the new thread is started.
Non thread safe is non-threaded and does not thread (thread) security checks at execution time
Select version: PHP5.3 (5.3.1) in VC6 x86 Thread safe? Zip download
Download Address:http://windows.php.net/download/

1. Installation Instructions
Since we are downloading the zip archive, we just need to extract the files into the "D:\WAMP\PHP" directory.

2. Modify the configuration
Modify the E:\WAMP\PHP\php.ini-development file to PHP.ini
Open php.ini

; Extension_dir = "ext"
Modified to: Extension_dir = "E:\WAMP\PHP\ext"

will be 947 lines down, these files in front of ";" Remove
Extension=php_curl.dll
Extension=php_gd2.dll
Extension=php_mbstring.dll
Extension=php_mysql.dll
Extension=php_mysqli.dll
Extension=php_pdo_mysql.dll
Extension=php_xmlrpc.dll

;d Ate.timezone =
Modified to (many sites do not mention here to modify, the default is the United States time, if not modified will error): Date.timezone = Asia/shanghai

3. Testing
Reboot Apache (modified configuration file must restart Apache to take effect)
Create a new index.php page, enter it in the code , and save the file in the "D:\WMAP\www\" directory
Open Browser input:http://localhost/index.php? If the normal display, the PHP configuration is complete, you can view the page's PHP information is correct.
(Note: in the change file input function can output a lot of information about the current state of PHP , such as PHP version, server information and environment.) )
(Note:)

And then we tested if we could connect to MySQL
Create a new link.php and enter it in the code below.
$link =mysql_connect ("127.0.0.1″," "Root", "password entered when MySQL is installed");
if (! $link) echo "MySQL database connection failed!";
else echo "MySQL database connection succeeded!";
Mysql_close ();
?>
Also save the file in the "D:\WMAP\www\" directory
Open Browser input:http://localhost/link.php? View, this Windows7 under the PHP environment is built.

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