首页 > 解决方案 > ErrorException flock() 期望参数 1 是资源

问题描述

我有一个 laravel Web 应用程序,它有一些用户并且运行良好。

但有时我会在下面显示这个错误:

ErrorException App\Http\Controllers\ApiController@errorLog flock() expects parameter 1 to be resource, bool given

我拥有所有权限的文件夹。

像stackoverflow中的其他线程一样:

chmod 775 storage/framework/cache

chmod 775 storage/framework/cache/data

sudo chgrp www-data storage/framework/cache

sudo chgrp www-data storage/framework/cache/data

我认为会有更多的人同时访问它并且文件被锁定。但是在发生此错误的用户中,他们只是在使用它。

我无法理解这种情况。

标签: phplaravellaravel-8

解决方案


推荐阅读