When putting PHP_INI in ~/.bashrc, for example, the path it refers to cannot contain spaces. Here are some examples:
Here's what we're starting with, and our preference would be to use /Library/Application Support/appsolute/MAMP PRO/conf/php.ini
as the php.ini file since this is the one generated by MAMP PRO, and would help MAMP PRO users to solve this related issue: Error in the PHP config setting of magic_quotes_gpc prevents diagnosis of the problem through drush core-status
Mac:~ > drush status
The following restricted PHP modes have non-empty values: [error]
magic_quotes_gpc. This configuration is incompatible with drush.
Please check your configuration settings in
/Applications/MAMP/bin/php/php5.3.20/conf/php.ini or in your
drush.ini file; see examples/example.drush.ini for details.
PHP configuration : /Applications/MAMP/bin/php/php5.3.20/conf/php.ini
Drush version : 5.9
add export PHP_INI="/Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini"
to ~/.bashrc
Mac:~ > source .bashrc
Mac:~ > echo $PHP_INI
/Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini
Mac:~ > drush status
Could not open input file: Support/appsolute/MAMP\
Mac:~ >
try export PHP_INI='/Library/Application Support/appsolute/MAMP PRO/conf/php.ini'
instead (alternate way to deal with spaces in path)
Mac:~ > source .bashrc
Mac:~ > echo $PHP_INI
/Library/Application Support/appsolute/MAMP PRO/conf/php.ini
Mac:~ > drush status
Could not open input file: Support/appsolute/MAMP
Mac:~ >
(MAMP doesn't end with a '/' this time).
try export PHP_INI="'/Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini'"
Mac:~ > source .bashrc
Mac:~ > echo $PHP_INI
'/Library/Application\ Support/appsolute/MAMP\ PRO/conf/php.ini'
Mac:~ > drush status
Could not open input file: Support/appsolute/MAMP\
Mac:~ >
try export PHP_INI="'/Library/Application Support/appsolute/MAMP PRO/conf/php.ini'"
Mac:~ > source .bashrc
Mac:~ > echo $PHP_INI
'/Library/Application Support/appsolute/MAMP PRO/conf/php.ini'
Mac:~ > drush status
Could not open input file: Support/appsolute/MAMP
Mac:~ >
Those are all the variations I can think of, so I believe this means spaces aren't accepted by Drush in the PHP_INI variable.
Comments
Comment #1
ShaunDychko CreditAttribution: ShaunDychko commentedComment #2
greg.1.anderson CreditAttribution: greg.1.anderson commentedThis issue was marked
closed (won't fix)
because Drush has moved to Github.If desired, you may copy this bug to our Github project and then post a link here to the new issue. Please also change the status of this issue to
closed (duplicate)
.Please ask support questions on Drupal Answers.