Friday, September 18, 2020
Home Coding & Programming How to Disable the open_basedir Setting in cPanel and Plesk

How to Disable the open_basedir Setting in cPanel and Plesk

The open_basedir function defines the locations or paths from which PHP is allowed to access files using functions like fopen() and gzopen(). If a file is outside of the paths defined by open_basdir, PHP will refuse to open it. You cannot use a symbolic link as a workaround, because the path that the symbolic link resolves to falls under the restrictions of the open_basedir function.

When trying to install some PHP script, it is very common sometimes to get the error message below.

ERROR: Please disable the open_basedir setting to continue.

If you are getting such error, you will have to disable the open_basedir setting before you can continue such installation. So for those of us who do not know how to do that, here is a simple guide basically for cPanel and Plesk.

Disabling open_basedir Setting in cPanel

There are three ways to disable open_basedir restriction in cPanel.

1. Site wide

  • Open your php.ini and look for the open_basedir line and comment it.
  • Save your php.ini changes and restart your web server

2. By specific site

This configuration works only on apache web servers.

  • Open your apache web server’s configuration file (httpd.conf) and at the bottom type this line.

php_admin_value open_basedir “none”

  • Save and restart your apache web server.

3. From the PHP Settings

  • Go to cPanel and look out for PHP Settings.

PHP Settings

  • Open the settings of the default PHP version and disable open_basedir feature.

Disabling open_basedir Setting in Plesk

This is very simple as all we just need to is disable open_basedir for the domain we are working on.

  • In Plesk, locate and click on PHP Settings.

Disable open_basedir in Plesk

  • Move down the PHP Settings page to open_basedir and click on the drop down box.

Disable open_basedir in Plesk2

  • Select None from the drop down list.

Disable open_basedir in Plesk3


  • Finally, scroll down and click on Apply then Ok to save the changes you just made.



Please enter your comment!
Please enter your name here

- Advertisment -

Most Popular

List of All JavaScript Arithmetic Operators With Examples

JavaScript offers several operators to help us work with numbers. All these operators are binary operators, which means they operate on two operands. The operands...

How to Find a Website’s RSS Feed’s URL

Having access to the RSS feed of a website gives you the opportunity to stay up-to-date on everything that website publishes. Whether that’s a...

Laravel: String data, right truncated: 1406 Data too long for column (SOLVED)

I was working on a project today when i ran into the error message "String data, right truncated: 1406 Data too long for column...

How to Enable or Disable Chrome’s Autofill on Android Devices

Storing your login details and other information in Chrome and/or your Google Account isn’t as secure as using an encrypted password manager, but it’s...

Recent Comments