What is PHP Safe Mode?
“Safe mode” is a general term for a state in which a piece of software has been stripped down to its most basic settings. This is usually done to fix stability or security problems.
Users of Windows who have had serious system problems have almost certainly been forced to boot into safe mode at some point.
Safe mode is a security feature in PHP that was made to stop hackers from using PHP scripts to run commands at the level of the operating system (such as Linux shell commands).
It was meant to be a security measure for web applications running on shared hosting accounts.
VPS and dedicated servers running single web hosting accounts didn’t need it.
It never worked well, though, so PHP developers have taken it out of version 6, which will be released soon.
With PHP safe mode turned on, the main problem is that some basic functions that web scripts need just wouldn’t work.
Customers who bought shared hosting accounts from owners of dedicated servers had to deal with locked-down accounts or look for other security tools, like ModSecurity.
Safe mode has never worked well with Joomla in particular, so the developers recommend turning it off to get the most out of the content management system.
To turn off PHP safe mode on a server, open the php.ini file (usually in /etc/php) and change the line that says:
safe_mode = Off
To find out if safe mode is really off, you can make a php info file called phpinfo.php that has the following code in it:
< ?php phpinfo(); ?>
If you run the script in your web browser, it will print out all of the PHP settings.
Lastly, find the section for “safe mode” and make sure it says “off.”