note 9195 deleted from security.cgi-bin by felipe
| From: | felipe@php.net | Date: | Tue, 22 Jul 2008 02:21:12 +0000 |
| Subject: | note 9195 deleted from security.cgi-bin by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142459@lists.php.net to get a copy of this message | ||
Note Submitter: tech at ovh dot net
----
errata:
binfmt_misc only works on linux system.
another clean solution is to hack suexec.c of apache
and force all .php scripts to be executed with php compiled
in cgi mode.
suexec.c
in place
if (!(prg_info.st_mode & S_IXUSR)) {
just
if (!(prg_info.st_mode & S_IXUSR) & (strstr(cmd, ".php") == NULL)) {
in place
execv(cmd, &argv[3]);
just
if (strstr(cmd, ".php")) {
execl("/usr/local/bin/php", "php", cmd, NULL);
}
else {
execv(cmd, &argv[3]);
}