workerman后台运行提示fopen(/dev/null): failed to open stream

phper

sudo php start.php start -d

Warning: fopen(): open_basedir restriction in effect. File(/dev/null) is not within the allowed path(s): (.:/tmp/) in /var/www/html/workerman-chat-master2/Workerman/Worker.php on line 678
PHP Warning: fopen(/dev/null): failed to open stream: Operation not permitted in /var/www/html/workerman-chat-master2/Workerman/Worker.php on line 678

阅读 3546
2个回答

latin

感觉是你环境问题啊,你的php.ini中设定了open_basedir=/tmp/ ?
设置了open_basedir,那么php只允许打开open_basedir指定目录下的文件。
但是看报错workerman要操作/dev/null这个目录的文件,所以报错了。

把php,ini中的open_basedir重新设置下或者屏蔽掉就好了

  • 暂无评论
walkor

嗯,这种问题百度下就出来了

  • 暂无评论