Disabling PHP Safe Mode for a specific directory

Reply

Join Date: Feb 2005
Posts: 1
Reputation: sea is an unknown quantity at this point 
Solved Threads: 0
sea sea is offline Offline
Newbie Poster

Disabling PHP Safe Mode for a specific directory

 
0
  #1
Feb 10th, 2005
Does anyone have an example of how to disable PHP Safe Mode for a specific directory? My PHP is configured as an Apache module.

Thank you
Reply With Quote Quick reply to this message  
Join Date: Nov 2003
Posts: 360
Reputation: Gary King will become famous soon enough Gary King will become famous soon enough 
Solved Threads: 5
Team Colleague
Gary King's Avatar
Gary King Gary King is offline Offline
PHP/vBulletin Guru

Re: Disabling PHP Safe Mode for a specific directory

 
0
  #2
Feb 11th, 2005
you can use .htaccess

just put a .htaccess file in that dir then the content of the .htaccess file should be:

  1. php_value safe_mode "1"
search for .htaccess on this page: http://ca3.php.net/manual/en/function.ini-set.php for more help
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 18
Reputation: visio is an unknown quantity at this point 
Solved Threads: 0
visio visio is offline Offline
Newbie Poster

Re: Disabling PHP Safe Mode for a specific directory

 
0
  #3
Feb 15th, 2008
or on the php.ini file which you upload to the directory enter this command:

safe_mode = Off
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,748
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Disabling PHP Safe Mode for a specific directory

 
0
  #4
Feb 15th, 2008
Originally Posted by visio View Post
or on the php.ini file which you upload to the directory enter this command:

safe_mode = Off
You bumped into a 2 year old dead thread.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 18
Reputation: visio is an unknown quantity at this point 
Solved Threads: 0
visio visio is offline Offline
Newbie Poster

Re: Disabling PHP Safe Mode for a specific directory

 
0
  #5
Feb 15th, 2008
it is an old thread, but it is quite active in google, I was searching the web for " disabling safe mode for a directory " and this post is the first in google, and I think the solution given by Gary King:
php_value safe_mode "1"
is wrong, I think that probably will enable and not disable safe mode, that is why I've added my two pence.
Last edited by visio; Feb 15th, 2008 at 8:52 pm. Reason: google url
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,748
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: Disabling PHP Safe Mode for a specific directory

 
0
  #6
Feb 15th, 2008
ah! ok.
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 1
Reputation: franzinho is an unknown quantity at this point 
Solved Threads: 0
franzinho franzinho is offline Offline
Newbie Poster

Re: Disabling PHP Safe Mode for a specific directory

 
0
  #7
Oct 3rd, 2008
I tried everything mentionned above to disable the safe_mode of PHP but it still appears On for my local directory in which I execute phpinfo()

My settings:
PHP version:5.1.6
OS: Linux Cent OS
Apache 2.0

What I did:
in the php.ini:
  1. safe_mode=Off

in the .htaccess of my local directory
  1. php_flag safe_mode off

in the httpd.conf
  1. <Directory " /var/www/vhosts/mydomain/httpdocs/mylocaldirectory">
  2. php_admin_flag safe_mode off
  3. </Directory>

What i see in phpinfo:
Directive---------Local Value---------------------------------------------Master Value
safe_mode------On-------------------------------------------------------Off
open_basedir---/var/www/vhosts/mydomain/httpdocs:/tmp----no value

I would also like to clear the local value of open_basedir
i have set already set in my php.ini :
  1. open_basedir=
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC