php[tek] 2018 : Call for Speakers

安装

这里描述的socket函数只是PHP扩展的一部分,编译PHP时必须在配置中添加--enable-sockets 配置项来启用。

Note: 在 PHP 5.0.0 开始加入了对 IPv6 的支持。

add a note add a note

User Contributed Notes 1 note

up
-52
seb at stiaan dot io
9 months ago
At the time of writing, most Linux distributions ship their PHP versions with sockets enabled by default.
Tested distros/versions:

CentOS 7, PHP 5.4: Enabled;
CentOS 7, Remi repo, PHP 7.1.1: Enabled;
CentOS 7, DirectAdmin Custombuild, PHP 7.0.9: Enabled;
CentOS 7, DirectAdmin Custombuild, PHP 5.6.24: Enabled;
Debian Jessie, PHP 5.6.30-0+deb8u1: Enabled;
Gentoo Linux ~amd64, PHP 7.1.1: Enabled (USE-flag "sockets" is enabled by default)

Alpine Linux: PHP 5.6.30: Disabled, however this can simply be enabled by installing php5-sockets

I haven't tested other distros/versions, but as far as compatibility goes most systems seem to support sockets out of the box.
To Top