在php.ini里已经取消注释:
然后也解除了pcntl_fork() 函数的禁止;
重载配置之后,控制台执行带sockets的文件,报错:
- [root@iZwz92gihbn4or64cu5uexZ *********]# php -q php-socket.php
- PHP Warning: PHP Startup: Unable to load dynamic library 'sockets' (tried: /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/sockets (/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/sockets: cannot open shared object file: No such file or directory), /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/sockets.so (/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/sockets.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
- PHP Warning: PHP Startup: Unable to load dynamic library 'php_sockets' (tried: /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/php_sockets (/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/php_sockets: cannot open shared object file: No such file or directory), /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/php_sockets.so (/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/php_sockets.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
复制代码 而且,当尝试从面板重新启动php的时候,会报错:
- 警告消息:
- [14-Oct-2020 11:05:03] NOTICE: PHP message: PHP Warning: PHP Startup: Unable to load dynamic library 'sockets' (tried: /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/sockets (/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/sockets: cannot open shared object file: No such file or directory), /www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/sockets.so (/www/server/php/74/lib/php/extensions/no-debug-non-zts-20190902/sockets.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
复制代码
是不是需要单独安装一下sockets扩展? 请问如何安装呢?
查了下 错误所给出的目录里,确实没有 sockets.so 这个文件
|
|