2.8.2.3. Error "open_basedir restriction in effect"

The "open_basedir restriction in effect" error occurs when a script attempts to access a file located in a directory one level higher than the one specified by the open_basedir parameter.

To resolve the issue, you must meet one of the following conditions:

  • Place the target file in a location accessible to the script. That is, in the directory specified as the value of the open_basedir parameter, or in any of its subdirectories.
  • Disable the open_basedir setting or change its value to the desired directory so that the script being executed can access it.
  • Use the exec command to work with these files. The open_basedir setting does not apply to commands executed in the CLI. Please note that this method is extremely insecure.
Content