1, CGI (Universal Gateway Interface/common Gateway Interface) is generally executable programs, such as EXE files, and the Web server each occupy a different process, and generally a CGI program can only handle a user request. In this way, when the user requests a very long time, it will occupy the system resources, such as memory, CPU times, resulting in low performance.
2, ISAPI (Internet Server application program Interface) is a set of Web services-oriented API interfaces provided by Microsoft, which enables all of the functionality provided by CGI, And on the basis of the expansion, such as the provision of a filter application interface. Most ISAPI applications are used as DLL dynamic libraries, which can be executed after being requested by the user, not disappearing immediately after processing a user request, but continuing to reside in memory waiting for other user input to be processed. In addition, the ISAPI DLL application and Web server are in the same process, with a significantly higher efficiency than CGI.
Configures the ISAPI PHP in the IIS6 of Windows Server 2003 by adding a new Web service extension in IIS's Web service extensions, with the program suffix PHP, ISAPI program is Php5isapi.dll, then "environment variable"-"System variable" Add variable name PHPRC, numeric value is php.ini path, in Internet Information Service Manager, select the Web site or application root directory, open the Directory property page (right key select " Properties), and then select Home directory. Click the "Configure" button and select "Map" tab. Click "Add ..." in "Executable" set to: C:phpphp5isapi.dll, with the extension set to. php, select "Confirm File exists" and "OK" to save the settings. Restart the server to complete the configuration of PHP.
3, fastcgi is a scalable architecture for CGI open extensions, and its main behavior is to keep the CGI interpreter process in memory and thus achieve higher performance. The traditional CGI interpreter's repeated loading is the main reason for the low performance of CGI, if the CGI interpreter stays in memory and accepts the FASTCGI process Manager dispatch, it can provide good performance, scalability, etc.
FastCGI has been integrated into IIS7 and IIS6, and the installation method in IIS6 can be found in Microsoft's official documentation, which I translate briefly.
Click here to download a 32-bit fastcgi ExtensioN for IIS, then install it, and the installed files should be placed in the System32inetsrv directory. After
, open the System32inetsrv directory and execute the following statement, where c:php is your PHP directory and can be modified to other values.
cscript fcgiconfig.js-add-section: "PHP"-extension:php-path: "C:phpphp-cgi.exe"
In Internet Information Services Manager, select the root directory of the Web site or application, open the Directory Properties page (right-click Select Properties), and select Home directory. Click the "Configure" button and select "Map" tab. Click "Add ..." in "Executable" set to: C:windowssystem32inetsrvfcgiext.dll, with the extension set to. php, select "Confirm File exists" and "OK" to save the settings.
Modifies the php.ini file, adding the following statement:
fastcgi.impersonate = 1
cgi.fix_pathinfo = 1
Cgi.force_ redirect = 0
After opening the System32inetsrv directory, execute the following statement:
cscript fcgiconfig.js-set-section: "PHP"- instancemaxrequests:10000
cscript fcgiconfig.js-set-section: "PHP"-environmentvars:php_fcgi_max_requests : 10000
Finally, configure the security of the c:php directory so that the IIS_WPG group has read and execute permissions for the directory.
This time, PHP based on FASTCGI is successfully configured on the IIS6.