Menu
Menu

How to turn PHP Safe Mode Off

Posted in Linux on July 30, 2017
Tags: , , , ,

The first and easiest solution: Contact your hosting company. Ask them to turn PHP Safe Mode Off. If you don't want to contact your webhost, you can turn it off yourself manually. Here's how.

Turn of PHP Safe Mode Off in Linux using some basic VI Commands.

  1. Using SSH, connect to your server. Do this as root. If not, then you can SU to Root in the next step.
  2. Once you are logged in, type su - root.
  3. For your password, type the same password you used to connect to your server.
  4. At the command prompt type this to edit your php.ini file:
    vi /etc/php.ini
  5. Go to the line safe_mode = on and press the "i" key on your keyboard.
  6. Change the line to safe_mode = off and press the "Esc" key.
  7. Type :wq! to save your file.
  8. You might have to reboot your server now.

Turn PHP Safe Mode Off on a Windows server

  1. Using Remote Desktop Connection, log in to your server as an administrator.
  2. Open c:\windowsphp.ini in Notepad.
  3. Change the line safe_mode = on to safe_mode = off.
  4. Save and close windowsphp.ini .
  5. You might have to restart your webserver for changes to take affect.

Leave a Reply

Your email address will not be published. Required fields are marked *