php without webserver?

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

kappar
Forum Newbie
Posts: 1
Joined: Sat Jun 22, 2002 2:51 pm

Setup

Post by kappar »

Please Help I am useing PWS on Win 98 and useed the PHP installer because I am New to this and am trying to learn and taught the installer would be eaiser but i keep getting this error when trying to view my PHP Page I have been trying all day to fix this but can't any help.

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.
User avatar
Sevengraff
Forum Contributor
Posts: 232
Joined: Thu Apr 25, 2002 9:34 pm
Location: California USA
Contact:

Post by Sevengraff »

I would try Xitami server, PHP installs with it fine, but ive never gotten mysql to work with it. I use Xitami for local testing on my laptop.
Zmodem
Forum Commoner
Posts: 84
Joined: Thu Apr 18, 2002 3:59 pm

Post by Zmodem »

I recall reading somewhere, that in order to get PWS to execute CGI correctly, you need to edit registry variables. I don't remember which though

There are tons of free web servers out there. Xitami/Apache are 2 that have already been mentioned, and are probably your best bet
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Try editting your php.ini file (found in the Windows directory) so that:

Code: Select all

cgi_force_redirect=1
becomes

Code: Select all

cgi_force_redirect=0
I know this works to solve the same problem on IIS so it may help on PWS as well.

If that doesn't work you need to read this...

Mac
Post Reply