当前位置: 代码迷 >> 综合 >> fopen(): open_basedir restriction in effect
  详细解决方案

fopen(): open_basedir restriction in effect

热度:5   发布时间:2023-12-14 11:32:00.0

laravel+workerman执行:php artisan workerman start --d报错:

fopen(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/xxxxxxx/) in file /xxxxx/vendor/workerman/workerman/Worker.php on line 1239
fopen(/dev/null): failed to open stream: Operation not permitted in file /xxxxxx/vendor/workerman/workerman/Worker.php on line 1239
fopen(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/xxxxxx/) in file /xxxxxx/vendor/workerman/workerman/Worker.php on line 1239
fopen(/dev/null): failed to open stream: Operation not permitted in file /xxxxxx/vendor/workerman/workerman/Worker.php on line 1239
fopen(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (/xxxxxx/ceshiytsjk:/tmp/:/proc/) in file /xxxxxx/vendor/workerman/workerman/Worker.php on line 1239
fopen(/dev/null): failed to open stream: Operation not permitted in file /xxxxxx/vendor/workerman/workerman/Worker.php on line 1239

在php.ini中找到open_basedir,将/dev/null添加进去

多个值时,windows中用“;”隔开,linux中用“:”隔开

open_basedir = "/xxxx/:/dev/null"

 

 

 

 

  相关解决方案