问题是我这里有一群 Web 开发人员,每个人都在 Windows 中使用 WAMP。在那里,他们使用名为 php_websockets
的 php 扩展。基本上在 php.ini 中,他们只需取消注释 ;php_websockets.dll 即可。
另一方面,我使用 Linux(本例中为 CentOS 7),并且我不可能在任何 php.ini
或 conf 存档中找到 php_websockets
。
我知道有很多网络套接字。但他们坚持认为必须就是这个。
最佳答案
不确定是否有多个“php websockets”项目;找出他们正在使用的版本号可能会有所帮助。假设是这个:http://sourceforge.net/projects/phpwebsockets/ ,有linux安装说明http://sourceforge.net/projects/phpwebsockets/files/ :
LINUX INSTALLATION - Tested and works on the following systems: - Fedora Core 17 PHP-5.4.9 x86_64 - Fedora Core 18 PHP-5.4.10 x86_64 - Fedora Core 18 PHP-5.4.12 x86_64
Build it from source - Simply unpack the files and at a shell prompt type these commands.
# phpize
# ./configure --enable-websockets
# make
# make install
# cp websockets.ini /etc/php.d/
If all went smoothly, websockets should be installed and working. If you have any issues, please post them in the sourceforge ticket system https://sourceforge.net/p/phpwebsockets/tickets/
NOTE: You will have to re-build if you update PHP
关于php - Linux 中的 web_sockets 等价物在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29899344/