How to disbale PHP

software development

#1

I have a directory for users to upload images only to. It runs on a perl script. The script allows me to choose files which are able to be uploaded.

But, recently someone uploaded cwings.php.jpg and it was able to execute.

Is there anyway to disable php in a directory. I’ve tried using scripts in the .htaccess file but nothing works. I understand it can be done in httpconfig, but I’m only on a DH virtual server.

TIA

Kerry


#2

Try adding this to your .htaccess file for the directory.

RemoveHandler .cgi .php

I have not tried this, but it should work.

Mark


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )


#3

Thanks Mark, it works. That’s a few beers I owe you.

I can sleep in peace tonght.

Cheers

Kerry


#4

No problem Kerry, I figured it would work, but I am glad it actually did :slight_smile:

Mark


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )