? tao
? includes/table.inc
Index: drush
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/drush/drush,v
retrieving revision 1.23
diff -u -p -r1.23 drush
--- drush	30 Oct 2010 17:52:28 -0000	1.23
+++ drush	5 Nov 2010 20:17:57 -0000
@@ -41,28 +41,46 @@ if [ -z $COLUMNS ]; then
   fi
 fi
 
-# Default to using the php that we find on the PATH.
-# Note that we need the full path to php here for Dreamhost, which behaves oddly.  See http://drupal.org/node/662926
-php=`which php`
-
-# We check for a command line (cli) version of php, and if found use that.
-which php-cli >/dev/null 2>&1
-if [ "$?" = 0 ] ; then
-  php=`which php-cli`
+if [ ! -z "$DRUSH_PHP" ] ; then
+  # Use the DRUSH_PHP environment variable if it is available.
+  php="$DRUSH_PHP"
+else
+  # Default to using the php that we find on the PATH.
+  # Note that we need the full path to php here for Dreamhost, which behaves oddly.  See http://drupal.org/node/662926
+  php=`which php`
+
+  # We check for a command line (cli) version of php, and if found use that.
+  which php-cli >/dev/null 2>&1
+  if [ "$?" = 0 ] ; then
+    php=`which php-cli`
+  fi
+
+  # Special case for *AMP installers, since they normally don't set themselves as the default cli php out of the box.
+  for amp_php in /Applications/MAMP/bin/php5/bin/php /Applications/MAMP/bin/php5.2/bin/php /Applications/MAMP/bin/php5.3/bin/php /opt/lampp/bin/php /Applications/xampp/xamppfiles/bin/php /Applications/acquia-drupal/php/bin/php; do
+    if [ -x $amp_php ]; then
+      php=$amp_php
+    fi
+  done
 fi
 
-# Special case for *AMP installers, since they normally don't set themselves as the default cli php out of the box.
-for amp_php in /Applications/MAMP/bin/php5/bin/php /Applications/MAMP/bin/php5.2/bin/php /Applications/MAMP/bin/php5.3/bin/php /opt/lampp/bin/php /Applications/xampp/xamppfiles/bin/php /Applications/acquia-drupal/php/bin/php; do
-  if [ -x $amp_php ]; then
-    php=$amp_php
+# Check to see if the user has provided a php.ini file or drush.ini file in any conf dir
+# Last found wins, so search in reverse priority order
+for conf_dir in /etc/drush $HOME/.drush ; do
+  if [ -f $conf_dir/php.ini ] ; then
+    drush_php_ini=$conf_dir/php.ini
+  fi
+  if [ -f $conf_dir/drush.ini ] ; then
+    drush_php_override=$conf_dir/drush.ini
   fi
 done
 
-# Check to see if the user has provided a php.ini file particularly for drush
-if [ -f $HOME/.drush/php.ini ] ; then
-  php="$php --php-ini $HOME/.drush/php.ini"
-elif [ -f /etc/drush/php.ini ] ; then
-  php="$php --php-ini /etc/drush/php.ini"
+# Add in the php file location and/or the php override variables as appropriate
+if [ "x$drush_php_ini" != "x" ] ; then
+  php="$php --php-ini $drush_php_ini"
+fi
+if [ "x$drush_php_override" != "x" ] ; then
+  drush_override_vars=`grep '^[a-z_A-Z0-9]\+ *=' $drush_php_override | sed -e 's|\([^ =]*\) *= *\(.*\)|\1="\2"|' -e 's| ||g' -e 's|^|-d |' | tr '\n\r' '  '`
+  php="$php $drush_override_vars"
 fi
 
 # Pass in the path to php so that drush knows which one
Index: examples/example.drush.ini
===================================================================
RCS file: examples/example.drush.ini
diff -N examples/example.drush.ini
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ examples/example.drush.ini	5 Nov 2010 20:17:57 -0000
@@ -0,0 +1,61 @@
+;$Id: $
+;
+; Example of a drush php settings override file
+;
+; Use this file in instances when your system is
+; -not- configured to use separate php.ini files for
+; webserver and cli use.  You can determine which
+; php.ini file drush is using by running "drush status".
+; If the php.ini file shown is your webserver ini
+; file, then rename this file to drush.ini and copy it
+; to one of the following locations:
+;
+; 1. User's .drush folder (i.e. ~/.drush/drush.ini)
+; 2. System wide configuration folder (e.g. /etc/drush/drush.ini)
+;
+; When in use, the variables defined in this file
+; will override the setting values that appear in
+; your php.ini file.  See the examples below for
+; some values that may need to be set in order for
+; drush to work.
+;
+; NOTE:  There is a certain amount of overhead
+; required for each override, so drush.ini should
+; only be used for a relatively small number
+; of variables.  Comment out any variable that
+; has the same value as the webserver php.ini
+; to keep the size of the override list small.
+;
+; To fully specify the value of all php.ini variables, 
+; copy your webserver php.ini file to one of the 
+; locations mentioned above (e.g. /etc/drush/php.ini)
+; and edit it to suit.
+; 
+
+;
+; drush needs as much memory as Drupal in order
+; to run; make the memory limit setting match
+; what you have in your webserver's php.ini.
+;
+memory_limit = 128M
+
+;
+; Show all errors and direct them to stderr
+; when running drush.
+;
+error_reporting = E_ALL | E_STRICT
+display_errors = stderr
+
+;
+; If your php.ini for your webserver is too
+; restrictive, you can re-enable functionality
+; for drush by adjusting values in this file.
+;
+; Here are some examples of settings that are
+; sometimes set to restrictive values in a
+; webserver's php.ini:
+;
+;safe_mode = Off
+;open_basedir = 
+;disable_functions =
+;disable_classes =
