Posted by wanderingstan on June 25, 2009 at 6:06pm
Jump to:
| Project: | Drush |
| Version: | All-Versions-2.0 |
| Component: | PM (dl, en, up ...) |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
Issue Summary
Drush looks amazing. I've spent the afternoon trying to get it working on my Mac, where I use XAMPP. After fixing a problem with my 'php' pointing to the wrong PHP, I stumbled accross a problem that appears to be a bug or at least a problem with XAMPP.
When I run 'drush info' in my drupal site directory, I get the following cryptic output:
$ drush info
No information available. [error]
An error occurred at function : drush_pm_info [error]
$This appears to be a problem in drush_pm_info, but I can't be sure that it's still not something wrong with my configuration. Apologies if it's something dumb on my part.
If I turn off apache and mysql, and run 'drush info' again, I get slightly more information:
$ drush info
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket[warning]
'/Applications/xampp/xamppfiles/var/mysql/mysql.sock' (2)
Drush was not able to start (bootstrap) the Drupal database. [error]
Hint: This error often occurs when Drush is trying to bootstrap a site
that has not been installed or does not have a configured database.
Drush was attempting to connect to :
PHP configuration : /Applications/xampp/etc/php.ini
Drupal Root : /Users/stan/Documents/workspace/myproject/html
Drupal version : 6.10
Site Path : sites/default
Site URI : http://default
Database Driver : mysql
Database Hostname : localhost
Database Username : wanderin_myproject
Database Name : wanderin_myproject
Database Password :
You can select another site with a working database setup by specifying
the URI to use with the --uri parameter on the command line or
$options['uri'] in your drushrc.php file.
Command info needs a higher bootstrap level to run - you will need invoke[error]
drush from a more functional Drupal environment to run this command.
Command info needs the following modules installed/enabled to run: [error]
update.
The command 'drush.php info' could not be executed. [error]
$
Comments
#1
Just had the same problem.
The issue is the 'Update Status' module is disabled on your system.
To get this working;
$ drush enable update
#2
I'm getting the same problem.
update is enabled.
ngaur@xxxx$ drush info
No information available. [error]
An error occurred at function : drush_pm_info [error]
ngaur@xxxx$ drush status
PHP configuration : /etc/php5/cli/php.ini
Drupal Root : /home/xxxxxx/public_html
Drupal version : 6.13
Site Path : sites/xxxxx.com
Site URI : http://xxxyxx.com (heh. not giving em that link)
Database Driver : mysqli
Database Hostname : localhost
Database Username : xxxxx
Database Name : xxxxxx
Database Password : xxxxxx
Database : Connected
Drupal Bootstrap : Successful
Drupal User : Anonymous
ngaur@xxxx$ drush enable update
Update status is already enabled. [error]
There were no modules that could be enabled. [ok]
An error occurred at function : drush_pm_enable [error]
ngaur@xxxx$ drush disable update
The following modules will be disabled: update
Do you really want to continue? (y/n): y
Update status was disabled successfully. [ok]
ngaur@xxxx$ drush enable update
The following modules will be enabled: update
Do you really want to continue? (y/n): y
Update status was enabled successfully. [ok]
ngaur@xxxx$ drush info
No information available. [error]
An error occurred at function : drush_pm_info [error]
#3
I have the same issue as first post. My Update Status was already enabled, so this was not a solution for me. Something else is going on for other people (including me).
Much like the first post I am using a weird environment (web server is NGINX)
#4
Same issue, update is enable. I'm running also a weird environment (Mac power pc).
drush info
No information available. [error]
An error occurred at function : drush_pm_info [error]
#5
Same error here, too, on a shared host with Linux. Some more infos:
- Drupal 6.13 out of the box, English, no modules added, update status enabled, only with user 1
- drush status works fine
Here the result of drush -d info (running with debugging info):
[~/public_html/test]# drush -d infoDrush bootstrap phase : _drush_bootstrap_drupal_root() [0.013 sec] [bootstrap]
Initialized Drupal 6.13 root directory at /home/oneworl1/public_html/test [0.02 sec] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.021 sec] [bootstrap]
Initialized Drupal site default at sites/default [0.021 sec] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.022 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [0.025 sec] [bootstrap]
Successfully connected to the Drupal database. [0.025 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [0.029 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [0.103 sec] [bootstrap]
Found command: info [0.104 sec] [bootstrap]
Including version specific file : /home/oneworl1/drush/commands/pm/update_info/drupal_6.inc [0.104 sec] [notice]
No information available. [0.105 sec] [error]
An error occurred at function : drush_pm_info [0.105 sec] [error]
Command dispatch complete [0.105 sec] [notice]
The result of drush status:
PHP configuration : /usr/local/lib/php.iniDrupal Root : /home/oneworl1/public_html/test
Drupal version : 6.13
Site Path : sites/default
Site URI : http://default
Database Driver : mysqli
Database Hostname : localhost
Database Username : oneworl1_dbtest
Database Name : oneworl1_dru6test
Database Password : xxxx
Database : Connected
Drupal Bootstrap : Successful
Drupal User : Anonymous
Hope this helps in finding the error.
#6
Same than #5, please help!!
Thanks!
#7
I also am running into the same problem. I am running on a Westhost vps.
Output from status:
PHP configuration : /etc/php.ini
Drupal Root : /home/jimmy-nash/www
Drupal version : 6.13
Site Path : sites/default
Site URI : http://default
Database Driver : mysqli
Database Hostname : localhost
Database Username : drupal
Database Name : drupal
Database Password : xxx
Database : Connected
Drupal Bootstrap : Successful
Drupal User : Anonymous
Output from drush -d info
$ drush -d info
Drush bootstrap phase : _drush_bootstrap_drupal_root() [0.083 sec] [bootstrap]
Initialized Drupal 6.13 root directory at /home/jimmy-nash/www [0.33 sec] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_site() [0.334 sec] [bootstrap]
Initialized Drupal site default at sites/default [0.439 sec] [notice]
Drush bootstrap phase : _drush_bootstrap_drupal_configuration() [0.501 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_database() [1.088 sec] [bootstrap]
Successfully connected to the Drupal database. [1.089 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_full() [1.124 sec] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drupal_login() [6.44 sec] [bootstrap]
Found command: info [6.443 sec] [bootstrap]
Including version specific file : /usr/home/jimmy-nash/drush/commands/pm/update_info/drupal_6.inc [6.444 sec] [notice]
No information available. [6.468 sec] [error]
An error occurred at function : drush_pm_info [6.468 sec] [error]
Command dispatch complete [6.468 sec] [notice]
It seems to be affecting the update command as well as I am unable to run that successfully either. I assume if it can't run info it can't run update correctly either. Running update without arguments does return correct version information from drupal.org. Running it with a project argument return the same as running it without. It updates information, then shows all modules status, then says "No code updates available" [ok]
I can try and provide more details if anyone is looking into this.
Thanks!
#8
posted in wrong section, sorry.
#9
This is the same as #539704: Provide warning message when project name not provided for drush info
Explanation and patch there^^
#10
I figured out this is PEBKAC (problem exists between keyboard and chair) error.
`drush info` should throw an error.
you should be running `drush info module_name`
try `drush info devel` and see what happens.
Perhaps drush could resolve the confusion by implementing a better error message or implementing better users ;D
#11
j0rd - "I figured out this is PEBKAC (problem exists between keyboard and chair) error."
I don't think this explanation solves much of the various problems expressed in this thread...
several of the error messages being produced have nothing at all to do with "drush_pm_info"
...but you do make a good point, in regard to "drush_pm_info"
the error that I'm getting is:
An error occurred at function : drush_pm_enableThis has nothing to do with "drush_pm_info"
#12
Here's an FYI for you all. I just had this problem and I tried running "drush sql cli" (or use the command from "drush sql connect") and see if it connects. I was having a problem with MySQL not connecting (ergo, it can't connect to the DB do Drush reports that it's not highly-enough bootstrapped).
For me, the problem was that the settings.php command string had "localhost" as the server. MySQL will try and connect through a socket if the host is localhost; for me, sockets were disabled. I changed "localhost" to "127.0.0.1" in my settings.php file and then Drush was fine (except I ran out of memory, but that's neither here nor there).
#13
changing 'localhost' to '127.0.0.1' in my db_url setting in settings.php fixed my issues running drush.
#12 helped me realize this.
environment is shared webhosting on LAMP.
could do everything else necessary on cli but not run drush. kept getting error:
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [warning]
i had tried specifying port 3306 on the db_url thinking this would force a tcp connection... but since when does the obvious work like it should. ;)
as shared hosting environments are more common than not- this is worthy of making it's way into the documentation if not into the code to try these alternatives. my environ is cpanel based LAMP which i'd guess has some standards to it... thus i can only imagine lots of others in shared hosting environments will experience the same.
#14
I also had to change localhost to 127.0.0.1 in my settings.php file.
I was getting an error (warning):
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [warning]
when trying to run "drush status"
#15
This is another "yay, this thread helped me too!!" comment.
I also had to change localhost to 127.0.0.1 in Drupals /sites/default/settings.php file.
I was getting an error (warning):
SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) [warning]
when trying to run "drush status"
#16
I was seeing the same error on a fresh Mac OS X 10.6 machine, with a fresh MAMP 1.9 installed.
Solved by copying one of mamp's mysql config files over to /etc/my.cnf and restarting mysql. This established the socket for mysql and means that I did not have to edit my settings.php as in #12
#17
Changing the localhost to 127... worked for me too! Sweet.
#18
could you elaborate? on #16? changing localhost -> 127.0.0.1 didn't work for me...
#19
mamp runs its own mysql, but mysql looks for its configuration at /etc/my.cnf regardless. osx comes with a my.cnf preinstalled there but it's tailored for the mysql that ships with the os. if you want to use mamp-appropriate settings when running mamp's mysql, then you need to update /etc/my.cnf. Look in /Applications/MAMP/Library/share/mysql and pick one of the my-*.cnf files you see in there, maybe my-large.cnf. Then use that to replace /etc/my.cnf.
Actually you should be able to put it in /Applications/MAMP/db/mysql/my.cnf according to the comments at the top of the file, but I haven't tried that.
The key bit of the configuration is the socket:
socket = /Applications/MAMP/tmp/mysql/mysql.sock
#20
Thank you!
Mine was referring to the wrong MySQL socket so I was totally confused.
Changing localhost to 127.0.0.1 in BOTH aliases.drushrc.php and in each sites/foo_site/settings.php
$db_urlline solved it for me.thank you thank you
#21
changing to 127.0.0.1 worked here too! thanks
#22
Sweet, thanks! Was trying to set up on a shared server with CPanel and 127.0.0.1 in my settings.php worked perfectly.
#23
Just went through this. Yes, changing from localhost to 127.0.0.1 is the fix - but the extra tweak I needed to make was to reset the port assignments in MAMP for the Mac. Drush could not connect to MySQL with the default high port assignment in MAMP. I just reset things to the "normal" ports: MySQL: 3306, Apache: 80.