Composer ErrorException

时间:2013-12-16 18:35:38

标签: php composer-php

我运行

时将composer.phar文件安装到我的本地目录
 php composer.phar install

我收到以下错误:

  [ErrorException]                                  
  phpinfo() has been disabled for security reasons

是否有理由试图运行phpinfo函数?

1 个答案:

答案 0 :(得分:1)

似乎有一个原因。我在代码库中找到了这个:

    ob_start();
    phpinfo(INFO_GENERAL);
    $phpinfo = ob_get_clean();
    if (preg_match('{Configure Command(?: *</td><td class="v">| *=> *)(.*?)(?:</td>|$)}m', $phpinfo, $match)) {
        $configure = $match[1];

        if (false !== strpos($configure, '--enable-sigchild')) {
            $warnings['sigchild'] = true;
        }

        if (false !== strpos($configure, '--with-curlwrappers')) {
            $warnings['curlwrappers'] = true;
        }
    }

似乎Composer并不喜欢curl包装器或sigchild编译选项。