Php include issues
Hi all,
Im sorry if this is a very silly question.
When users use PHP on our server if they include a file or require a file like so
require_once 'vendor/autoload.php';
it will error out saying.
PHP Warning: require_once(vendor/autoload.php): failed to open stream: No such file or directory in /home//public_html/development/index.php on line 10 [15-Sep-2017 17:18:46 Europe/London] PHP Fatal error: require_once(): Failed opening required 'vendor/autoload.php' (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear') in /home//public_html/development/index.php on line 10
Although the file is there. its showing the include pather as ".:/opt/cpanel/ea-php56/root/usr/share/pear" rather than their user area.
This seems odd.. How can i make this to their user area ?
-
Hello, You can define the absolute path instead of the relative path to address that issue. EX: /home/username/public_html/development/vendor/autoload.php
Let us know if that helps. Thank you.0 -
It did not help 0 -
It did not help
Hello @Willyhaase, Are your cPanel users developing their own PHP applications? Or, do your cPanel users encounter this error across content management platforms like WordPress? Thank you.0 -
This same issue happens to me I am a cPanel user who develops my own PHP application. How to solve this issue, please? 0 -
I would like the following scenery: 3 Symfony apps which store the content of their public directory into the "public_html". I created 3 dirs: dev, pre and pro. Then, I run the following command: - ln -s ~/dev/public public_html (the same for pre and for pro). But it doesn't work. A 404 error is showed. How to solve it? 0 -
Hello I am also struggling with a PHP Fatal error: Uncaught Error: Class 'Drupal\Core\DrupalKernel' not found in Please help 0
Please sign in to leave a comment.
Comments
6 comments