DrupalvB should not close Drupal's default database connection
caramelson - December 24, 2008 - 01:36
| Project: | Drupal vB |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Description
I have the Acquia Drupal profile installed. I've got the other installation parts of vBulletin configured correctly, but now I'm getting the following errors:
* warning: mysql_get_server_info() [function.mysql-get-server-info]: Access denied for user 'user'@'localhost' (using password: NO) in /home/user/public_html/modules/acquia/views/includes/handlers.inc on line 810.
* warning: mysql_get_server_info() [function.mysql-get-server-info]: A link to the server could not be established in /home/user/public_html/modules/acquia/views/includes/handlers.inc on line 810.
My first thought is that the two applications are fighting over socket connections, but I'm not sure. Thoughts?

#1
Please provide as much information about your site and server configuration as you can. In particular (but not limited to this), MySQL server version and Drupal's database settings as well as DrupalvB's database settings.
#2
Thanks for your response.
I'm running Drupal 6.8 with the latest Acquia 1.1 install profile
MySQL version: 4.1.22
PHP: 5.2.3
Not sure what database settings you need, but they are connected via localhost on port 3306, two separate databases, but sharing the same users (from Drupal core).
Need any other info?
#3
This sounds weird. Did you actually configure DrupalvB's database connection settings? The error message indicates that it cannot connect, or, that it failed to connect and failed to re-enable the default database connection afterwards.
#4
Yes, I configured the settings and I was able to sync the users and connect to the database.
That error message does indicate that, which is why I reported it as an error. The fact that it's happening in the views handler is also weird.
My question is are there other advanced settings (port connections, or port usage) that must be setup in addition to setting up vB? I mean, Drupal and vB are connecting to MySQL via 3306. Is there a point when they both attempt to connect simultaneously?
#5
This is a great module! Thanks so much.
I am also getting this error from the views handler. What's most strange about it is that everything still seems to be working anyway, so I think. I'm running Drupal 6.6 with php 5.2.6 and mysql 5.0.67. I also have all the vbulletin tables in my drupal database prefixed with vb_.
I was able to confirm that the error did not occur in views until I enabled the drupalvb module and set the database settings. I changed the connection settings in sites/all/modules/drupalvb/config.php (the copied vbulletin config php) and the vbulletin includes/config.php files to be a broken connection. The error still occurred (on pages other than the forums).
My guess then was that something in the drupalvb module was closing a connection so that later queries using "the default connection" were not correct. I commented out line 105 of drupalvb.inc (@mysql_close($connection);):
case 'mysql':$connection = @mysql_connect($db['host'], $db['user'], $db['pass'], TRUE, 2);
if ($connection && mysql_select_db(substr($db['path'], 1))) {
$valid = TRUE;
}
//@mysql_close($connection);
break;
The error vanished. I don't know what the ripple effect here is, but hopefully it helps to track things down.
Thanks again!
Kurt
#6
Very good idea. Of course, Drupal vB should not close Drupal's default database connection. I have to admit that this module was developed on sites that use different databases for Drupal and vB.
So, any takers?
#7
I'm getting similar errors, but commenting the line from #5 didn't help me.
... on every page.
I don't have multiple databases configured, but I do have Domain module's settings.inc
included in settings.php - could it be a reason?
Szy.
#8
#9
As errors show up even for anonymous user, marking it critical... :/
Szy.
#10
It must be my mistake writing comment #7 - commenting the line from #5
did fixed this problem. Sorry.
Szy.
#11
Original issue is not fixed.
#13
I wonder whether this patch might be sufficient.
#22
Why do I see this thread udpated almost every day? Are there
updates applied to the patch?
Szy.
#24
Unfortunately, just spammers.
Did you test the patch?
#29
This patch appears to work regarding my issue in #5. Not sure if it takes care of the original original issue, though I thought they were the same.