简体   繁体   English

Laravel 5.1.11致命错误:消息为“类日志不存在”的未捕获异常“ Re​​flectionException”

[英]Laravel 5.1.11 Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist'

After doing composer update my project starts to show this error in everywhere in my production environment. 完成composer update我的项目开始在生产环境中的任何地方显示此错误。 But in local is working perfectly. 但在本地运行良好。

Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' in 
.../src/Illuminate/Container/Container.php:736 Stack trace: #0 
.../src/Illuminate/Container/Container.php(736): ReflectionClass->__construct('log') #1 
.../src/Illuminate/Container/Container.php(626): Illuminate\Container\Container->build('log', Array) #2 
.../src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array) #3 
.../src/Illuminate/Container/Container.php(837): Illuminate\Foundation\Application->make('Psr\\Log\\LoggerI...') #4 
.../src/Illuminate/Container/Container.php(800): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter)) #5 
.../src/Illuminate/Container/Container.php(771): Illuminate\Cont in 
.../src/Illuminate/Container/Container.php on line 736

My local environment is OSX 10.10.5 and my production environment is Linux. 我的本地环境是OSX 10.10.5,生产环境是Linux。 I made composer update again but don't fix the error. 我再次进行了composer update ,但没有解决错误。

My composer.json is look like this: 我的composer.json看起来像这样:

...
"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "folklore/image": "0.2.*",
    "illuminate/html": "5.*",
    "cartalyst/sentry": "dev-feature/laravel-5"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~4.0",
    "phpspec/phpspec": "~2.1",
    "laracasts/generators": "~1.1",
    "php-console/php-console": "~3.0",
    "php-console/laravel-service-provider": "~5.0"
}, 
...

Thanks guys! 多谢你们!

I found the problem. 我发现了问题。

I removed the packages of my composer.json and works. 删除了composer.json的程序包并开始工作。

"php-console/php-console": "~3.0", “ php-console / php-console”:“〜3.0”,

"php-console/laravel-service-provider": "~5.0" “ php-console / laravel-service-provider”:“〜5.0”

I think that the server does not support the packages because is necessary a .bat file for the packages work. 我认为服务器不支持这些软件包,因为软件包需要一个.bat文件才能正常工作。

Most of the times, this error fixing is very simple. 在大多数情况下,此错误修复非常简单。 Just run 赶紧跑

composer dump-autoload

and without any doubt, your error will be fixed. 毫无疑问,您的错误将得到解决。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用消息“类日志不存在”修复未捕获的异常“ Re​​flectionException”? - How to fix Uncaught exception 'ReflectionException' with message 'Class log does not exist'? Laravel-未捕获的ReflectionException:类日志不存在-配置错误 - Laravel - Uncaught ReflectionException: Class log does not exist - Config error Laravel错误未捕获异常'ReflectionException',消息'Class App \ Http \ Kernel不存在' - Laravel error Uncaught exception 'ReflectionException' with message 'Class App\Http\Kernel does not exist' Laravel:致命错误:未捕获反射异常:Class App\Http\Kernel 不存在 - Laravel : Fatal error: Uncaught ReflectionException: Class App\Http\Kernel does not exist 致命错误:未捕获的 ReflectionException:Class “env”不存在 - Fatal error: Uncaught ReflectionException: Class "env" does not exist 消息“类XXX不存在”的教义未捕获的异常“ Re​​flectionException” - Doctrine Uncaught exception 'ReflectionException' with message 'Class XXX does not exist' 致命错误:未捕获的 ReflectionException:Class 配置不存在 - Fatal error: Uncaught ReflectionException: Class config does not exist 未捕获的 ReflectionException:类日志不存在 Laravel 5.2 - Uncaught ReflectionException: Class log does not exist Laravel 5.2 未捕获的异常 'ReflectionException' 带有消息 'Class App\\Console\\Kernel does not exist' - Uncaught exception 'ReflectionException' with message 'Class App\Console\Kernel does not exist' Laravel Composer错误Uncaught ReflectionException:Container.php中不存在类日志:738 - Laravel Composer error Uncaught ReflectionException: Class log does not exist in Container.php:738
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM