Click to See Complete Forum and Search --> : Can't get windows PhP4.2.2 on IIS going


lennie
09-04-2002, 09:02 PM
Mate,
I am desperate to get PhP windows XP version 4.2.2 running on IIS going. This is what I did to set it up on my windows.

1. copied all dlls in the c:\php\dlls to windows\system32
2. Php.ini edited cgi_force_redirect = 0 and placed it in windows\system32
3. Copied php.exe to c:\php\sapi\
4. In IIS Webb Site Home Directory, set up PhP.Exe

I got this error message while testing it. I am not using Apache Wed Server.

Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

Could anyone please help me out. Thanks heaps.

:confused:

lennie
09-05-2002, 10:30 PM
Hi all,

Thanks for trying to help. For the benefits of those first timer like me trying to get PhP CGI version 4.2.2 to run on Windows using IIS, here is the detail step by step instruction that I copied from one the PhPBuilder contributors. (found it by chance). I presumed that IIS and PHP has already been installed on the PWS.

;;; Instructions ;;;;;;;

• In the Windows Control Panel, open Administrative Tools | Internet Information Services.
• In the tree view, expand the entry labeled local computer, then under Web Sites look for Default Web Site (unless you have virtual hosts set up, in which case, choose the site you want to add PHP support to). Right-click on the Web Site and choose Properties.
• Click the ISAPI Filters tab, and click Add.... In the Filter Name field, type PHP, and in the Executable field, browse for the file called php4isapi.dll in the sapi subfolder of your PHP folder (e.g. C:\PHP\sapi\php4isapi.dll). Click OK.
• Click the Home Directory tab, and click the Configuration... button. On the Mappings tab click Add. Again choose your php4isapi.dll file as the executable and type .php in the extension box (including the '.'). Leave everything else unchanged and click OK. If you want your Web server to treat other file extensions as PHP files (.php3, .php4, and .phtml are common choices), repeat this step for each extension. Click OK to close the Application Configuration window.
• Click OK to close the Web Site Properties window. Close the Internet Information Services window.
• Again, in the Control Panel under Administrative Tools, open Services. Look for the World Wide Web Publishing service near the bottom of the list. Right-click on it and choose Restart to restart IIS with the new configuration options. Close the Services window.
• You're done! PHP is installed!


Enjoy.

Cheers,
Lennie