[Xitami] Security Alert! PHP CGI cannot be accessed directly.

Thomas J. Hruska xitami@lists.xitami.org
Thu, 24 Jan 2002 09:52:47


At 07:26 AM 1/24/2002 -0500, Bob Paddock writeth:
>I'm running Xitami on my Linux box, I wanted to try out some PHP scripts and 
>I got the following, can some one transliate what it might mean for Xitami 
>since it seems to be written fro Apache?:
>
>"Security Alert! 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.  This variable is set, for example, by Apache's Action directive 
>redirect.

This probably suggests that you were, at one time, running PHP from Apache.
 Apache sets the REDIRECT_STATUS CGI variable when it executes the PHP
binary.  You have two options:

1)  Recompile the PHP binary by following the rest of the directions.  This
may or may not be acceptable depending on whether other users on the system
are allowed to use PHP from the command-line.

2)  Create a wrapper program/Perl script for PHP that sets the
REDIRECT_STATUS environment variable.  Then point Xitami at the wrapper
program instead of at PHP.

Hope this helps!


          Thomas J. Hruska -- shinelight@shininglightpro.com
Shining Light Productions -- "Meeting the needs of fellow programmers"
                  http://www.shininglightpro.com/