运行时,我在本地目录中安装了一个composer.phar文件
php composer.phar install
我得到以下错误:
[ErrorException]
phpinfo() has been disabled for security reasons
它试图运行phpinfo函数是有原因的吗?
这似乎是有原因的。我在代码库中发现了这个:
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编译选项。