note 5736 deleted from security.cgi-bin by bjori
| From: | bjori@php.net | Date: | Wed, 12 Apr 2006 14:34:16 +0000 |
| Subject: | note 5736 deleted from security.cgi-bin by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-107875@lists.php.net to get a copy of this message | ||
Note Submitter: kstone at trivergent dot net
----
binfmt_misc works. You make the .php3 files into executables which you can run under suexec, which
is nice.<p>However, you will need to patch php to get it to work. In the main.c file, there
is a section that checks to see whether certain environment variables are set (such as SERVER_NAME).
If they are, php assumes that it is being run as a cgi.<p>
To fix this, add a line "cgi = 0;" after the those checks. This will force the program to
*never* enter cgi mode, and php scripts will run properly.<p>
You can also run them from the command-line, like ./index.php3 ...