Anyone know the directive for turning safe mode off in htaccess?
cPanel.net Support Ticket Number:
Anyone know the directive for turning safe mode off in htaccess?
cPanel.net Support Ticket Number:
why do you want to turn safe mode off?
'php_flag safe_mode off' perhaps?
cPanel.net Support Ticket Number:
there is a client that has a script that is basically trying to create files, which Safemode is preventing from happening.
I tried that, didn't work. Oh well.
cPanel.net Support Ticket Number:
There is a way to turn safe mod off just for one account. I just don't know the way. Try searching around. Safe Mod is a good thing to have on.
cPanel.net Support Ticket Number:
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:of the domain name you wish to change, and palce inside <virtualhost></virtualhost>:<VirtualHost IP.IP.IP.IP>
ServerAlias www.domain.com domain.com
ServerAdmin webmaster@domain.com
DocumentRoot /home/user/public_html
(...)
</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)
~ DM
But this doesn't work for me !!! Is there any other way to do it ??
cPanel.net Support Ticket Number:
Yeah ...
Try "php_admin_value safe_mode 0" then ...
This one works correctly, I am sure
cPanel.net Support Ticket Number:
~ DM
Thanks for your help.
But it doesn't work![]()
I'm running Linux RedHat 7.3 Sever and Apache Build without phpSuexec and would like to use Safe Mode but I need to exclude one of my sub-Domain from Safe Mode.
I used both the methods expained here but they didn't work for me.
Please help me.
cPanel.net Support Ticket Number:
This is the way to do it - are you sure you restarted the server after adding:Originally posted by NiN
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 tof 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_admin_flag safe_mode off
to the user's vhost entry in httpd.conf?
cPanel.net Support Ticket Number:
Make sure that mod_php4.c mod is loaded otherwise it will not workOriginally posted by donnie
Thanks for your help.
But it doesn't work![]()
I'm running Linux RedHat 7.3 Sever and Apache Build without phpSuexec and would like to use Safe Mode but I need to exclude one of my sub-Domain from Safe Mode.
I used both the methods expained here but they didn't work for me.
Please help me.
cPanel.net Support Ticket Number:
The safemode off directive is usually set to only work in httpd file in which you need root access to change. It can't usually be set in an .htaccess file or it would be basically useless. You just add the above directive to httpd under the specific domain's virtual listing. This will shut off safemode for the entire account, not just a subdomain.
<IfModule mod_php4.c>
php_admin_flag safe_mode off
</IfModule>
very thanks![]()