Page 1 of 1

installing php on win98 w/PWS

Posted: Wed Nov 20, 2002 3:53 pm
by webguy
hello - In the past i've installed php on win2k before and had no problems.

fast forward to now, i'm on a win98 box running pws and I get this error after following the installation guide at http://www.php.net:
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.

For more information as to why this behaviour exists, see the manual page for CGI security.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.
Can anyone shed some light on this issue? Or point me to a site that can answer my questions?

Any help would be much appreciated :)

Thanks,
WebGuy

Posted: Thu Nov 21, 2002 2:33 am
by twigletmac
You need to edit the php.ini and disable force-cgi-redirect.

Mac

Posted: Thu Nov 21, 2002 9:23 am
by webguy
Mac -

I've edited my php.ini file...maybe the changes I made are incorrect. Here is snipet of my php.ini file:
; 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;
I've restarted my box after I've made the change, still a no go.

anythoughts?

-webguy

Posted: Thu Nov 21, 2002 9:31 am
by twigletmac
Just to check ('cause in theory the change you made should work although PWS seems to be a bit iffy when you try and install PHP) you did edit the php.ini in c:\windows\?

PWS does seem to cause a lot of headaches for people trying to install PHP onto it, have you tried using something like sokkit (previously known as PHPTriad) instead and using Apache?

Mac

Posted: Thu Nov 21, 2002 9:51 am
by webguy
heh.. thanks Mac. Silly me thinking you would put an .ini file in your programs folder...I was not changing the one in C:\windows...but the one in C:\php

works now :)

well I guess you live and learn :wink:

thanks again!

-webguy