ini_set()

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
HiddenS3crets
Forum Contributor
Posts: 119
Joined: Fri Apr 22, 2005 12:23 pm
Location: USA

ini_set()

Post by HiddenS3crets »

I am trying to turn off safe mode using ini_set()

Code: Select all

ini_set('safe_mode', 'Off');
but I still get errors when trying to execute functions that can be effected by safe mode.

Why isn't ini_set() working? :(
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: ini_set()

Post by Chris Corbyn »

HiddenS3crets wrote:I am trying to turn off safe mode using ini_set()

Code: Select all

ini_set('safe_mode', 'Off');
but I still get errors when trying to execute functions that can be effected by safe mode.

Why isn't ini_set() working? :(
ini_set() doesn't work on all ini directives. It certainly won't work for safe_mode or it would sort of defeat the object of safe mode on shared hosts 8O
HiddenS3crets
Forum Contributor
Posts: 119
Joined: Fri Apr 22, 2005 12:23 pm
Location: USA

Post by HiddenS3crets »

Damn, safe mode is getting in the way of so much that i'm trying to do. I can't turn it off through php.ini either because I don't have access to restart apache.

I'm assuming there's no other way to turn it off?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

safe_mode has a PHP_INI_SYSTEM setting which is defined as "[PHP_INI_SYSTEM] entry can be set in php.ini or httpd.conf"
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

feyd wrote:safe_mode has a PHP_INI_SYSTEM setting which is defined as "[PHP_INI_SYSTEM] entry can be set in php.ini or httpd.conf"
Does that mean, if it can be set in httpd.conf it might work from a .htaccess file?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

d11wtq wrote:
feyd wrote:safe_mode has a PHP_INI_SYSTEM setting which is defined as "[PHP_INI_SYSTEM] entry can be set in php.ini or httpd.conf"
Does that mean, if it can be set in httpd.conf it might work from a .htaccess file?
Nope.. it would require PHP_INI_PERDIR to support .htaccess.
Post Reply