I've cloned a working LARAVEL project.
The LARAVEL project works fine on my local vm, but when I push to production server I get the following error when loading the site in the browser.
PHP message: PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class session does not exist' in /.../vendor/laravel/framework/src/Illuminate/Container/Container.php:779 Stack trace: .0 /…/vendor/laravel/framework/src/Illuminate/Container/Container.php(779): ReflectionClass->__construct('session') .1 /.../vendor/laravel/framework/src/Illuminate/Container/Container.php(659): Illuminate\Container\Container->build('session', Array) .2 /.../vendor/laravel/framework/src/Illuminate/Foundation/Application.php(644): Illuminate\Container\Container->make('session', Array) .3 /.../vendor/laravel/framework/src/Illuminate/Container/Container.php(1234): Illuminate\Foundation\Application->make('session') .4 /.../vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(148
I've tried everyting from the following post: http://ift.tt/2kNNM0f
In that specific post they mention that you should check the .env and other config files for possible errors and spaces that should not be there. I've double checked this and I am unable to find a fault.
I've double checked the PHP packages that is installed on my vm and made sure all of them are available on the server.
One user mentioned to add the following code to the Container.php head and run the artisan command that gives a issue. My problem is that all the artisan commands run without issue, but the site does not load. The above error can be seen in the nginx error log.
namespace {
use Monolog\Logger as Monolog;
class log extends Illuminate\Log\Writer {
function __construct()
{
$this->monolog = new Monolog("local");
}
}
}
I've also followed another users suggestion to use backtrace by adding the following code above the $reflector = new ReflectionClass($conrete) line.
Updated Code in function build within Container.php
dump($concrete, debug_backtrace());
$reflector = new ReflectionClass($concrete);
The resulting output of this file can be viewed here (Quite Large): http://ift.tt/2kQmylF or http://ift.tt/2kNRHtT
Migrations also work fine so DB connection should be good.
Any help would be greatly appreciated. I've tried reinstalling using composer install and this runs without any issues.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire