| | |
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
| Thread Tools | Search this Thread |
advanced apache api array basics beginner binary broken cakephp check checkbox class cms code codingproblem combobox cookies cron curl database date datepart display dynamic echo email error file files folder form forms function functions google head href htaccess html image include includingmysecondfileinthechain insert ip javascript job joomla js limit link login mail menu mlm mobile multiple mysql oop outofmemmory paging parse password paypal pdf php problem procedure query radio ram random recursion remote script search server sessions smarty sms source space sql stored syntax system table traffic tutorial unicode up-to-date update upload url validator variable video web webapplications websitecontactform youtube






