Closed (won't fix)
Project:
Drush
Version:
8.x-6.x-dev
Component:
Documentation
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
21 Mar 2012 at 17:46 UTC
Updated:
11 Sep 2013 at 11:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
yesct commentedpatch adds to the README
Comment #2
yesct commentedthis patch changes the command line hint to:
Comment #3
yesct commentedTo clarify, the patch in comment 1 is just for the README file and the patch in comment 2 is just for the command line hint. So, either or both could be used.
Comment #4
yesct commentedok. well that 127.0.0.1 only appears to work for D6... so. in the least, the hint I suggested adding should mention that.
Comment #5
yesct commented#1016268-12: Command pm-enable needs a higher bootstrap level to run on MAMP says something I think is key: "#437642: support for different MYSQL socket added support for unix_socket, so if you have it setup correctly in your sites settings.php it should work properly.
The actual issue here is a misconfiguration in mysql and/or php, usually as a result of the website using one php config while php-cli uses another. If you modify settings.php and add a unix_socket to the database configuration you can force Drupal and Drush to use the same socket."
I'm just not quite sure what that translates directly into me needing to do.
in D7 in settings.php there are some lines like:
I was reading around and found #561400: No way to specify MySQL socket with DBTNG and reading that patch, I'm thinking maybe what Kjartan is saying is that I need to:
and actually set unix_socket to something.
Comment #6
yesct commentedI re-read very very carefully the README.txt (I know, that's what it means: read me.)
line 183:
So I checked one of my sites locally that had a info.php file in it.
looking at http://localhost/oneofmysiteslocally/info.php
And I looked at the results of drush pm-list:
I checked the ini line:
And concluded: "my drush is using a different php.ini file than the webserver."
So.. the readme paragraph that begins:
If Drush is using the same php.ini file as the web server,made me think that I did NOT need to do what is if the then part of that paragraph. But since I've been working on this for a while I was willing to try it anyway and see if it helped.So I copied the webserver php ini file to my ~/.drush:
cp /Applications/MAMP/conf/php5/php.ini ~/.drush/php.iniI also checked for this caution in the readme:
safe_mode was off and the rest empty. So I that is ok.
For D7, without changing localhost to 127.0.0.1, without changing ports, or making a unix_socket, and just copying the MAMP php.ini to ~/.drush, the bootstrap error goes away and I'm able to do several common drush commands. (there might be some special cases that that still need to make the unix_socket, but I dont know about that.)
Removing the php.ini from ~/.drush, breaks drush commands like
drush pm-listand copying it back, makes it work.I'd like to get some confirmation from someone that this solution works for others and is not specific for me, and I'd like make a new patch to improve the readme text.
Comment #7
yesct commentedI talked to Kjartan in the coder lounge and he said that really someone needs to file an issue with MAMP, that the MAMP people have to fix... uh something. And he helped clarify some things for me. I'll write a patch for the README.
Comment #8
greg.1.anderson commentedI don't have anything to say about MAMP, but your observations about php.ini in #6 are correct. Presumably, you could edit /private/etc/php.ini to match what you put in ~/.drush to the same effect, but if you want to insure that your php.ini changes are specific to Drush, then ~/.drush/php.ini is the way to go.
Comment #9
yesct commentedMark helped me figure out what I really needed to do. And it's in a different part of the README. So I'll write up something to maybe make the README more clear about how to get the right php in the path (how to find out which php version MAMP is running, and how to find out the path for php).
Comment #10
yesct commentedHere is something Martin and Erik and I and some other people worked on.
It splits out some of the nitty gritty into a trouble shooting part. And tries to describe in general the steps in case the given exact lines to cut and paste don't work.
Comment #11
yesct commentedthis is a patch for the command line hint for bootstrap error.
adds "This error might also occur when the php the command line drush command is using is not the same php that the webserver is using. See the README.txt file." to the hint. changing the hint from:
to
This patch is instead of the patch in comment #2 (drush-commandlinehint127-1493022-2.patch). This patch (drush-commandlinehint-1493022-11.patch) is better because it's more technically accurate and general
and refers to the README.txt file so people will know to look there for how to fix the problem.
Comment #12
yesct commentedchanging title.
Comment #13
greg.1.anderson commentedThis issue was marked
closed (won't fix)because Drush has moved to Github.If this feature is still desired, you may copy it to our Github project. For best results, create a Pull Request that has been updated for the master branch. Post a link here to the PR, and please also change the status of this issue to
closed (duplicate).Please ask support questions on Drupal Answers.
Comment #13.0
greg.1.anderson commentedadding comment about how readme is correct, but hard to follow