hiro
hiro

Reputation: 141

laravel 5 Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist'

I am using the laravel 5. But will result in an error message when you try to access the site. Solution but I do not know how. Do not know anyone solutions?

Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' in /home/my-project/www/my-project/vendor/compiled.php:1029 Stack trace: #0
/home/my-project/www/my-project/vendor/compiled.php(1029): ReflectionClass->__construct('log') #1 
/home/my-project/www/my-project/vendor/compiled.php(980): Illuminate\Container\Container->build('log', Array) #2 
/home/my-project/www/my-project/vendor/compiled.php(1493): Illuminate\Container\Container->make('log', Array) #3 
/home/my-project/www/my-project/vendor/compiled.php(1072): Illuminate\Foundation\Application->make('Psr\\Log\\LoggerI...') #4 
/home/my-project/www/my-project/vendor/compiled.php(1056): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter)) #5 
/home/my-project/www/my-project/vendor/compiled.php(1042): Illuminate\Container\Container->getDependencies(Array, Array) #6 
/home/my-project/www/my-project/vendor/compiled.php(980): Illuminate\Container\Container->bui in /home/my-project/www/my-project/vendor/compiled.php on line 1029

Upvotes: 1

Views: 5391

Answers (7)

mylxsw
mylxsw

Reputation: 86

I have solved this problem by adding Double quotation " for utf8 characters in .env file.

Upvotes: 2

PapaHotelPapa
PapaHotelPapa

Reputation: 697

I also had this problem after I made changes to my .env file that didn't involve any whitespace. After I rolled back my changes I was fine.

Upvotes: 2

davidgagnedesign
davidgagnedesign

Reputation: 34

I had the same problem.

Make sure the php PDO extension is installed correctly.

That worked for me.

Upvotes: -1

Hugo Wijdeveld
Hugo Wijdeveld

Reputation: 102

I had the same problem. Turned out that I missed single quotes in my .env file. Whenever you specify a constant with a whitespace (in my case 'Webmaster Test') you need to use qoutes around that. Nasty little error!!

Upvotes: 0

Jonny Vu
Jonny Vu

Reputation: 1428

May be edit you composer.json and remove the following packages:

"php-console/php-console": "~3.0",
"php-console/laravel-service-provider": "~5.0"

run composer update again.

Upvotes: 0

BCsongor
BCsongor

Reputation: 869

I've met with the same problem and after some time wasted I figured out that my deploy script ignored the /config directory and didn't copied to the public site.

I've copied the /config directory and everything is fine :)

(sry for my english :">)

Upvotes: 0

Kornkrit Leelhaphunt
Kornkrit Leelhaphunt

Reputation: 168

At first try run

composer update

Upvotes: 0

Related Questions