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.

  • 148 Users Found This Useful
Was this answer helpful?

Related Articles

What is the path to Sendmail?

The path to Sendmail on our servers is: /usr/sbin/sendmail

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...

Can I use FormMail type scripts?

Yes we allow you to run FromMail type scripts, we strongly recommend that you use the nmsFormMail...

Do you know of any PHP resources?

An excellent resource for users of PHP is http://www.devshed.com/c/b/php/ They also have a nice...

What is the path to ImageMagick?

Imagemagick is a popular utility for manipulation of image files within scripts and is often used...