Win2008 to build the PHP development environment (IIS fastcgi version) _win server

Source: Internet
Author: User
Tags character set file copy install php php development environment zip phpmyadmin zend

Note that the version of the software used, different versions will have a lot of differences, it is possible to eventually build an unsuccessful, and the children's shoes do not worry about the wolf version will be too old, because the software used here is not relatively new is more stable version, fully meet the needs of everyone, then see what software to use it first:

Operating system: Windows Server 2008 (below for convenience, use WS2008 instead, tested, this method is also valid under Win7)

Server: IIS7.0 or later

1.mysql-essential-5.1.56-win32.msi:http://dev.mysql.com/downloads/mysql/5.1.html

2.PHP 5.2 (5.2.17) VC6 x86 Non Thread safe.msi:http://windows.php.net/download/

3.Zend Optimizer (Runtime for PHP 5.2 and earlier) 3.3.3 Http://www.zend.com/en/products/guard/downloads

4.phpmyadmin-3.3.9.2-all-languages.zip http://www.phpmyadmin.net/home_page/downloads.php

3 and 4 are optional and are installed to facilitate the management of the database and optimize PHP efficiency.

Download the good and then you can officially start!

Use Apache2 to build PHP environment can see here: Win7 under the PHP Environment build (apache2+mysql+php)

The first is to install IIS:

WS2008 is not installed by default and needs to be installed by itself, as follows:
1. Start-> the Server Manager (top)-> role (in the left directory)-> add the role (right). The Add Role Wizard pops up before you start this step and skip directly, then click the Web Server

2. Next, select some services, I choose some of the following, the rest of the default can be (tight for reference, here can be customized, CGI and ISAPI must be installed)

3. Then the next step is to install it!

Next, install PHP:

Here is the MSI version of Windows directly installed, read some online comments, reflecting that 5.3 of PHP is not very stable, so for the time being.
1. Assuming that the installation directory is "e:server_corephp", when installing the IIS FastCGI in the wizard, the components where to choose:

--script executable

 --register *.php files

--extensions

 --gd2

 --multi-byte String

 --mcrypt

 --mhash

 --ming

 --mysql

 --openssl

 --sockets

 --zip

 --extras--pear ( PHP extensions)

 --php Manual (This is a document)

2. After installation, open the php.ini configuration of the following options, pay attention to the front of the note removed:

Fastcgi.impersonate = 1
Cgi.fix_pathinfo = 1
Cgi.force_redirect = 0
Open_basedir = "Web root (IIS defaults to C:\inetpub\wwwroot, if you don't want to change it, fill in the C:\inetpub\wwwroot)"
Date.timezone = "Asia/shanghai"
Short_open_tag = On

The latter two configuration options need to be added when you are deploying WordPress to encounter problems.

Then in the cmd command line input: Php-info, normally will output a variety of parameter variables.

The next step is to skip this step if you chose register *.php files when you installed PHP above.

3. Open IIS Manager, find "Handler mapping", select "Add Module mapping" in the right panel, path *.php, module fastcgimodule, executable file php-cgi.exe the path, name can be written as php_via_fastcgi. Pop-up prompts to select "Yes".

Now to the MySQL installation:

Select Custom Installation

Click "Change" to modify the directory you want

After the file copy installation completed, the MySQL Setup interface, click Finish.

Select detailed configuration for detailed configuration

Choose MySQL run mode: Server Machine

Choose MySQL database default storage mode: Non-trans only (MYISAM)

Set the maximum number of MySQL connections: General set to 128–512 between the integers.

Set MySQL network parameters, note: Do not check the Enable strict mode! The Addfirewall option is only checked when you need to connect to MySQL, which means adding a strategy to the firewall.

Set MySQL default character set: to the User site language, the default we fill GBK.

Windows environment settings

Modify the set root password, the root password please set more complex, if you appear to be three lines, the first line of current password do not fill in, leave blank

Note: Do not start remote connection mode if necessary! Complete the MySQL installation and start the MySQL service.

When you are done, open the cmd Command Prompt window and enter the command: Mysql–u root–p

Enter the password that you just installed, and if you can go to the MySQL console correctly, the MySQL installation is normal.

Here has been said to build successfully, the browser input http://localhost/to see if the picture of IIS out, and then in C:inetpubwwwroot new PHP page, which entered:

1
2
3
4
5
<!--? php
phpinfo(); ? -->    

Then in the browser input http://localhost/new PHP file name, to see if there is PHP related configuration information, and some words have been successful.

The next steps are optional:

1. Modify the Default Web site root directory:

Start-> management tool->iis Manager, locate the default Web site under the website, right-click-> Admin Site-> Advanced Settings, where the physical path is modified, Note that the modified in addition to the above mentioned php.ini, this file in the root directory of PHP installation, open the php.ini, find Open_basedir, modify the directory you need, if the establishment of multiple sites, but also to modify the Open_basedir, Multiple directoriesare separated by a colon ":", for example:

Open_basedir = "/site1:/site2:/site3″

Also note is: the establishment of multiple sites, the host name where not to write, the port number must be different, you can set up 80,8080.

2. Install Zendoptimizer-3.3.3-windows-i386.exe, no difficulty. Choose a good catalogue.

3. Install phpMyAdmin, download good phpmyadmin to the site root directory, if not modified the default site root directory, it should be extracted to the C:inetpubwwwroot directory.

Then enter the phpMyAdmin directory.
Rename config.sample.inc.php to config.inc.php.
Then open config.inc.php, modify
$cfg [' Servers '] [$i] [' controluser '] remove the front//, and write the database name as ' root ' in the back.

$cfg [' Servers '] [$i] [' controlpass '] remove the front//, write the database password in the back, such as ' 123′ (the password that was filled in the MySQL installation link just now)

Modify $cfg[' blowfish_secret '] = "in the back" inside casually fill in a few numbers ' 456′
Modify the save, in the browser input http://localhost/phpmyadmin (I unzipped the original folder name changed to phpMyAdmin, here is the phpMyAdmin folder name)
Will enter the following page, that means success le!

Finally there is a place to modify, start-> management Tools->iis Manager, after entering IIS Manager click the Web site, the right to find the default document icon, double-click in, you can see the contents of the figure:

Where iisstart.htm is not required, you can right-click, and if you do not do asp.net development, default.aspx and default.asp, you can also delete, so that when you do not specify the page to open, IIS search will be less the default page, can improve efficiency!

Okay, here has completed a full range of PHP environment to build, wrote a good long, so tired ah ~ hurry to eat a meal to add energy First ~ haha!
If there are any questions, please note! Reprinted from the-it Career of life

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.