Page 1 of 1
Installation problem on PHP 4.2.3
Posted: Mon Sep 30, 2002 2:34 am
by jimmyhat111
I'm running Windows XP, and am trying to use the auto-install of PHP but keep getting an error. I want it to use IIS, but after I enter all the data and get to a certain point in the installation i recieve this error message:
Due to a missing OCX control on your system, the installation Wizard is unable to configure your web server.
PHP still install and everything, but it wont auto-configure the IIS. I've tried manually installing everything and following the text, but even using the FoxServ software the PHP will never work. Any advice?
Posted: Mon Sep 30, 2002 2:45 am
by twigletmac
You need to manually configure IIS to parse .php files as PHP. There is a section in the PHP manual dealing with the installation of PHP on IIS:
http://www.php.net/manual/en/install.ii ... l.iis.iis4
if you follow the instructions (ignore the stuff about the ISAPI module) then IIS should begin to treat .php files as PHP.
Mac
Posted: Mon Sep 30, 2002 2:48 am
by jimmyhat111
Is the missing OCX related to that? Im wondering why i'd get a weird thing like that missing.
Posted: Mon Sep 30, 2002 2:54 am
by twigletmac
Do you have Office installed on your computer? Apparently the missing OCX may have something to do with having an old version of Office or not having one at all (or any of its components like MS Word). Setting up PHP manually isn't all that difficult though, and the
manual does have a step-by-step guide so I wouldn't worry about it too much.
Mac
Posted: Mon Sep 30, 2002 2:57 am
by jimmyhat111
I dont have Office installed or even a older version. So i think ill install office and see if that fixxes the problem. If not, i'll go through the manual install and make sure im not missing any details. Thanks for the help, im eager to get started coding!
Posted: Mon Sep 30, 2002 3:00 am
by twigletmac
Fair enough but you are one step away from having PHP fully configured, if you follow the instructions (which should take you 5 minutes) in the first link I gave you you don't have to install Office.
Mac
Posted: Mon Sep 30, 2002 3:19 am
by jimmyhat111
When it says
"Set up the appropriate security. (This is done in Internet Service Manager), and if your NT Server uses NTFS file system, add execute rights for I_USR_ to the directory that contains php.exe."
Im not sure if i followed this step correctly. Do i goto c:\php and add that folder to be shared on the web. Or what do I do in IIS?
Posted: Mon Sep 30, 2002 3:25 am
by twigletmac
If this is your local machine and not a server setup with NTFS permissions then you shouldn't have to worry about this. If you right-click on the PHP directory and have a security tab when you go to properties the user group Everyone should have full control (all the boxes ticked).
Mac
Posted: Mon Sep 30, 2002 3:47 am
by jimmyhat111
It looks like im getting the same problems I had earlier today. Heres the steps ive gone through
-Put the php.ini in the windows folder
-Set extension_dir = "C:\php\extensions" in the php.ini
-Moved all the dll's into system32
-Added the .php to configuration and pointed it at php.exe
-Rebooted
Yet still it wont show anything and i can view source...Am i missing a step twigletmac?
Posted: Mon Sep 30, 2002 3:51 am
by twigletmac
Have you put a file (for example called test.php) in your c:\inetpub\wwwroot directory containing the following:
and tried to access it as
http://localhost/test.php?
Mac
Posted: Mon Sep 30, 2002 3:58 am
by jimmyhat111
When i create that php page and try to view it through
http://localhost/test.php I get the following:
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.
Posted: Mon Sep 30, 2002 4:03 am
by twigletmac
Urgh, I forget how irritating installing on IIS can be (I think I do it too often so I'm used to all the quirks and kinda forget the little steps, sorry about that). This is something that will require you to edit your php.ini file which should be living in your c:\winnt (or c:\windows depending on which version of the OS you are running). You need to open that in a text editor (Notepad will do fine) and search for the block below:
Code: Select all
; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default. You can
; turn it off here AT YOUR OWN RISK
; **You CAN safely turn this off for IIS, in fact, you MUST.**
cgi.force_redirect = 0
As in what I posted above cgi.force_redirect should equal 0 not 1.
Mac
Posted: Mon Sep 30, 2002 4:10 am
by jimmyhat111
AHA, now were cranking!

Sweet, did the install file not mention that or did I miss it?
Posted: Mon Sep 30, 2002 4:30 am
by twigletmac
I know it's in there somewhere, just can't find it so it's obviously a bit hidden...
Happy coding.
Mac