Hi All,

I have Drush installed as /usr/local/bin/drush in a VPS account (w/ root access). Drush has persistently failed to successfully run. Here is an example:

> drush dl pathauto
exec() has been disabled for security reasons environment.inc:479 [warning]
WD php: exec() has been disabled for security reasons in /usr/share/drush/includes/drush.inc on line 600. [error]
WD php: exec() has been disabled for security reasons in /usr/share/drush/includes/drush.inc on line 600. [error]
Unable to download pathauto-6.x-1.3.tar.gz to /home//public_html/sites/all/modules/ from [error]
http://ftp.drupal.org/files/projects/pathauto-6.x-1.3.tar.gz
exec() has been disabled for security reasons in /usr/share/drush/includes/drush.inc on line 600. [warning]
exec() has been disabled for security reasons in /usr/share/drush/includes/drush.inc on line 600. [warning]
An error occurred at function : drush_pm_download [error]

I am using All-versions-3.0-beta1
Adding -l http://sitename.tld did not help!

Any hints as to why this is happening? Solution?

Thank you,
~DrupalFan

Comments

sender’s picture

Check your php.ini for the line: disable_functions = system, exec, shell_exec, passthru

If you remove exec from this line, drush might work for you. Consider that this changes the security settings of php on your server.

greg.1.anderson’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

greg.1.anderson’s picture

Component: Code » PM (dl, en, up ...)

I wanted to add (after the fact) that this does not necessarily have to change the security settings of php on your server, as you can configure drush to use a different php.ini than your webserver uses. On many systems (e.g. Debian), this will be the default configuration, with drush using /etc/php5/cli/php.ini, and the webserver using /etc/php5/apache2/php.ini.

jmlavarenne’s picture

You can have a drush specific php.ini file in $HOME/.drush