Home > PHP > To disable the safe mode for particular domain

To disable the safe mode for particular domain

October 8th, 2009

You cannot turn safe_mode off in .htaccess.

You can only change this value in system files (root access needed); php.ini or in <virtualhost> entry in apache’s httpd.conf.
More info: http://www.php.net/features.safe-mode

HOW-TO:
Changing safe_mode to off (or on) in just one domain

edit /usr/local/apache/conf/httpd.conf
find something similar to:
Quote:
<VirtualHost IP.IP.IP.IP>
ServerAlias www.domain.com domain.com
ServerAdmin webmaster@domain.com
DocumentRoot /home/user/public_html
(…)
</VirtualHost>
of the domain name you wish to change, and palce inside <virtualhost></virtualhost>:
<IfModule mod_php4.c>
php_admin_flag safe_mode off (or on)
</IfModule>

That way, domain.com will have safe_mode disabled (or enabled)

PHP

  1. No comments yet.
  1. No trackbacks yet.