Closed darkcloud784 closed 7 years ago
Try to use require_once __DIR__.'/vendor/autoload.php'
instead, or any localtion where composer put your files after composer install
Your include path says __DIR__ . "/../vendor/autoload.php"
meaning /var/www, but I'm guessing your composer.json & vendor directory are in /var/www/html. Change the require_once line as was suggested above.
FYI - you should create a public
folder, to put in all your public facing PHP code that the webserver can access. Keep the folder with composer.json one directory lower than the webroot, so your packages & git & config.php aren't exposed to the web.
You could leave your project in /var/www/html, then just configure your webserver to use /var/www/html/public as the webroot.
Hello,
I'm VERY new to coding in general but have been working on a home dashboard for my homelab. Anyway, I seem to be having an issue authenticating and connecting to my transmission server. below is my code, I have all the values setup in config.php in an array for easy changes.
My error from the server:
[Tue Nov 29 10:47:44.230019 2016] [:error] [pid 10068] [client localhost:50418] PHP Fatal error: require_once(): Failed opening required '/var/www/html/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/html/main.php on line 25, referer: redacted/