Home Articles

Laravel 5.0:迁移刷新错误

Asked
Viewed 1779 times
0

我是laravel的绝对初学者 .

我想在我的数据库中进行一些更改 . 但是当我尝试刷新数据库时,我会继续处理下面的错误 .

在发这篇文章之前,我用Google搜索了很多内容并阅读了很多参考文献 . 但是,这些都没有奏效,并帮助我解决了错误 .

有没有人遇到此错误?任何意见,将不胜感激 . 提前致谢 .

PHP致命错误:未捕获异常'UnexpectedValueException',消息'流或文件“/web/journal/storage/logs/laravel-2016-04-03.log”无法打开:无法打开流:权限被拒绝'在/web/journal/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87堆栈跟踪:#0 /web/journal/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(88 ):Monolog \ Handler \ StreamHandler-> write(Array)#1 /web/journal/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37):Monolog \ Handler \ RotatingFileHandler-> write(Array) #2 /web/journal/vendor/monolog/monolog/src/Monolog/Logger.php(336):Monolog \ Handler \ AbstractProcessingHandler-> handle(Array)#3 / web / journal / vendor / monolog / monolog / src / Monolog / Logger.php(615):Monolog \ Logger-> addRecord(400,'exception'Unex ...',Array)#4 / web / journal / vendor / laravel / framework / src / Illuminate / Foundation / Exceptions / Handler.php(47):Monolog \ Logger-> error('exception'Unex ...')#5 / web / journal / app / Exceptions / Handler.php(27):第87行上的/web/journal/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php中的Illuminate \ Foundation \发生了致命错误:未捕获的异常'UnexpectedValueException',带有消息'流或无法打开文件“/web/journal/storage/logs/laravel-2016-04-03.log”:未能打开流:权限被拒绝'在/ web / journal / vendor / monolog / monolog / src / Monolog / Handler / StreamHandler.php:87Stack跟踪:#0 /web/journal/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php(88):Monolog \ Handler \ StreamHandler-> write(Array)#1 / web /journal/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php(37):Monolog \ Handler \ RotatingFileHandler-> write(Array)#2 / web / journal / vendor / monolog / monolog / src / Monolog / Logger.php(336):Monolog \ Handler \ AbstractProcessingHandler-> handle(Array)#3 /web/journal/vendor/monolog/monolog/src/Monolog/Logger.php(615):Monolog \ Logger-> addRecord(400) ,'例外'Symf ......',数组)#4 / web / journal / vendor / laravel / framework / sr c / Illuminate / Foundation / Exceptions / Handler.php(47):Monolog \ Logger-> error('exception'Symf ...')#5 /web/journal/app/Exceptions/Handler.php(27):Illuminate第87行的基础\ in /web/journal/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php

1 Answer

  • 1

    composer dump-autoload
    

    在项目内部,在运行工匠之前

    添加www-data组并将权限写入文件夹/ storage / logs / . 错误是关于写入日志文件的权限 . 需要更改/ storage / logs /的权限 . 然后只会看到真正的错误

    sudo chmod -R 777 storage
    

    将有助于改变许可

Related