Let IIS support PHP

xiaoxiao2021-03-06  83

First, first extract the PHP's compression package (here PHP4.3.2 as an example) to the C: /PHP-4.3.2-win32 directory, then find a file called php.ini-recommended, rename him PHP.INI.

Second, open this file, find extension_dir = "./", change it to extension_dir = "c: / php-4.3.2-win32/extensions"; find session.save_path = / tmp, change it to session. Save_path = C: /PHP-4.3.2-WIN32/ssions. (Note: At this point you need to establish a sessions folder in the C: /PHP-4.3.2-Win32 directory to store session.)

Third, copy the modified php.ini file to the C: / Winnt directory, copy the php4ts.dll file under C: /PHP-4.3.2-WIN32 to the C: / WinNT / System32 directory.

Fourth, open the Internet Service Manager, select the site you want to support PHP, open the Properties page, click "ISAPI Filter" tab, click "Add", "Filter" Filter Name of the "Filter Properties" window "The" PHP "is filled in" PHP ";" C: /PHP-4.3.2-WIN32/SAPI/php4isapi.dll "is filled in" Executable File "(as shown in Figure 1), click OK.

5. Click the "Main Directory" tab, select the Configuration button in Application Settings, click the "Add" button in the pop-up "Application Configuration" window, add / edit the application extension Fill in "C: /PHP-4.3.2-WIN32/sApi/php4isapi.dll" in the "Executable File" in the window, "Extended" is filled in "PHP" (as shown in Figure 2) .

OK, everything get it, restart IIS, write a phpinfo in your page file directory, test whether the PHP file can be correctly parsed. If you generate a 500 error, please make sure you have not forgot the third step.

First, first extract the PHP's compression package (here PHP4.3.2 as an example) to the C: /PHP-4.3.2-win32 directory, then find a file called php.ini-recommended, rename him PHP.INI.

Second, open this file, find extension_dir = "./", change it to extension_dir = "c: / php-4.3.2-win32/extensions"; find session.save_path = / tmp, change it to session. Save_path = C: /PHP-4.3.2-WIN32/ssions. (Note: At this point you need to establish a sessions folder in the C: /PHP-4.3.2-Win32 directory to store session.)

Third, copy the modified php.ini file to the C: / Winnt directory, copy the php4ts.dll file under C: /PHP-4.3.2-WIN32 to the C: / WinNT / System32 directory.

Fourth, open the Internet Service Manager, select the site you want to support PHP, open the Properties page, click "ISAPI Filter" tab, click "Add", "Filter" Filter Name of the "Filter Properties" window "The" PHP "is filled in" PHP ";" C: /PHP-4.3.2-WIN32/SAPI/php4isapi.dll "is filled in" Executable File "(as shown in Figure 1), click OK. 5. Click the "Main Directory" tab, select the Configuration button in Application Settings, click the "Add" button in the pop-up "Application Configuration" window, add / edit the application extension Fill in "C: /PHP-4.3.2-WIN32/sApi/php4isapi.dll" in the "Executable File" in the window, "Extended" is filled in "PHP" (as shown in Figure 2) .

OK, everything get it, restart IIS, write a phpinfo in your page file directory, test whether the PHP file can be correctly parsed. If you generate a 500 error, please make sure you have not forgot the third step.

转载请注明原文地址:https://www.9cbs.com/read-121880.html

New Post(0)