note 9195 added to Security
| From: | tech at ovh dot net | Date: | Sun, 22 Oct 2000 09:59:23 +0000 |
| Subject: | note 9195 added to Security | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6822@lists.php.net to get a copy of this message | ||
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]);
}
http://www.php.net/manual/security.php