Solved

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

Posted on 2008-10-30
4
596 Views
Last Modified: 2013-12-13
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.
0
Comment
Question by:Danimal
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
psimation earned 75 total points
ID: 22848050
0
 
LVL 17

Expert Comment

by:psimation
ID: 22848054
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)
0
 
LVL 1

Author Closing Comment

by:Danimal
ID: 31511929
Excellent, exactly what the dr. ordered.  
0
 

Expert Comment

by:Robert_Lawson_Brown
ID: 34707872
As of January 25, 2011, the link given above appears to dead.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
parse url to form? 7 25
reverse engineer .sql from php files 11 35
Uploading a CSV Data Import via PHP & MySql 3 32
Log in through ID 5 18
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question