Saturday, December 14, 2013

Getting drush to work ( on flexwebhosting ) fixing "exec() has been disabled for security reasons" and "This configuration is incompatible with drush."

I run in a bit of trouble installing drush on a new webhost.
I just started following the tutorial on drupal.org:
Specific instructions for installing Drush on different platforms
Since I'm using CentOS I picked the Install Drush on CentOS (with H-Sphere)
But then when I tried to run drush after install I got some errors.
The first one I got was: "exec() has been disabled for security reasons"
After I fixed that one I got:
"The following restricted PHP modes have non-empty values: [error] disable_functions. This configuration is incompatible with drush."

Both errors can be fixed by putting this in the command line on the server:
# mkdir -p ~/.drush
# cp -i /usr/local/lib/php.ini ~/.drush/
# nano ~/.drush/php.ini

Then find the "disable_functions" string and make it is empty:
disable_functions =
save the php.ini file and drush should be working now :)

source articles:
https://drupal.org/node/2009426
http://ventraip.com.au/forums/index.php?/topic/5394-drush-phpini-and-exec/
http://www.6by9.net/drush-on-an-hosting-fix-using-custom-php-ini/