What is PHP's open_basedir restriction?

We have a security measure in place in PHP on all servers called "open_basedir". This is where PHP scripts are restricted with regard to what parts of the server filesystem they can access.

We maintain a list of areas where PHP scripts are allowed to access (/home/username, /tmp + others) and if a script attempts to access a file or directory elsewhere on the filesystem it will result in an error relating to "open_basedir". This stops PHP scripts accessing directories and files owned by other users, specific to the server config and root user, etc.

It is rare that the allowed paths list will need modification for any user. However, sometimes an alteration is required for some scripts to function properly (eg ModernBill). If you think this applies to you, please contact our support team remembering to include the full error message and domain name and we'll investigate.

  • 163 Users Found This Useful
Was this answer helpful?

Related Articles

How do I test Python to make sure it is working for my account?

The following will allow you to create a test script to ensure Python is working on your account...

How do I parse PHP in HTML pages?

If you wish parse PHP in your HTML pages you need to add the following line you the .htaccess...

How do I use the Ioncube loaders?

The Ioncube loaders are installed and ready for use so you don't need to do anything to use them.

Is PHP ran as an Apache module or as CGI?

We run suPHP on our servers, so PHP is running as CGI.

Can I run PHP scripts anywhere on my web space?

You can run PHP scripts anywhere on your web space with the exception of the "cgi-bin".