[pmwiki-users] Using PHP as a CGI binary

Joachim Durchholz jo at durchholz.org
Fri Jun 10 02:46:50 CDT 2005


Benjamin Fay wrote:
> Hello.
> 
> I guess i will have no luck installing pmwiki on a server that is using PHP as 
> a CGI binary. I get the following error as soon as i want to edit a page:
> *******
> 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.
> ******

The message means that PHP was installed so that PHP scripts are 
considered executable programs, but restricted so that it will work only 
if called from Apache.

So far, this all is a pretty standard set-up.

What's non-standard is that it throws error messages. I suspect you're 
supposed to add the appropriate magic in the .htaccess file in PmWiki's 
installation directory to make it work; something along the lines of

   AddHandler php .php
   Action php /cgi-bin/php4

assuming that php4 was installed in the /cgi-bin directory.

You should ask your provider what exactly to write, since the details 
depend massively on the details of how Apache and PHP were set up. (It's 
probably a FAQ, so if they offer a FAQ section, looking there first 
might give you a quicker answer.)

Regards,
Jo



More information about the pmwiki-users mailing list