欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

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
shareimprove this question
 
   
try php artisan clear-compiled – Limon Monte Apr 20 '15 at 3:55

7 Answers 正确答案

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.
移除 .env 中的有空格的值 中的空格

shareimprove this answer
 

I have solved this problem by adding Double quotation " for utf8 characters in .env file.
.env 中 utf-8 字符需要用双引号括号来?

shareimprove this answer
 

At first try run

composer update
shareimprove this answer
 

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 :">)

shareimprove this answer
 

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.

shareimprove this answer
 

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!!  .env 中 空格的值需要用双引号括号来?

shareimprove this answer
 

I had the same problem.

Make sure the php PDO extension is installed correctly.

That worked for me.

shareimprove this answer
 

来自 https://stackoverflow.com/questions/29738056/laravel-5-fatal-error-uncaught-exception-reflectionexce...


普通分类: