?
Solved

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

Posted on 2008-10-30
4
Medium Priority
?
606 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
psimation earned 300 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to dynamically set the form action using jQuery.
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…
Suggested Courses

770 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