When you program in PHP on a web server, you usually make multiple includes or requires to other files on your website. This may be because you need a class or certain functions that, for convenience and code clarity, are located in a different path from the file/plugin you are editing.
The open_basedir configuration is mainly used to prevent PHP scripts of a particular user from accessing files belonging to another user's account.
Some plugin files or imported website files attempt to include or require other files that are located outside the web folder of our project, that is, in directories that are at lower levels than the root folder of our website.
It is possible that at some point, when trying to modify a file or a plugin, the system denied you access—even though you had the necessary permissions—with the following message:
open_basedir restriction in effect. File(../ruta/archivo.php) is not within the allowed path(s)
This indicates that the PHP directive open_basedir is preventing access to the location where the file is stored. As mentioned, open_basedir is a directive that defines the limit of the files PHP can access according to the specified path. Therefore, if the file you want to use is outside that path, the system will display this error.
For security reasons, the open_basedir directive is enabled and cannot be disabled on cdmon hosting accounts.
If you correctly define the path of your files, any file within your own account should be readable by your own scripts.
The root directory of hosting accounts on cdmon servers is /usr/home/nombredelhosting.com
Related Articles
Information and uses of the .htaccess file
1.- What is a .htaccess? The .htaccess (hypertext access) file is the default name for Apache’s directory-level configuration file. It is used to customize the configuration of directives and parameters defined in the main hosting configuration file. ...
How to modify hosting file permissions
From the cdmon Control Panel, in the hosting management, you can modify the permissions of your website's files and directories. To change permissions, in the 'Security' section click on the option File and folder permissions In this section you can ...
How to resolve the most common PrestaShop errors
PrestaShop is one of the most popular CMS platforms for online stores. It offers a wide range of plugins, modules, and themes to customize and add new functionalities to your shop. As usual, while working with the application, error messages may ...
How to resolve Joomla's most common mistakes
Joomla is a popular content management system that allows us to create dynamic websites easily. One of its particular features is the ability to add new functionalities through extensions such as components, modules, templates, and plugins. Like all ...
How to use GIT commands with Bitbucket repository
In this tutorial we will show the steps to take to use the GIT commands to clone files from your hosting in a repository created in Bitbucket with the SSH of their cdmon hosting. First of all, you need to have a repository created in Bitbucket. If ...