LNMP安装composer install时出现Warning: putenv()


layout: post
title: LNMP安装composer install时出现Warning: putenv() has been disabled for security reasons in…的问题
date: 2020-03-29
tags: ["Laravel"]


原文地址:https://www.wjcms.net/archives/lnmp%E5%AE%89%E8%A3%85composerinstall%E6%97%B6%E5%87%BA%E7%8E%B0warningputenvhasbeendisabledforsecurityreasonsin%E7%9A%84%E9%97%AE%E9%A2%98

LNMP安装composer install时出现Warning: putenv() has been disabled for security reasons in...的问题

原因:LNMP 禁用了部分存在危险的PHP函数

解决方法:
lnmp环境中编辑PHP配置文件:

vi /usr/local/php/etc/php.ini进入编辑状态

输入/,进入搜索模式,找到disable_functions

寻找disable_functions字符串,将后面的putenv删除

要是装了宝塔面板
直接找到环境设置,选择php 里面有禁用函数,直接删除即可

你可能感兴趣的:(LNMP安装composer install时出现Warning: putenv())