How do I resolve an open_basedir restriction error?

The Auto-Provision modules require use of the tmp directory on your webserver. Access to this tmp folder can sometimes be impacted when open_basedir is enabled, which restricts access to folder paths on your webserver outside of a predefined list of folder paths. 

A typical error for this issue looks like this:

Fatal error: Uncaught exception 'RuntimeException' with message 'SplFileInfo::isDir(): open_basedir restriction in effect. File(/tmp/..) is not within the allowed path(s)

In order to resolve this issue, you can try a few different steps:

1. Add the path to your system tmp folder to the open_basedir list of approved folder paths by adding or editing the variable open_basedir in your php.ini file to include the path to your system tmp folder. 

2. Disable open_basedir in your php.ini file by removing or commenting out the variable.

3. If you are running PHP 5.5.0 or above, you can try redefining the path to the system tmp folder by adding the line sys_temp_dir = /path/to/new/folder/ to your php.ini file, pointing to a folder within your WHMCS directory.

Note; You can implement the PHP changes for only WHMCS by creating a new php.ini file with the new variables within your WHMCS directory and adding the line suPHP_ConfigPath /path/to/folder/ to your .htaccess file. If you choose to create a custom php.ini file, it is recommended to copy the currently functioning php.ini file to the new folder location and start editing from there.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

FTP upload failed. ftp_put(): TYPE is now 8-bit binary

If you see this error coming from the configuration check file or from the WHMCS error log and...

*** Troubleshooting Guide ***

If you are experiencing difficulties installing or using our module, please try the following:...

Error Creating Temporary Directory

The Auto-Provision modules rely on the use of the server’s temporary directory for packaging the...

Why is my provisioning process slow?

When you experience slowness with the provisioning process (typically greater than 45 seconds),...

500 Internal Server Error

If you are receiving a 500 Internal Server Error when trying to activate the module, please...