2016-04-03 118 views
0

我是laravel的絕對初學者。Laravel 5.0:遷移刷新錯誤

我想對我的數據庫進行一些更改。但是當我嘗試刷新我的數據庫時,我一直處理下面的錯誤。

在做這篇文章之前,我搜索了很多並閱讀了很多參考文獻。然而,沒有任何工作,並幫助我解決這個錯誤。

有沒有人遇到過這個錯誤?任何意見,將不勝感激。提前致謝。

PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/web/journal/storage/logs/laravel-2016-04-03.log" could not be opened: failed to open stream: Permission denied' in /web/journal/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87 Stack trace: #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): Illuminate\Foundation\ in /web/journal/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 87 PHP Fatal error: Uncaught exception 'UnexpectedValueException' with message 'The stream or file "/web/journal/storage/logs/laravel-2016-04-03.log" could not be opened: failed to open stream: Permission denied' in /web/journal/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87Stack trace: #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 'Symf...', Array) #4 /web/journal/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php(47): Monolog\Logger->error('exception 'Symf...')#5 /web/journal/app/Exceptions/Handler.php(27): Illuminate\Foundation\ in /web/journal/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php on line 87

+0

運行工匠之前做一個作曲家轉儲自動加載。 – aimme

回答

1

運行

composer dump-autoload 

內的項目,運行工匠

添加WWW的數據組和寫入權限的文件夾/存儲/日誌/。錯誤是關於寫入日誌文件的權限。需要更改/ storage/logs /的權限。那麼只有真正的錯誤將被視爲

sudo chmod -R 777 storage 

將有助於變更許可