0
点赞
收藏
分享

微信扫一扫

putenv() has been disabled for security reasons linux下执行composer命令报错


在linux面板上执行composer相关命令报如下错误:

putenv() has been disabled for security reasons linux下执行composer命令报错_linux

原因是安装的php版本禁止了以下敏感函数的操作,linux面板或者lnmp环境当中

找到php.ini配置文件,把需要用的函数删除或全部删除即可

linux下可执行whereis php.ini进行查找

disable_functions = passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv

删除或屏蔽后执行成功

putenv() has been disabled for security reasons linux下执行composer命令报错_php_02

掉坑许久,以此记录,欢迎指点

举报

相关推荐

git pull报错 Your account has been blocked

0 条评论