禁用関数チェック
このスクリプトを使って、禁止されている関数があるかどうかを確認します。コマンドラインでcurl -Ss https://www.workerman.net/webman/check | php
を実行してください。
もしFunctions 函数名 has be disabled. Please check disable_functions in php.ini
というメッセージが表示された場合、webmanが依存している関数が無効になっていることを示します。正常にwebmanを使用するためには、php.iniで無効を解除する必要があります。
無効解除の方法は以下のいずれかを参考にしてください。
方法一
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