diff --git a/drush b/drush index 594dbba..a04ee8f 100755 --- a/drush +++ b/drush @@ -115,11 +115,13 @@ if [ -n "$PHP_OPTIONS" ] ; then php_options="$php_options $PHP_OPTIONS" fi +php_prohibited_options="-d magic_quotes_gpc='' -d magic_quotes_runtime=''" + # Pass in the path to php so that drush knows which one # to use if it re-launches itself to run subcommands. We # will also pass php options if any are defined. if [ -z "$php_options" ] ; then - exec "$php" $php_options "$SCRIPT_PATH" --php="$php" "$@" + exec "$php" $php_options $php_prohibited_options "$SCRIPT_PATH" --php="$php" "$@" else - exec "$php" $php_options "$SCRIPT_PATH" --php="$php" --php-options="$php_options" "$@" + exec "$php" $php_options $php_prohibited_options "$SCRIPT_PATH" --php="$php" --php-options="$php_options" "$@" fi diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 6bcab40..12a64d9 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -999,6 +999,10 @@ function drush_bootstrap_prepare() { } // Check supported version of PHP. + // Note: If this is adjusted, check other code that compares + // PHP_VERSION, such as runserver/runserver.drush.inc, and also + // adjust _drush_environment_check_php_ini() and the php_prohibited_options + // list in the drush script. See http://drupal.org/node/1748228 define('DRUSH_MINIMUM_PHP', '5.3.5'); if (version_compare(phpversion(), DRUSH_MINIMUM_PHP) < 0) { return drush_set_error('DRUSH_REQUIREMENTS_ERROR', dt('Your command line PHP installation is too old. Drush requires at least PHP !version.', array('!version' => DRUSH_MINIMUM_PHP)));