Disabled Function Check

Use this script to check for any disabled functions. Run in the command line: curl -Ss https://www.workerman.net/check | php

If you see the message Function function_name may be disabled. Please check disable_functions in php.ini, it indicates that a function required by workerman is disabled. You need to enable it in php.ini to use workerman properly. Choose one of the following two methods to enable it.

Method 1: Script Fix

Execute the script curl -Ss https://www.workerman.net/fix | php to enable the function.

Method 2: Manual Fix

Steps are as follows:

  1. Run php --ini to find the location of the php.ini file used by the PHP CLI.

  2. Open php.ini and find the disable_functions entry to enable the corresponding function.

Required Functions
To use workerman, the following functions need to be enabled:

stream_socket_server
stream_socket_client
pcntl_signal_dispatch
pcntl_signal
pcntl_alarm
pcntl_fork
posix_getuid
posix_getpwuid
posix_kill
posix_setsid
posix_getpid
posix_getpwnam
posix_getgrnam
posix_getgid
posix_setgid
posix_initgroups
posix_setuid
posix_isatty