【发布时间】:2018-12-01 09:20:07
【问题描述】:
我已经安装了新的 laravel 5.6,但是当我打开 laravel public 时……它给了我如下错误
/var/lib/jenkins/workspace/ytl/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php
$this->createDir();
$this->errorMessage = null;
set_error_handler(array($this, 'customErrorHandler'));
$this->stream = fopen($this->url, 'a');
if ($this->filePermission !== null) {
@chmod($this->url, $this->filePermission);
}
restore_error_handler();
if (!is_resource($this->stream)) {
$this->stream = null;
throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$this->errorMessage, $this->url));
}
}
if ($this->useLocking) {
// ignoring errors here, there's not much we can do about them
flock($this->stream, LOCK_EX);
}
$this->streamWrite($this->stream, $record);
if ($this->useLocking) {
flock($this->stream, LOCK_UN);
}
}
"流或文件 “/var/lib/jenkins/workspace/ytl/storage/logs/laravel.log”不能 已打开:无法打开流:权限被拒绝”
【问题讨论】:
-
可能会发生另一个错误,但网络用户无权写入您的日志。很清楚的错误信息,你检查过你的网络用户对存储/日志的权限吗?
-
是的@Devon 另一个视图有同样的错误...我给两个文件夹 777 权限然后网站打开
标签: laravel laravel-5.6