若在执行 php artisan cache:clear 时出现错误:Uncaught UnexpectedValueException: The stream or file "/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87,须要赋予 /storage/log 读写权限: chmod -R 777 storage/logs;php
此时再执行 php artisan cache:clear,若继续出错:[ErrorException] file_put_contents(/bootstrap/cache/services.php): failed to open stream: Permission denied,须要赋予 bootstrap/cache 读写权限:chmod -R 777 bootstrap/cache;laravel
再执行 php artisan cache:clear,若仍然出错:[PDOException] SQLSTATE[HY000] [1045] Access denied for user 'xxx'@'127.0.0.1' (using password: YES),则须要查看 laravel 的数据库配置是否正确。 2. 参考 laravel框架中提示错误:file_put_contents(/): failed to open stream: Permission denied - 百度知道数据库
Laravel 5 migration error - stackoverflowbootstrap