Вопрос

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.

Это было полезно?

Решение

It sounds like he doesn't allow you to override safe mode. Which makes sense because what would be the point in running a shared server in safe mode if anyone could disable it as they saw fit. You're probably going to need to relocate to a server without safe mode as the only options for changing that value are not going to work for you. Safe mode is already deprecated and is not meant to be used. The "safe" way for a server owner to handle security is through the OS and setting up correct account permissions.

Другие советы

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.

I have managed to disable safe_mode by following instructions from Marco Demaio in last answer in this question How to turn off php safe_mode off for a particular directory in a shared hosting environment?

I hope it works for you too!

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top