composr安装软件失败的解决方法

PHP Warning:  putenv() has been disabled for security reasons in phar:///usr/local/bin/composer/vendor/composer/xdebug-handler/src/Process.php on line 149

Warning: putenv() has been disabled for security reasons in phar:///usr/local/bin/composer/vendor/composer/xdebug-handler/src/Process.php on line 149
PHP Warning:  putenv() has been disabled for security reasons in phar:///usr/local/bin/composer/bin/composer on line 57

Warning: putenv() has been disabled for security reasons in phar:///usr/local/bin/composer/bin/composer on line 57
PHP Warning:  putenv() has been disabled for security reasons in phar:///usr/local/bin/composer/vendor/composer/xdebug-handler/src/Process.php on line 149

Warning: putenv() has been disabled for security reasons in phar:///usr/local/bin/composer/vendor/composer/xdebug-handler/src/Process.php on line 149
PHP Warning: putenv() has been disabled for security reasons in phar:///usr/local/bin/composer/bin/composer on line 57

Warning: putenv() has been disabled for security reasons in phar:///usr/local/bin/composer/bin/composer on line 57

原因

这个问题的原因主要是php为了安全问题,禁止putenv()这个函数。

解决方法

修改php的配置文件,php.ini
找到disable_function这个地方,把putenv去掉即可。

你可能感兴趣的:(PHP语言,php,composer,laravel)