Http://www.jb51.net/article/22372.htm
We know that there are several PHP configurations:
1, CGI loading PHP environment, usually IIS inside the configuration interpreter for Php.exe, early more common, currently less use.
The characteristic is: stable, but the efficiency is too low.
2, the ISAPI mode loading PHP environment, is usually IIS inside the configuration interpreter for Php5isapi.dll, the current use of the most, the most widely used.
Features are: multithreading, high efficiency, but not stable enough.
3, fastcgi mode loading PHP environment, in the IIS environment is not common, but other system environment application is still there, but IIS7.0 began to build fastcgi.
Characteristics are: high efficiency, stability, belongs to the future development trend.
I've tried other special problems, and the version of Windows released by PHP 5.3 doesn't support ISAPI mode, so I'm going to run PHP in the fastcgi way recommended by Microsoft.
I use the third, but also the best and fastest, because fastcgi greatly enhanced the ability of IIS to handle PHP, can quickly improve the speed and productivity of the PHP site,
and has a higher stability and security.
: There are many kinds of http://windows.php.net/download/inside.
PHP is now available in version 5.3.2, but there are several different versions to choose from when downloading. That's VC6 X86 and VC9 X86.
First I will answer:
What is VC6?
VC6 is Legacy Visual Studio 6 compiler, which is compiled with this compiler.
What is VC9?
VC9 is the Visual Studio compiler, which is compiled with Microsoft's vs Editor.
So how do we choose which version of PHP to download?
If you are using apache+php under Windows, please select the VC6 version;
If you are using iis+php under Windows, please select the VC9 version;
What is the non Thread safe?
Non thread safe is non-threaded;
What is Thread Safe?
Non thread safe;
The official does not recommend that you apply the non thread safe to the production environment, so we chose the thread safe version of PHP to use .
To download the installation, I install the default path:
Remember to check the third item:IIS FASTCGI
If you do not have IIS fastcgi installed Next, you will be prompted to download the installation.
FastCGI for IIS 6 7 http://www.iis.net/expand/fastcgi
After the installation, continue to the next step, I follow the default:
Once the installation is complete, it is configured.
There are two ways to configure this, and I'm going to use CMD to configure a single command.
Go to the directory where you just installed the CGI:
>CD C:\WINDOWS\system32\inetsrv
>cscript fcgiconfig.js-add-section: "PHP"-extension:php-path: "C:\Program files\php\php-cgi.exe"
Note: path: "Xxxx\php-cgi.exe" is the directory where you install PHP
> cscript fcgiconfig.js-set-section: "PHP"-instancemaxrequests:10000
> cscript fcgiconfig.js-set-section: "PHP"-environmentvars:php_fcgi_max_requests:10000
Ok! finished!
Under test:
Create a new. php file, Inside
<?php
Phpinfo ();
?>
Save!
Run, the following page appears, stating that the configuration was successful!
This way IIS does not have to configure, he will be automatically configured! The configuration provided by Microsoft is more detailed!
If you run the PHP test page with the tutorial configured as above, there is a 500 error.
Then set the Date.timezone entry in the php.ini.
I set it here to Shanghai time zone: Date.timezone = asia/beijing
After the setup, everything is fine!
Here will be a few problems, you need to pay attention to: (My own configuration of the problem encountered)
1. For the empty machine server, generally do not install any other database software, so everyone run a c:program filesphpphp-cgi.exe, whether there will be problems, and then solve the problem. (Try running with cmd)
Run C:Program Filesphpphp-cgi.exe, if you can enter the command window and only the cursor, indicating that fastcgi can call php-cgi normally, otherwise it will prompt an error,
2. Running the test page shows a 500 error (I ran into a problem and found a workaround on the web.) )
Workaround:
Open IE----Internet Options--------Advanced------------display a friendly HTTP error before the tick is removed, and then the error will prompt you for a specific hint of the error.
Tips:
PHP Warning:Unknown:open (C:phpupload_tmpsess_li3ardp5qtalfj4, O_RDWR) Failed:permission denied (in Unknown) 0 PHP Warning:
Unknown:open (C:phpupload_tmpsess_li3ardbp5qtalfj4, O_RDWR) Failed:permission denied (Unknown) on line 0 PHP Warnin G:unknown:failed
To write session data (files). Please verify this current setting of Session.save_path is correct (c:phpupload_tmp) in Unknown on line 0
This shows that I did not give c:phpupload_tmp write permission, gave the. Write permission to resolve!
Ii7 Installing PHP