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

or on the php.ini file which you upload to the directory enter this command:

safe_mode = Off

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.

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.

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:

safe_mode=Off

in the .htaccess of my local directory

php_flag safe_mode off

in the httpd.conf

<Directory " /var/www/vhosts/mydomain/httpdocs/mylocaldirectory">
php_admin_flag safe_mode off 
</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 :

open_basedir=
This article has been dead for over six months. Start a new discussion instead.