PDA

View Full Version : Please turn off safe_mode in your php.ini file configuration



blueonline
October 16th, 2006, 13:00
i have recently installed Boonex dolphin community script and it says
Please turn off safe_mode in your php.ini file configuration
http://navimumbai.ifastnet.com/site/install/index.php
can't figure out wot to do.
can anybody help ?

stuffradio
October 16th, 2006, 13:07
don't know if this will work, but try making a .htacess file and type:



safe_mode "0"


Then upload the .htacess file to the root directory

krakjoe
October 16th, 2006, 14:19
I don't think you can overide safe_mode, also the correct syntax would be



php_admin_flag safe_mode Off


I don't think that'll work in htaccess but might be worth a go.....

stuffradio
October 16th, 2006, 14:39
Meh... I was looking on php.net didn't exactly read what it said where to put it, but I was assuming .htaccess because you don't normally have access to php.ini when you are on shared hosting, etc.

btw, php.net says safe_mode "0" ;)

althought it could also be httpd.conf according to php.net

Darko
October 17th, 2006, 00:10
i searched for safe mode in my httpd.conf file and couldn't find, i'm using xampp, but i found it in php.ini is says:
safe_mode = Off
and there's a whole chapter about it in the php manual
http://ru2.php.net/results.php?q=safe+mode&p=manual&l=en

blueonline
October 17th, 2006, 11:14
no luck :(( !

Darko
October 17th, 2006, 12:55
ok, i searched alot, and this is what i came up with. the only way to bypass safe mode on php consists of running php as a cgi while processing certain php scripts, but the performance of the script will take a hit to do that:

1-create a .htaccess file
2-write:
Action php-script /interpreters/php-script
AddHandler php-script .php
AddHandler php-script .php3
3-upload this file to the directory that you the files to bypass the safe mode

now, if this don't and even if it works, i suggest asking your host to just turn off the safe mode, and if he asks why tell him because "the biggest problem with safe mode is that people use it" and that's according to Lerdorf( the guy that created php)

Regards

krakjoe
October 17th, 2006, 16:56
that will only work if php is compiled as a cgi binary from source, which mostly it isn't.

safe_mode Off and
safe_mode "0"

is the correct syntax for php.ini, however the correct syntax from an .htaccess file or from *.conf is either

php_admin_flag setting value or
php_flag setting value

depending on what you're messing with.

As there is a reason that most hosts enable safemode, it's not something that can be bypassed easily.