Home>Article>Backend Development> How to install php environment in windows2003
How to install PHP environment in windows2003: first install Fastcgi; then copy the downloaded "php-5.2.17-Win32-VC6-x86.zip" to the D drive; then configure PHP extension support; finally configure it iis is enough.
Recommended: "PHP Video Tutorial"
Environment setup: php-5.2.17 iis6 fcgisetup_1 .5_rtw_x64 ISAPI_Rewrite3_0112_x64
Installation package used: ISAPI_Rewrite3_0112_x64.zip Password: orct, php-5.2.17-Win32-VC6-x86.zip Password: op83, fcgisetup_1.5_rtw_x64.msi Password: 6900
Installation steps:
Click on the installation file fcgisetup_1.5_rtw_x64.msi and go to the next step. After the installation is completed, there are 5 more files fcgiconfig.js, fcgiext.dll, fcgiext.ini, fcgilicense.rtf, fcgireadme.htm
Ddisk as an example, put the downloaded"php-5.2.17-Win32 -VC6-x86.zip”Copy to theDdisk, then right-click to decompressphp-5.2.0-win32(assuming it is installed in this directory) directory;
#FastCGIModifications in the installation directory(RegisterPHPtoFastCGI)Open
C:\WINDOWS\system32\inetsrv\fcgiext.inifile,Add the following three lines to the end of the file:[Types](This line is originally in the file and should be at the end of the file, in
[Types]Just add the following statements after them, all of them must be included otherwise an error will be reported.)
(Note:
php#php-cgi.exein the installation directory
php=PHP [PHP] ExePath=D:\ php-5.2.0-win32\php-cgi.ex
InD:/php
-5.2.0-# Find the"php.ini-dist"file in the##Win32folder and make a copy of it to facilitate restoration in the event of an error in the future. Then rename the copied file to"php.ini";
用记事本打开“php.ini”文件,查找“extension_dir”,再将extension_dir ="./"改为extension_dir ="D:/php-5.2.0-Win32/ext";(注:php的安装目录下的ext文件夹,这里应该用斜杠/而不是反斜杠)。如下图;
接着配置php扩展支持,在php.ini文件中查找到以下行:
“ ;extension=php_curl.dll ” “;extension=php_mysql.dll” ; “ ;extension=php_ldap.dll ” “;extension=php_mysqli.dll” ; “ ;extension=php_exif.dll ” “;extension=php_gd2.dll” ; “;extension=php_mbstring.dll” “ ;extension=php_sockets.dll ” “ ;extension=php_xmlrpc.dll ”
前面的分号去掉,就表示php支持这些扩展功能了;将以下配置设置为“display_errors= Off”,“log_errors= On”,“error_log= "D:\ php-5.2.0-Win32\kkeye_errors.log"”(指定位置);
保存并关闭php.ini文件;再将其复制到C:/Windows目录下;
在D:/php-5.2.0-Win32文件夹下找到名为php5ts.dll,libmysql.dll的文件,并将其复制到C:/windows/System32文件夹中(注:IIS处理PHP 5和MYSQL需要该文件)。
php安装完毕。
Open iis,Right-click the left mouse button"InternetInformation Service"below"网站", then select"Attribute", or a familiar"websiteattribute"## will pop up# Panel, switch to the"Home Directory"tab, click the"Configuration", a"Application Configuration"# will pop up ## box, click the"Add"button below, and finally click## in the pop-up box #"Executable file"Locate"C:\WINDOWS\system32\inetsrv\fcgiext. dll”, enter # in the text box of“Extension”##“.php”(Note: Add a dotbefore the extension), click OK. As shown below;
#Fill in the executable fileC:\WINDOWS\system32\inetsrv \fcgiext.dll
Fill in the extension.php
.Action>
is limited toGET,HEAD,POST.The execution permissions in the home directory are as follows:
##
Test php configuration Create a new site under iis, and then create a new "test. php" file, write the sentence "echophpinfo();" into it, save and close. Then access it with a browser. If you can open this web page and the following screen appears, it means the configuration is successful.
Upload website code
##ISAPI_Rewrite, routing rewrite extension installation
RegistrationCode= 2EAD-35GH-66NN-ZYBA
I am on the test server I didn't see this during installation. After the installation is complete, you can use it without configuring anything:
ISAPI_Rewrite
The64bit system does not requireISAPIFilter AdddllAfter all installation is completed, open the website to test the following functions.
The above is the detailed content of How to install php environment in windows2003. For more information, please follow other related articles on the PHP Chinese website!