我的Laravel 5.2运行良好,我很高兴。
然后我执行了:
php artisan config:cache
我的日子变得更黑了
我收到了这条消息:
PHP Fatal error: Uncaught ReflectionException: Class log does not exist in /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:738
Stack trace:
#0 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php(738): ReflectionClass->__construct('log')
#1 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php(633): Illuminate\Container\Container->build('log', Array)
#2 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(687): Illuminate\Container\Container->make('log', Array)
#3 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php(853): Illuminate\Foundation\Application->make('log')
#4 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php(808): Illuminate\Container\Container->resolveClass(Object( ReflectionParameter))
#5 /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php(777): Illuminate\Container\Container->getDependencies(Arr in /home/vagrant/ Code/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 738
Fatal error: Uncaught ReflectionException: Class log does not exist in /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 738
ReflectionException: Class log does not exist in /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 738
Call Stack:
0.0007 351952 1. {main}() /home/vagrant/Code/artisan:0
0.2149 2190096 2. Illuminate\Foundation\Console\Kernel->handle() /home/vagrant/Code/artisan:35
0.2329 2327800 3. Illuminate\Foundation\Console\Kernel->reportException() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Console/ Kernel.php:117
0.2329 2327840 4. Illuminate\Container\Container->offsetGet() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:250
0.2329 2327840 5. Illuminate\Foundation\Application->make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:1178
0.2329 2327896 6. Illuminate\Container\Container->make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:687
0.2329 2327896 7. Illuminate\Container\Container->build() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:633
0.2329 2327896 8. Illuminate\Container\Container->Illuminate\Container\{closure}() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/ Container.php:735
0.2329 2327896 9. Illuminate\Foundation\Application->make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:230
0.2329 2327896 10. Illuminate\Container\Container->make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:687
0.2329 2327896 11. Illuminate\Container\Container->build() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:633
0.2439 2371256 12. Illuminate\Container\Container->getDependencies() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:777
0.2491 2378936 13. Illuminate\Container\Container->resolveClass() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:808
0.2491 2378936 14. Illuminate\Foundation\Application->make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:853
0.2491 2378992 15. Illuminate\Container\Container->make() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:687
0.2491 2378992 16. Illuminate\Container\Container->build() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:633
0.2491 2379104 17. ReflectionClass->__construct() /home/vagrant/Code/vendor/laravel/framework/src/Illuminate/Container/Container.php:738
我真的不知道如何调试它,
我试图删除我所做的任何事情。 有人说它是一个内部有空格的.env文件,但不是我的情况,所以基本上,我不知道如何调试它。
我试过
composer dump-autoload
我尝试删除供应商文件夹
所有php artisan命令都失败了。
这似乎发生在很多人身上,但原因总是不同而且难以调试。
任何帮助将不胜感激!
编辑1:我可以恢复我网站的功能版本删除
bootstrap/cache/config.php
我还做了一个php artisan配置:缓存失败之前
并恢复以前版本的
bootstrap/cache/services.php
但是我想使用这些命令,因为它们会对生产产生重大影响!
答案 0 :(得分:4)
正如noodles_ftw所说,这是一个配置文件问题。所以,检查我的配置文件夹中的错误就可以了,我在jwt.php中有错误
希望它有所帮助!
答案 1 :(得分:2)
请务必检查您的.env文件,并查找包含多个单词但未用双引号括起来的值。
答案 2 :(得分:0)
您需要添加所需的扩展名,如php-mbstring,php-mysql。 安装这些软件包,然后重试