PHP Safe Mode

If you are running a version of PHP older than 5.3.0, and you cannot enable safe mode, this page provides a couple of alternative measures you can take to better secure your PHP configuration.

In some cases, you may be able to use safe mode with a group ID (GID) check rather than a user ID (UID) check. This can be useful if, for example, you have multiple users deploying PHP scripts. To enable safe mode's group ID check, change the following parameter:

  • safe_mode_gid = On

You also may wish to limit directories that can contain include files or executables. To do so, you can specify 1 or both of the following parameters:

  • safe_mode_include_dir = /path/to/include/directory
  • safe_mode_exec_dir = /path/to/executable/directory

You can also read more information about PHP's safe mode feature at the PHP website.

Topic revision: r7 - 28 Nov 2012 - 20:43:51 - Main.LaurenceSimon
AllDocumentation/WHMDocs.MoreAboutSafeMode moved from Sandbox.MoreAboutSafeMode on 13 Oct 2010 - 18:40 by Main.JustinSchaefer - put it back