Home > Backend Development > PHP Tutorial > php socket_create undefined的异常解决方法

php socket_create undefined的异常解决方法

WBOY
Release: 2016-06-13 11:03:55
Original
1044 people have browsed it

php socket_create undefined的错误解决办法

使用phpwebsocket的时候编译server.php报这个错误。

首先在cmd中跳转到server.php的目录下执行php server.php(要在系统环境变量中设置path引用到C:\wamp\bin\php\php5.4.3)报这个错误。

根据网上的提示将apache的php.ini的socket和gd2都打开了。在phpinfo()中显示socket为enabled。但是依然报错。

接着又检查了C:\wamp\bin\apache\apache2.2.22\bin\php.ini(已打开socket)。C:\wamp\bin\php\php5.4.3\phpForApache.ini

还是无效。

最后检查了下C:\wamp\bin\php\php5.4.3\php.ini。发现里面的socket根本没打开过。看来apache设置的php.ini应该是C:\wamp\bin\apache\apache2.2.22\bin\php.ini这个文件。

?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template