Laravel报错:passthru() has been disabled for security reasons 解决方法

这是一个由PHP框架:Laravel开发搭建的微信小程序的后台,但是,我启动的时候提示如下错误:

Laravel development server started:<http://127.0.0.1:8000>

In ServerCommand.php line 39:

passthru() has been disabled for security reasons

中文翻译

在ServerCommand.php中,第39行:

出于安全原因已禁用passthru()

passthru() has been disabled for security reasons

 

解决方法

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 。

    A+
发布日期:2019年11月29日 17:10:39  所属分类:Laravel框架
最后更新时间:2019-11-29 17:10:39
付杰
  • ¥ 69.0元
  • 市场价:99.0元
  • ¥ 0.0元
  • 市场价:99.0元
  • ¥ 129.0元
  • 市场价:199.0元
  • ¥ 29.0元
  • 市场价:99.0元

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: