I've read through a number of issues on this (http://drupal.org/node/736824, http://drupal.org/node/916438, and http://drupal.org/node/918468) but I'm still having trouble.
My basic problem is the same as the issues listed above. Whenever I run drush, I get
exec() has been disabled for security reasons environment.inc:689 [warning]
The following restricted PHP modes have non-empty values: [error]
disable_functions.
I have copied example.drush.ini to ~/bin/drush/drush.ini
and uncommented the line
disable_functions =
But I still get the error. It doesn't seem to recognize the overrides in the drush.ini file
I've also tried
drush --php-ini=~/bin/drush/drush.ini status
but no luck.
I would be very grateful for a nudge in the right direction.
Many thanks!
Comments
Comment #1
greg.1.anderson commentedUse
drush statusto see which php.ini drush is using.You can't use --php-ini to set the file drush will use; you must use an environment variable, or drush.ini. See
drush topic, and read thedrushscript.Comment #2
Anonymous (not verified) commentedHi greg.1.anderson,
Thanks for the quick reply.
drush status gives me
PHP configuration : /usr/local/lib/php.iniI also have a drush.ini file at ~/bin/drush
The drush.ini file is a copy of example.drush.ini with the line
disable_functions =un-commented.
Hope this additional info helps. Let me know if I can provide other information.
Your help is much appreciated!
Doug
Comment #3
greg.1.anderson commentedRead #1 again and check the documentation and the drush script. You should be able to track this one down on your own easier than I can guess what's wrong (but maybe it's that you put drush.ini in your drush folder instead of your $HOME/.drush folder).
Also, please follow the instructions at http://drupal.org/node/add/project-issue/drush before posting support requests.
Comment #4
Anonymous (not verified) commentedOK - Thanks for the reply.
I did do 2 hours on this before posting, trying the approaches in the documentation, including putting drush.ini in ~/.drush (but maybe that is not the right place?)
In any case, I'll keeping working on it on my own, and I'll post back here if I come up with something.
Thanks also for the link to the instructions for posting a support request. Those are helpful tips.
Comment #5
Anonymous (not verified) commentedHi there,
similar issues for me with the php.ini/drush.ini on my shared hosting.
From the various documentations and posts i got the idea to put
into the .bashrc in my home directory to be able to use drush at all.
A lot of commands work fine, but the quite important ones like "up" throw errors.
php -v tells me that the cli version should be ok:
drush status tells me that it uses the php.ini from /etc/php.ini, which is the same as the webserver.
There, i can find those lines also referring to this ioncube and Zend-stuff mentioned in the error message:
Now, i was trying to use the drush.ini from the examples, and put it in .drush as well as in the drush-folder, but to no avail.
drush status still refers to the /etc/php.ini
What other commands could i put in which other files to tell drush not to use /etc/php.ini but that drush.ini ?
I assume that the key lies within the .bashrc, but as this all is rocket science for me, i have really no clue what else to try to make drush run correctly.
Thanx for any hints
Cheers
Bernd
Comment #6
Anonymous (not verified) commentedI'm glad you posted, because I've been meaning to follow up with the work-around that has gotten me back up and running with my shared host.
After trying all sorts of different things, I accidentally discovered that running drush by entering the full path/to/drush/drush worked, and used the drush.ini file. When running just drush, drush would give the "exec() has been disabled for security reasons environment.inc" error and would call the host's php.ini file.
Could this have something to do with using an alias for drush? I haven't had a chance to look into that quite yet, but I'm happy to be drushing again.
Hope this helps!
Comment #7
greg.1.anderson commentedThe handling for
drush.iniis inside of thedrushscript, so that feature won't be available to you if you calldrush.phpdirectly.It is better to use the
drushscript, but if you must call drush per #5 above, read the php documentation to see how to set you php.ini, etc.; also, pass drush the--php-optionsand --php command line options to tell it what php, and what options to use when drush needs to re-launch drush in a subprocess.Read the
drushscript for examples.