Link to home
Start Free TrialLog in
Avatar of Danimal
Danimal

asked on

How to disable php in a directory used for file uploads?

Within a hosting account at Godaddy, I have 15 domains running, each in a subdirectory off the host root.  In addition, there are subdirectories off the root for various ftp accounts.  I need to make sure no one can run php scripts or do anything else potentially damaging from within any of those ftp file upload directories.  Right now, there is nothing to stop people from uploading nasty php and causing problems for my host setup.

Godaddy tech support stated the php.ini and/or htaccess files can control the availability of php on those directories.  Their advice was to google this, but I have been unable to find an explanation for how to do what I need.  Hence, I need to put down points to get help with this.  :-)

I am thinking the information I need must be pretty simple, something like,

"put 'yidda blong bling' into htaccess within the directories you want php turned off, plus do this other thing in php.ini file."

A simple explanation for how to do what I need here would be extremely valuable to me right about now.  As always, any information, comments, suggestions will be extremely much appreciated.

I use php, mysql all the time, but never got a handle on htaccess before.  I have tweaked a few things in php.ini.  Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of psimation
psimation
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
PS, the link mentions changes to your httpd.conf file - if you have apache server and you can add .htaccess, then you can add this to a .htaccess file and dont need to edit httpd.conf ( which godaddy will probably not allow anyway)
Avatar of Danimal
Danimal

ASKER

Excellent, exactly what the dr. ordered.  
As of January 25, 2011, the link given above appears to dead.