installing php on win98 w/PWS

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
webguy
Forum Newbie
Posts: 7
Joined: Wed Nov 20, 2002 3:53 pm
Location: Kansas City, MO

installing php on win98 w/PWS

Post 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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You need to edit the php.ini and disable force-cgi-redirect.

Mac
webguy
Forum Newbie
Posts: 7
Joined: Wed Nov 20, 2002 3:53 pm
Location: Kansas City, MO

Post 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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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
webguy
Forum Newbie
Posts: 7
Joined: Wed Nov 20, 2002 3:53 pm
Location: Kansas City, MO

Post 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
Post Reply