Solved

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

Posted on 2008-10-30
4
593 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

930 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now