gpt4 book ai didi

php - phpwebsocket-未定义函数socket_create()-在Windows/WAMP上启用php_sockets

转载 作者:行者123 更新时间:2023-12-03 11:58:13 25 4
gpt4 key购买 nike

我从这里 checkout 了PhpWebSockets项目:

https://code.google.com/p/phpwebsocket/

它在WAMP服务器内部的本地主机(Windows 7 64位)框中,位于其自己的项目中。我在Windows命令行中发出以下命令来运行server.php文件:
C:\wamp\bin\php\php5.4.12\php.exe C:\wamp\www\phpwebsocket\server.php

但这会导致以下错误消息:
PHP Fatal error: Call to undefined function socket_create() in C:\wamp\www\phpwebsocket\server.php on line 58

我的WAMP实例确实启用了php_sockets扩展名(因为我看到了 this similar question who had that problem)。

有人知道我可能做错了吗?

最佳答案

在另一个线程中找到了答案:

Error with PHP Websocket and Wamp Server

原来在命令行上运行该文件意味着该文件使用的WAMP服务器与php.ini文件不同。看起来很愚蠢,但是事实证明在该php.ini文件中并没有注释php_sockets,删除它消除了该错误。

关于php - phpwebsocket-未定义函数socket_create()-在Windows/WAMP上启用php_sockets,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21564100/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com