| | |
Disabling PHP Safe Mode for a specific directory
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
you can use .htaccess
just put a .htaccess file in that dir then the content of the .htaccess file should be:
search for .htaccess on this page: http://ca3.php.net/manual/en/function.ini-set.php for more help
just put a .htaccess file in that dir then the content of the .htaccess file should be:
PHP Syntax (Toggle Plain Text)
php_value safe_mode "1"
•
•
Join Date: Jan 2007
Posts: 18
Reputation:
Solved Threads: 0
or on the php.ini file which you upload to the directory enter this command:
safe_mode = Off
safe_mode = Off
•
•
Join Date: Jan 2007
Posts: 18
Reputation:
Solved Threads: 0
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.
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
•
•
Join Date: Oct 2008
Posts: 1
Reputation:
Solved Threads: 0
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:
in the .htaccess of my local directory
in the httpd.conf
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 :
My settings:
PHP version:5.1.6
OS: Linux Cent OS
Apache 2.0
What I did:
in the php.ini:
PHP Syntax (Toggle Plain Text)
safe_mode=Off
in the .htaccess of my local directory
PHP Syntax (Toggle Plain Text)
php_flag safe_mode off
in the httpd.conf
PHP Syntax (Toggle Plain Text)
<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 :
PHP Syntax (Toggle Plain Text)
open_basedir=
![]() |
Similar Threads
- PHP in Safe-mode on cPanel. (*nix Software)
- IE only loading pages in Safe Mode on XP Home (Web Browsers)
- WIn XP Pro opens only Safe mode (Windows NT / 2000 / XP)
Other Threads in the PHP Forum
- Previous Thread: File Download problem
- Next Thread: To convert ASPX files to PHP
Views: 53977 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess access ajax apache api array beginner binary broken cakephp checkbox class cms code cron curl database date directory display download dynamic echo email encode error file files folder form forms function functions google howtowriteathesis href htaccess html image include insert integration ip java javascript joomla jquery limit link login loop mail menu methods mlm mod_rewrite multiple multipletables mysql oop parse paypal pdf php problem provider query radio random recursion regex remote script search select server sessions sms soap source space speed sql structure syntax system table template tutorial update updates upload url validation validator variable video web xml youtube






