Home>Article>Backend Development> How to install php environment in windows2003

How to install php environment in windows2003

藏色散人
藏色散人 Original
2020-08-12 10:03:31 2853browse

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.

How to install php environment in windows2003

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:

Fastcgi installation

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

  2. # in the C:\WINDOWS\system32\inetsrv\ directory. ##At this time, there is an additional FastCGI Handler in the "WEB Service Extension" of IIS6



Php-5.2.17 installation, no installation required Package

  1. ##Take the

    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;

  2. #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:/php5.2.0Win32/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:\ php5.2.0Win32\kkeye_errors.log"”(指定位置);

保存并关闭php.ini文件;再将其复制到C:/Windows目录下;

D:/php5.2.0Win32文件夹下找到名为php5ts.dll,libmysql.dll的文件,并将其复制到C:/windows/System32文件夹中(注:IIS处理PHP 5MYSQL需要该文件)

php安装完毕。

Step 2: Configure iis

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 ofExtension##“.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:

##

  1. Set the following image in the document:

  2. Right click On the left"InternetInformation Service"below"webService Extension", click"Add a newwebService extension, then add a newwebextensionEnter:PHP, and then point the executable file to the path wherephp5isapi.dllis located in the root directory of thephpfolder , and set the status to"Allow", and finally click"OK(Missing this step leads to accessing thephpFile Times403page inaccessibility). As shown below;

  3. # After Iis configuration is completed, restart iis.

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

    Unzip ISAPI_Rewrite3_0112_x64.zip and get the 20140729131718_34157 folder (containing cracked files and installation methods), ISAPI_Rewrite3_0112_x64.msi installation file;
  1. Double-click ISAPI_Rewrite3_0112_x64.msi Perform the installation, use the default selections, and click Next until it is complete (the installation process will automatically restart IIS).
  2. After completion, copy the ISAPI_Rewrite.dll and ISAPI_RewriteSnapin.dll files under the 20140729131718_34157 file to the ISAPI_Rewrite installation directory, overwriting the original files (if the prompt file is occupied, you can first Delete the original file and copy it over).
  3. Find the httpd.conf file in the installation directory. Enter the following:
  4. RegistrationName= coldstar

    RegistrationCode= 2EAD-35GH-66NN-ZYBA

  5. Restart IIS and the installation is complete.
  6. Configuration, after the installation is completed, you will be able to see the label of the ISAPI_Rewrite component in the label of each site property,
  7. 64

    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:

  8. Restart iis.
  9. ISAPI_Rewrite

    The64bit system does not requireISAPIFilter Adddll

After 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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn