

php 运行 composer install 报错
Process class relies on proc_open, which is not available on your PHP i
views
| comments
遇到的问题#
运行 composer install 报错 :
问题 1#
The Process class relies on proc_open, which is not available on your PHP i
nstallation.
bash问题 2#
PHP Fatal error: Uncaught TypeError: Return value of Symfony\Component\Process\Process::close() must be of the type integer, null returned in phar://composer2.5.8/composer.phar/vendor/symfony/process/Process.php:1466
Stack trace:
bash解决#
在 PHP 的配置文件 php.ini 中,确保未禁用 proc_open
,proc_get_status
函数。找到以下配置项:
disable_functions = ...
bash确保 proc_open
,proc_get_status
不在禁用列表中。如果存在,请移除。
验证是否已启用
php -r "var_dump(function_exists('proc_open'));"
php -r "var_dump(function_exists('proc_get_status'));"
bash如果输出为 bool(true)
,则说明已启用。