You can disable/enable safe_mode either using .htaccess, php.ini or httpd.conf file. Selecting the right way depends on your php-apache configuration.
If php is compiled as a dso module for apache, you will have to use .htaccess method
If php-apache relationship is CGI, then php.ini file is used to disable safe_mode value
If none of the above works, contact your hosting provider and ask them to disable safe_mode through the servers httpd.conf file. It can be done in your VirtualHost configuration inside httpd.conf file.
.htaccess Code
php_admin_value safe_mode Off [OR]
php_flag safe_mode Off
edit php.ini ( use this command to find php.ini file location – “php -i | grep php.in” )
safe_mode = Off
edit httpd.cof
php_admin_value safe_mode Off
Verify your settings
Create phpinfo page file and put it on the document root and access the page to see if the defult value has been overrided with your defult value.
phpinfo sample.
example
vi phpinfo.php
<?php
phpinfo();
?>
You may use register_globals keyword instead of safe_mode to change values of register_globals variable [off/on values are accepted]

















