posted by qubix on December 26, 2021

Yesterday, I tried to install drush through composer to manage an old Drupal installation:

composer require
search package drush
version constraint 7.4.0

I faced the following error:

  Undefined index: process  

It seems that composer is trying to use a php function which I have disabled for obvious security reasong: proc_open.

Since I could not enable it again, I had to devise a different approach.

1) make a new composer.php.ini

memory_limit = 4096M
max_execution_time = 0
date.timezone = "Europe/Athens"
realpath_cache_size = "4096K"

2) tell php to use it and add neccesary extensions in an one liner

php -n -d -d -d -c /home/user/composer.php.ini /opt/composer/bin/composer require
Problem solved!