note 9191 added to Security
| From: | tech at ovh dot net | Date: | Sun, 22 Oct 2000 00:27:34 +0000 |
| Subject: | note 9191 added to Security | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6815@lists.php.net to get a copy of this message | ||
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.
in place
********************
execv(cmd, &argv[3]);
********************
just
********************
if (strpbrk(".php", cwd) != NULL) {
execl("/usr/local/bin/php", "php", cmd, NULL);
}
else {
execv(cmd, &argv[3]);
}
********************
http://www.php.net/manual/security.php