We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
New design
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.8.2.2. Error "Fatal error: require * (): Failed opening required"

When ​working with a call to files to connect to the current script, an 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 by which the script accessed the file. Instead require there may be other functions: require_once, include etc.
  • Failed opening required ~/example.com/www/example.php - the reason for the error. In this case, it is reported that the file ~/example.com/www/example.php cannot be found at the specified path or cannot be accessed.
  • in /home/example/example.com/www/somefile.php - the file from which another file was accessed. This information can be useful for debugging.

The most common causes of this error:

  • The absence of a called file.
    The most common reason is the absence of the called file. The problem can be observed when copying, moving or other actions with site files. Also, sometimes files can be deleted both by the user and by the scripts of the sites themselves, which is why such an error will occur.
  • Invalid path to the called file.
    In case of such a problem, you should pay attention to the correctness of the path to the file specified in the error and the real path. It is important to note that there are certain directions that can be confusing when finding a path, for example:
    • /./ - means the current directory. In fact, it can be omitted along the way, since it does not carry any changes in addressing.
    • /../ - means parent directory. It is often used in scripts to form relative paths. For example, the path example.com/www/include/../vendor/somefile.php is actually a way example.com/www/vendor/somefile.php.
    • In Linux, the case of file and directory names is important. For example, if the script tries to access a file by name SomeFile.php, and in fact the file is stored in the file system under the name somefile.php, then an error occurs that the file you are looking for was not found. Unlike Windows, files SomeFile.php and somefile.php they are two different files.
  • Invalid permissions to the searched file.
    If the rights set for the file do not allow the group to read it, then it will not be opened by another script. To reset rights, it is recommended to use the functionality recovery rights by default. For correct operation, it is recommended to use the rights 640 for files and 750 for catalogs.