开发者

PHP Sockets not loading on Centos 5

开发者 https://www.devze.com 2023-03-08 05:36 出处:网络
So I ran sudo yum install php-common to install php-sockets, but phpinfo() is still not showing sockets loaded after restarting apache, and trying a socket_create() in php throws a function开发者_如何

So I ran sudo yum install php-common to install php-sockets, but phpinfo() is still not showing sockets loaded after restarting apache, and trying a socket_create() in php throws a function开发者_如何转开发 not defined error.

I tried adding extension=sockets.so to my php.ini (verified correct php.ini via phpinfo), but it just throws an extension not found on startup, and doing a find / -name 'sockets.so' yields no results.

What gives? Any ideas on what to check next?


UPDATE: Its look like some repository don't include php-socket in their php-common package. So you can either add another repository include php-socket in their php-common package, or install PHP from source and activate socket from the configuration:

./configure --enable-sockets
make && make install
0

精彩评论

暂无评论...
验证码 换一张
取 消