问题描述:

composer 无法下载程序或依赖包,出现以下三种错误:

  1. PHP Fatal error: Uncaught Error: Call to undefined function Composer\XdebugHandler\putenv() in phar:///usr/local/bin/composer/vendor/composer/xdebug-handler/src/Process.php:93
  2. [Symfony\Component\Process\Exception\RuntimeException]
    The Process class relies on proc_open, which is not available on your PHP installation.
  3. PHP Fatal error: Uncaught Error: Call to undefined function Symfony\Component\Process\proc_get_status() in phar:///usr/local/bin/composer/vendor/symfony/process/Process.php:1279

解决办法:

一些 PHP 函数在服务器中被禁止了,开放所需函数即可:putenv,proc_open,proc_get_status。