Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如果禁用了两个函数。服务启动不起来 #13

Closed
cryhac opened this issue Aug 17, 2018 · 4 comments
Closed

如果禁用了两个函数。服务启动不起来 #13

cryhac opened this issue Aug 17, 2018 · 4 comments

Comments

@cryhac
Copy link

cryhac commented Aug 17, 2018

如果禁用函数proc_open和stream_socket_server两个函数将会报错(默认lnmp是禁用的)

PHP Warning: stream_set_blocking() expects parameter 1 to be resource, null given in /root/.config/composer/vendor/react/socket/src/TcpServer.php on line 166
[2018-08-17 17:43:18] INFO: The server is running ...
[2018-08-17 17:43:48] INFO: Client Total: 0; Chunk Server Total: 0
[2018-08-17 17:44:18] INFO: Memory usage: 2523784

但是服务并没有起来。建议添加这两个函数的禁用情况进行异常处理。

解决办法:修复php.ini将这两个函数启用。

@slince
Copy link
Owner

slince commented Aug 20, 2018

这些函数一般在web应用上是用不到的,所以php都是默认给禁掉的,spike是一个cli应用,不是web应用,
所以这些函数是必要的

@slince slince closed this as completed Aug 20, 2018
@slince
Copy link
Owner

slince commented Aug 20, 2018

感谢提issue,对后面的人可能会有帮助

@cryhac cryhac changed the title 如何禁用了两个函数。服务启动不起来 如果禁用了两个函数。服务启动不起来 Aug 20, 2018
@cryhac
Copy link
Author

cryhac commented Aug 20, 2018

我的意思是说,如果禁用了,抛个异常会让后人少走弯路。而且很多人就是个人开发。默认的很多使用lnmp安装的。

@slince
Copy link
Owner

slince commented Aug 20, 2018

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants