禁用函數檢查

使用這個腳本檢查是否有禁用函數。命令行運行curl -Ss https://www.workerman.net/webman/check | php

如果有提示Functions 函數名 has be disabled. Please check disable_functions in php.ini說明webman依賴的函數被禁用,需要在php.ini中解除禁用才能正常使用webman。
解除禁用參考以下方法任选其一即可。

方法一

安裝webman/console

composer require webman/console ^v1.2.35

執行命令

php webman fix-disable-functions

方法二

執行腳本 curl -Ss https://www.workerman.net/webman/fix-disable-functions | php 以解除禁用

方法三

運行php --ini 找到php cli所使用的php.ini文件位置

打開php.ini,找到disable_functions,解除以下函數的調用

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