Answer the question
In order to leave comments, you need to log in
Why doesn't a laravel site work on shared hosting?
Hello. I am developing a simple website on laravel 5.4. Everything works locally. I decided to upload to free (just to let my friends test) hosting. I updated PHP to version 7 on the hosting. I uploaded the files of the framework itself (everything except the public folder) to a folder above the public_html level (./public_html/../), uploaded the contents of the public folder (the one in the framework) to public_html on the hosting. In index.php I registered the paths to autoload.php:
require __DIR__.'/../bootstrap/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
Warning: include(/home/u820974330/vendor/composer/../symfony/http-foundation/ParameterBag.php): failed to open stream: No such file or directory in /home/u820974330/vendor/composer/ClassLoader.php on line 440
Warning: include(): Failed opening '/home/u820974330/vendor/composer/../symfony/http-foundation/ParameterBag.php' for inclusion (include_path='.:/opt/php-7.0/pear ') in /home/u820974330/vendor/composer/ClassLoader.php on line 440
Fatal error: Uncaught Error: Class 'Symfony\Component\HttpFoundation\ParameterBag' not found in /home/u820974330/vendor/symfony/http-foundation/Request.php:276 Stack trace: #0 /home/u820974330/vendor/symfony /http-foundation/Request.php(258): Symfony\Component\HttpFoundation\Request->initialize(Array, Array, Array, Array, Array, Array, NULL) #1 /home/u820974330/vendor/symfony/http- foundation/Request.php(2012): Symfony\Component\HttpFoundation\Request->__construct(Array, Array, Array, Array, Array, Array, NULL) #2 /home/u820974330/vendor/symfony/http-foundation/Request .php(317): Symfony\Component\HttpFoundation\Request::createRequestFromFactory(Array, Array, Array, Array, Array, Array) #3 /home/u820974330/vendor/laravel/framework/src/Illuminate/Http/Request. php(59): Symfony\Component\HttpFoundation\Request::createFromGlobals() #4 /home/u820974330/public_html/index.php(53): Illuminate\Http\Request::capture() #5 {main} thrown in /home/u820974330/vendor/symfony/http-foundation/Request .php on line 276
Answer the question
In order to leave comments, you need to log in
Everything is written in the error there, do a composer update, if it doesn’t help, then see what you set up the curve, and name the host or check the files
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question