Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drush 3.3 reports an error associated with another php configuration file.
Executing drush with the following command: php -c /etc/drush.ini /usr/local/drush/drush.php
Drush status shows PHP configuration: /etc/drush.ini
In our php.ini file safe_mode is enabled. In the drush.ini file safe mode is disabled. When attempting to update with drush we receive the error PHP safe mode is activated. If we disable safe_mode in php.ini the error goes away and the process executes without exception.
Comments
Comment #1
greg.1.anderson CreditAttribution: greg.1.anderson commentedWhenever you call drush directly via php, you also need to specify the --php arg so that drush will know which php to use if it makes a system call (exec) to itself, as update does.
alias drush php -c /etc/drush.ini /usr/local/drush/drush.php --php='php -c /etc/drush.ini'
Comment #2
gp177 CreditAttribution: gp177 commentedWorked great.
Just had to escape the / in the php option. Otherwise it broke under eval.
Comment #3
greg.1.anderson CreditAttribution: greg.1.anderson commentedYeah, I just typed that without trying it -- thanks for following up with the fix.