[PHP-DEV] Small CGI Serve

2002-06-18 Thread BB

I am trying to write a small CGI webserver.

Having finally found out how to pass the Environment vars onto PHP, I am
stumpted to find that PHP wasn't reading them and putting them in their
place (GET vars).

I tried changing the exe from the php-cli to just php.  This now brings up a
security error and I cannot find a solution

Can anyone help?




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Small CGI Serve

2002-06-18 Thread Stig S. Bakken

On Tue, 2002-06-18 at 13:25, BB wrote:
 I am trying to write a small CGI webserver.
 
 Having finally found out how to pass the Environment vars onto PHP, I am
 stumpted to find that PHP wasn't reading them and putting them in their
 place (GET vars).
 
 I tried changing the exe from the php-cli to just php.  This now brings up a
 security error and I cannot find a solution

The CLI version of PHP is not designed to be run from a web server like
this.  If anything, you can write CGI scripts with it, where you have to
import the environment variables yourself (sounds silly doesn't it? :).

The security error you're getting is probably related to force-redirect,
could you provide the error message?

 - Stig

-- 
Stig Sæther Bakken, Fast Search  Transfer ASA, Trondheim, Norway
http://pear.php.net/wishlist.php/ssb


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DEV] Small CGI Serve

2002-06-18 Thread BB

It is exactly that.

Content-type: text/html 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.

I've tried changing the PHP.ini setting cgi.force_redirect to off, 0, no and
any other negative thing I could think of to no avail

Stig S. Bakken [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Tue, 2002-06-18 at 13:25, BB wrote:
 I am trying to write a small CGI webserver.

 Having finally found out how to pass the Environment vars onto PHP, I am
 stumpted to find that PHP wasn't reading them and putting them in their
 place (GET vars).

 I tried changing the exe from the php-cli to just php.  This now brings up
a
 security error and I cannot find a solution

The CLI version of PHP is not designed to be run from a web server like
this.  If anything, you can write CGI scripts with it, where you have to
import the environment variables yourself (sounds silly doesn't it? :).

The security error you're getting is probably related to force-redirect,
could you provide the error message?

 - Stig

--
Stig Sæther Bakken, Fast Search  Transfer ASA, Trondheim, Norway
http://pear.php.net/wishlist.php/ssb




-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, visit: http://www.php.net/unsub.php