Needs review
Project:
Database Scripts
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Apr 2009 at 09:08 UTC
Updated:
28 Dec 2009 at 20:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
ceardach commentedAre you using Drupal 7? Due to the database changes, the 6.x version won't work with 7.x.
I did try to add a Drupal 7 branch, but then had difficulty managing two branches that were simultaneously sharing a lot of commits. You may be able to get the appropriate D7 db support patch from the git repo.
Comment #2
mrfelton commentedNo, I'm using Drupal 6. and the Drupal 6 version of dbscripts from git. I had to set $databases['default'] in my setting.php as that is what seemed to be required by dbscripts - it didn't work without it.
Comment #3
ceardach commentedIn Drupal 6, your settings.php file should have $db_url as a string. What you have above is connection settings for Drupal 7.
If you are using the git repo, are you pointed at the master branch? I was trying to have D7 support, so master is compatible with D7 (based on the idea that a module's HEAD should be compatible with Drupal core's HEAD), while the 6.x-2.x branch is what you will be looking for.
That should get that branch for you.
Comment #4
mrfelton commentedI know my settings.php should have $db_url , and it does!... but I added $databases to get dbscripts to work. I'm sure I checked out from the D6 tree, but maybe not... I'll checkout again following the advice in your previous post tomorrow. Thanks.
Comment #5
mikey_p commentedIn the DBTNG module I've had good luck using the parse_url function. It will return all the bits including port, url, protocol (i.e. mysl vs. mysqli) password, username and database.
Comment #6
hefox commentedMysql syntax for port and I'm assuming $db['port'] is what'll be returned from parse url?
Using parse url and an foreach loop array to test if something is set, so this should be an easy fix. But ports are a blank subject for me, so if someone could patch and test it would multiple ports, that'd be just grand.
Comment #7
xenophyle commentedHere is my first patch: it detects the port.