edge
3rd July 2008, 17:38
Hi all,
I've got a client that needs a directory writable for his clients.
The main website is in PHP, so disabling PHP for this client is not an option.
I've created a .htaccess file within the writable directory with the following in it.RemoveType application/x-httpd-php php php3
AddType text/html php php3
The above .htaccess file does work, and when a client uploads php or php3 file, and runs it, it will show the file as text.
Problem is that when he uploads it with extention php4 or php5 etc etc it will still run the php code!
I could add a lot of extentions (php5, php6 ..), but this is not really an option.
I will also need to stop .pl, /cgi and any other server side scripting language in this open writable directory!
Anyone here who might have a good tip on how to do this?
I've got a client that needs a directory writable for his clients.
The main website is in PHP, so disabling PHP for this client is not an option.
I've created a .htaccess file within the writable directory with the following in it.RemoveType application/x-httpd-php php php3
AddType text/html php php3
The above .htaccess file does work, and when a client uploads php or php3 file, and runs it, it will show the file as text.
Problem is that when he uploads it with extention php4 or php5 etc etc it will still run the php code!
I could add a lot of extentions (php5, php6 ..), but this is not really an option.
I will also need to stop .pl, /cgi and any other server side scripting language in this open writable directory!
Anyone here who might have a good tip on how to do this?