Digital Point Forums
Send Money Online

Go Back   Digital Point Forums > Design & Development > Programming > PHP
Google Analytics
Log In to view
your analytics

Reply
 
Thread Tools
  #1  
Old May 9th 2008, 3:36 am
orptiin orptiin is offline
Peon
 
Join Date: Jun 2006
Posts: 8
orptiin is on a distinguished road
disable php engine on a folder and its sub folders ??

Hello
I have a VPS, php5 runs as apache mod, for security I want disable php excute on a folder and its sub folders ??? how can I do ?

thanks for your time !

HN
Reply With Quote
  #2  
Old May 9th 2008, 4:49 am
lanmonkey lanmonkey is offline
Hand of A'dal
 
Join Date: May 2007
Posts: 460
lanmonkey is on a distinguished road
Quote:
Originally Posted by orptiin View Post
Hello
I have a VPS, php5 runs as apache mod, for security I want disable php excute on a folder and its sub folders ??? how can I do ?

thanks for your time !

HN
don think you can do that, but you prevent access to any .php file using simple deny rules in htaccess
Reply With Quote
  #3  
Old May 9th 2008, 7:04 am
wmtips's Avatar
wmtips wmtips is offline
Twilight Vanquisher
 
Join Date: Aug 2006
Location: 404 Not Found
Posts: 505
wmtips has a spectacular aura aboutwmtips has a spectacular aura aboutwmtips has a spectacular aura about
Try to use RemoveHandler (or RemoveType) in .htaccess (http://httpd.apache.org/docs/1.3/mod...#removehandler)
__________________
Site Information Tool ― $ € £ Adsense tips
Reply With Quote
  #4  
Old May 9th 2008, 7:52 am
jestep's Avatar
jestep jestep is offline
of the Nightfall
 
Join Date: Dec 2004
Location: Austin
Posts: 2,398
jestep is a name known to alljestep is a name known to alljestep is a name known to alljestep is a name known to alljestep is a name known to alljestep is a name known to all
Are you trying to disable php exec(), or are you trying to disable php from running on a directory?

exec() can be disabled directly in httpd.conf, or in .htaccess. Php can be disabled using htaccess in the specific directory as wmtips suggested.
Reply With Quote
  #5  
Old May 9th 2008, 8:44 pm
orptiin orptiin is offline
Peon
 
Join Date: Jun 2006
Posts: 8
orptiin is on a distinguished road
some folders need to chmod 777 for users upload images, mp3 , 777 is not secure ??? so I want any php file can not run from these folders .

I am newbie
thanks
Reply With Quote
  #6  
Old May 12th 2008, 5:17 am
jestep's Avatar
jestep jestep is offline
of the Nightfall
 
Join Date: Dec 2004
Location: Austin
Posts: 2,398
jestep is a name known to alljestep is a name known to alljestep is a name known to alljestep is a name known to alljestep is a name known to alljestep is a name known to all
Try chmod 666 or 776 for any of those folders. Test to make sure it works, but this should remove the ability to execute from all the files in that directory.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a difference between "/folder/" and "/folder/index.php"? (dupe content) robdp Search Engine Optimization 2 May 8th 2008 9:49 am
Redirect root traffic to new folder without affecting other folders AccidentReport Site & Server Administration 2 Mar 20th 2008 1:12 am
Help with php include and folders gre PHP 2 Oct 20th 2007 9:53 am
Private folders via php elvee PHP 2 May 19th 2006 9:24 am
insert .txt or .php on empty folders clover Apache 0 Mar 4th 2006 4:50 am


All times are GMT -8. The time now is 4:43 am.