php 宝塔开启sockets
未知
2020-07-16 17:13:30
0次
问题描述:
linux服务器安装的宝塔面板,在使用socket的时候,putty:php index.php start 提示错误。
然后去宝塔的php.ini 开启extension=sockets。重启php的时候报错:
[16-Jul-2020 16:48:19] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'sockets' (tried: /www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/sockets (/www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/sockets: cannot open shared object file: No such file or directory), /www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/sockets.so (/www/server/php/72/lib/php/extensions/no-debug-non-zts-20170718/sockets.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
解决办法:
期间遇到pcntl_fork() has been disabled for security reasons in file ../Workerman/Worker.php on line 1203
的问题,是因为php禁用了pcntl_fork函数。需要解除禁用。
然后执行 php http_test.php start -d
相关内容