这是一个PHP搭的微信小程序的后台,但是,我启动的时候提示如下错误:
In ServerCommand.php line 39:
passthru() has been disabled for security reasons
中文翻译
在ServerCommand.php中,第39行:
出于安全原因已禁用passthru()
解决方法
passthru()被禁用,解决方法也很简单,只需要修改PHP配置php.ini文件:
将:
disable_functions = scandir,passthru,exec,system,chroot,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,fsocket,fsockopen
删除掉passthru,保存并重起php-fpm即可!
注意:
一般情况下来说,Linux下的 php.ini 的位置:/usr/local/php/etc/php.ini 。