Connection to database when multiple URLs are defined
claudiu.cristea - July 11, 2008 - 10:04
| Project: | Database Scripts |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | claudiu.cristea |
| Status: | needs review |
Jump to:
Description
Drupal allow connection to multiple databases. To do this the $db_url (in settings.php) variable can be defined as array, not as string as is in a common Drupal installation. When this occur the Drupal database connection string is hold by $db_url['default'] instead of $db_url.
Attached there is a patch to fix this issue for dbscripts.module. The patch it also use the PHP parse_url() function to extract the database settings instead using of preg_match().
| Attachment | Size |
|---|---|
| dbscripts.patch | 766 bytes |

#1
See: http://drupal.org/node/18429 to find how to connect to multiple databases.
#2