Verificación de funciones deshabilitadas
Utiliza este script para verificar si hay funciones deshabilitadas. Ejecuta en la línea de comandos curl -Ss https://www.workerman.net/webman/check | php
Si aparece el mensaje Functions 函数名 has be disabled. Please check disable_functions in php.ini
, significa que las funciones de las que depende webman están deshabilitadas, y necesitas habilitarlas en php.ini para poder usar webman normalmente. Puedes deshabilitarlas siguiendo uno de los métodos que se indican a continuación.
Método uno
Instalar webman/console
composer require webman/console ^v1.2.35
Ejecuta el comando
php webman fix-disable-functions
Método dos
Ejecuta el script curl -Ss https://www.workerman.net/webman/fix-disable-functions | php
para habilitar funciones deshabilitadas.
Método tres
Ejecuta php --ini
para encontrar la ubicación del archivo php.ini utilizado por php cli.
Abre php.ini, busca disable_functions
y habilita las siguientes funciones
stream_socket_server
stream_socket_client
pcntl_signal_dispatch
pcntl_signal
pcntl_alarm
pcntl_fork
pcntl_wait
posix_getuid
posix_getpwuid
posix_kill
posix_setsid
posix_getpid
posix_getpwnam
posix_getgrnam
posix_getgid
posix_setgid
posix_initgroups
posix_setuid
posix_isatty
proc_open
proc_get_status
proc_close
shell_exec
exec
putenv
getenv