note 113899 deleted from security.cgi-bin.shell by salathe
| From: | salathe@php.net | Date: | Tue, 02 Aug 2016 11:52:06 +0000 |
| Subject: | note 113899 deleted from security.cgi-bin.shell by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-206152@lists.php.net to get a copy of this message | ||
Note Submitter: terom at fixme dot fi
----
You can use binfmt-misc to avoid the need for the #! line, by registering your php5-cgi binary as an
interpreter for *.php files. E.g. with Debian binfmt-misc installed:
update-binfmts --install php5 /usr/bin/php5-cgi --extension php
cat /proc/sys/fs/binfmt_misc/php5
However, you still need chmod +x on the .php file. And Apache will give a rather sad "500
Internal Server Error" if you are missing the +x permissions :( You can improve the error
message using mod_rewrite (but not obliviate the need for +x)..