Setting safe mode to OFF in .htaccess file does not work

eric.itzhak picture eric.itzhak · Mar 2, 2012 · Viewed 33.7k times · Source

I'm on a server with safe mode on. Now the server allows .htaccess files. I have one in my public_html folder with settings of Wordpress. Now in a sub-domain i want to insert an .htaccess file that dsiables safe mode.

i Tried theese:

php_value safe_mode 0
php_flag safe_mode 0
php_value safe_mode off
php_flag safe_mode off

but none worked.

Anyone knows how can i do that? I Can not ask the server owner to disable safe mode, and basicly can't ask him anything.

Answer

Arjan picture Arjan · Mar 2, 2012

It is not possible to change the value of safe_mode in .htaccess. The configuration setting can only be set in php.ini or httpd.conf, as is explained in the manpages

It also wouldn't be safe if it could be set in .htaccess. And it's removed in PHP 5.4, so that could be an argument to tell your hoster to disable it for you.