|
Case 4: PHP parser outside of web tree
A very secure option is to put the PHP parser binary somewhere
outside of the web tree of files. In #!/usr/local/bin/php
as the first line of any file containing PHP tags. You will also
need to make the file executable. That is, treat it exactly as
you would treat any other CGI script written in Perl or sh or any
other common scripting language which uses the
To get PHP to handle Code Examples / Notes » security.cgi_bin.shellandras rokob
You can avoid the need of using the shell-escaping (#! ...) in all your php scripts if you set the executable bit on them and exploit the binfmt_misc support of the Linux kernels.
|