Кіраванне файламі cookie, якія выкарыстоўваюцца для рэкламы, такіх як персаналізацыя рэкламы, рэмаркетынг і аналіз эфектыўнасці рэкламы.
2.8.2.2. Error "Fatal error: require*(): Failed opening required"
When loading files to include in the current script, the following error may occur:
Fatal error: require*(): Failed opening required ~/example.com/www/example.php in /home/example/example.com/www/somefile.php
require*():— the function used by the script to load the file. Instead ofrequire, you can userequire_once,include, etc.Failed opening required ~/example.com/www/example.php— the cause for the error. In this case, the message indicates that the file~/example.com/www/example.phpcannot be found at the specified path or is inaccessible.in /home/example/example.com/www/somefile.php— the file from which the call to another file was made. This information can be useful for debugging.
The most common causes of the error:
- Missing file. The most common cause is precisely that the file being called is missing. This issue can occur when copying, moving, or performing other actions on site files. Additionally, files may sometimes be deleted either by a user or by the site's own scripts, which can cause this error to occur.
- Incorrect path to the file being called. If this problem occurs, you should compare the file path specified in the error message with the actual path. It is important to note that paths may contain elements that can cause confusion when determining the path, for example:
/./— current directory. You can simply ignore this, as it has no effect on the path./../— parent directory. This is often used in scripts when constructing relative paths. For example, the pathexample.com/www/include/../vendor/somefile.phpis actually the pathexample.com/www/vendor/somefile.php.- In Linux, file and directory names are case-sensitive. For example, if a script attempts to access a file named
SomeFile.php, but the file is actually stored in the file system under the namesomefile.php, an error will occur stating that the file was not found. Unlike in Windows,SomeFile.phpandsomefile.phpare two different files.
- Incorrect file permissions. If the file permissions do not allow the group to read the file, it will not be opened by another script. To reset permissions, we recommend using restore default permissions. For proper operation, use permissions
640for files and750for directories.
(1)