提问人:Satish Kumar 提问时间:11/17/2023 最后编辑:Satish Kumar 更新时间:11/17/2023 访问量:23
PHP 致命错误:未捕获的 ReflectionException:类“配置”在 /var/...../Illuminate/Container/Containex.php:877 中不存在
PHP Fatal error: Uncaught ReflectionException: Class "config" does not exist in /var/...../Illuminate/Container/Containex.php:877
问:
Durign execute command php artisan optimize 此错误显示
[root@cel HTML1 php 工匠优化
PHP 致命错误:未捕获的 ReflectionException:类“配置”不存在于 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php:877 堆栈跟踪:#0 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(877) Relectiondises->构造! #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(758) Illuminate\Container\Container-build() #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(851): Illuminate\Container\Container->resolve() #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(694):iluminate\Foundation\Application->resolve() #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(836): Illuminate\Container\Container->make() #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(1423): Illuminate\Foundation Application->make() #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(472) Illuminate\Container\Container->offsetGet() #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(523): Illuminate\Log\LogManager->getDefaultDriver() #B /var/www/html/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(111): Illuminate\Log\LogManager->parneDriver() #9 /var/www/html/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(583): Illuminate\Log\LogManager->driver() #10 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(252): Illuminate\Log\LogManager->error() #11 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(366 ) Illuminate\Foundation\Exceptions\Handler->report() #12 # /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Foundation\Console\Kernel->reportException() 13 /var/www/html/artisan (37):Illuminate\Foundation\Console\Kernel->handle() #14 (主要) 下一页 Illuminate\Contracts\Container\BindingResolutionException:目标 clann (config) 不存在。在 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/ 中 堆栈跟踪: #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(758) Illuminate\Container\Container->build() #1 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php (851):Illuminate\Container\Container->resolve() #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(694):Illuminate\Foundation\Application->resolve() ):Illuminate\Container\Container->make() 3 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(836 #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(1423):illuminate\Foundation\Application->make()
/var/www/html/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(472): Illuminate\Container\Container-offsetGet() #5 #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Log/LogManager.php(523): Illuminate\Log\LogManager->getDefaultDriver() #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Log/LogManager.php (111) Illuminate\Log\LogManager->parseDriver() /var/www/html/vendor/laravel/framework/src/Illuminate/Log/LogManager.php (583): Illuminate\Log\LogManager->driver() #8 #5 /var/www/html/vendor/laravel/framework/src/111uminate/Foundation/Exceptions/Handler.php (252): 111uminate\Log\LogManager->error() $10 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(366): Illuminate\Foundation\Exceptions\Handler->report() #11 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(131): Illuminate\Foundation\Console\Kernel->reportException() #12 /var/www/html/artisan (37): 111uminate\Foundation\Console\Kernel->handle() $13 (main) thrown in /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php on line 879 [root@letl html]
Tomorrow for a backup process all storage is occupied, so I'm deleted the backup zip file after that Change the config and vendor folder from the backup file.
答:
delete cache in laravel :
run php artisan optimize:clear
or
cd bootstrap/cache/ && rm -rf *.php
for more information => Fatal error: Uncaught ReflectionException
评论