I'm just curious if there's a way to disable things like shell_exec()
using the .htaccess file or something, not globally, but only for specific subdomains or directories (possibly disable fopen()
on files above the subdir). It occurred to me that on one of my shared hosts where I'm sharing subdomain space with a friend he could use PHP to get a look at directories outside his own.
Perhaps I could use mod_rewrite and send any hit anywhere through a PHP script that disables certain things before forwarding the request to where it was going? Would this work, and would it incur a significant performance penalty?