Can't access /admin/settings/phpbb2drupal

robertkhamilton - July 18, 2009 - 23:03
Project:phpBB2Drupal
Version:6.x-2.0
Component:Code
Category:feature request
Priority:critical
Assigned:robertkhamilton
Status:active
Description

Hi all,

I can't access the phpBB2Drupal /admin/settings/phpbb2drupal page at all on my drupal installation. When I click on the "Configure the migration" link from /admin/phpbb2drupal I get a "Site off-line" Drupal page with "The error was: The database type '' is unsupported. Please use either 'mysql' or 'mysqli' for MySQL, or 'pgsql' for PostgreSQL databases"

I've trolled drupal.org and other sites and seen that this looks like it used to be an issue many versions ago, but I'm having it now with an up-to-date configuration (see below)

Any pointers at where to look to fix this would be great, as I can't even get started on my import without accessing this page.

thanks!!!

I'm running:

Drupal 6.12
Bbcode 6.x-1.2
Google Analytics 6.x-2.2
Login Destination 6.x-2.3
LoginToboggan 6.x-1.5
Meta tags 6.x-1.0
Page Title 6.x-2.2
Secure Password Hashes (phpass) 6.x-1.x-dev (2008-Nov-24)
phpBB2Drupal 6.x-2.0
Secure Pages 6.x-1.8
SMTP Authentication Support 6.x-1.0-beta3
Token 6.x-1.12
User Import 6.x-1.2

and a custom Auth module I wrote to compare Drupal login password and username to an existing external SQL db.

In settings.php I'm using an array of $db_url's to connect to external mysqli servers.

I've tried adding my phpbb database as both an external live phpbb3 db as well as then trying a local db which I created from a dump as:

$db_url['phpbb'] = 'mysqli://:@localhost/phpbb_db';

I've verified password and username for the phpbb db as well.

Is there something I'm missing? I can't find any documentation that helps.

thanks again

rob

#1

nbz - July 18, 2009 - 23:09

Can you not add the phpbb database over at settings.php and try to add it through the normal phpbb2drupal UI?

If one has already been set you can clear it by visiting /admin/settings/phpbb2drupal/reset and that should allow you to enter the settings in again.

#2

robertkhamilton - July 18, 2009 - 23:33

I guess I'm a bit confused as well over what the "normal phpbb2drupal UI" is? under /admin/by-module all I get are:

phpBB2Drupal

Migrate your phpBB data into a Drupal forum.

* Configure permissions
* Post Migration Configuration
* phpBB2Drupal Settings

So I'm trying to set phpBB2Drupal Settings, which is where I'm having the error (on the actual page display for Settings).

I tried adding $db_url['phpbb'] = 'mysqli://username:password@localhost/phpbb_db; to my settings.php but that didn't seem to work. I also tried adding the remote live phpbb as well (the first one I created locally on my drupal box from a dump of the phpbb db)

I can't access /admin/settings/phpbb2drupal/reset either... same error.

Is 'phpbb' the appropriate name for that db in my settings.php? I couldn't find that written anywhere and found that by looking through the module code.

thanks for your speedy response nbz

#3

nbz - July 18, 2009 - 23:36

you are not supposed to add it to settings.php at all afaik (but that may also work if the details are correct... been a long time since I had a look). Remove it from there and add the details in admin/settings/phpbb2drupal if you can then get to it.

also, those pages generally crash if the database credentials added are incorrect.

and I put the wrong link above - it was supposed to be admin/phpbb2drupal/reset

#4

robertkhamilton - July 18, 2009 - 23:57

I can access admin/phpbb2drupal/reset but still can't even get to the Settings page.

I removed my phpbb db from settings.php but still I'm having no luck actually getting to the /admin/settings/phpbb2drupal/ page

I'm stumped as to why I can't even access the page. Looking at /admin/ I don't even get a direct link to /admin/phpbb2drupal, which makes me think something else weird is going on?

under /admin I see:

phpBB to Drupal
Post Migration Configuration

And a link (broken) to "phpBB2Drupal Settings" (http://www.mysite.com/admin/settings/phpbb2drupal)

Should there be any other links available?

#5

nbz - July 19, 2009 - 00:03

the other links are not in the menu (admin/phpbb2drupal/migrate) as they need the settings to be filled out first.

Just trying to go through the obvious here:

Do you get anything reported in the dblog? do you have enough memory? Have you tried turning off excess modules? for migrating phpbb data from your list you do not need any of the following to be installed:

Google Analytics 6.x-2.2
Login Destination 6.x-2.3
LoginToboggan 6.x-1.5
Meta tags 6.x-1.0
Page Title 6.x-2.2
Secure Pages 6.x-1.8
SMTP Authentication Support 6.x-1.0-beta3
Token 6.x-1.12
User Import 6.x-1.2

Try turning them off to see if it makes a difference. (you can turn them back on afterwards) - also make sure you do have a backup of the site database.

#6

robertkhamilton - July 19, 2009 - 00:23

No luck there either. I don't have anything in particular in the dblog and turning off the other modules didn't have any effect.

I should have enough memory, though I'll go check to make sure.

#7

robertkhamilton - July 19, 2009 - 08:17

I'm curious if phpbb2drupal is designed to work with a drupal settings.php with multiple db's defined (using an associative array)?

I say this only because I'm looking in phpbb2drupal.module in the _phpbb2drupal_db_connect function, and I see the following:

$db_url2['phpbb'] = variable_get('phpbb2drupal_db_url', $db_url);
$db_url2['default'] = $db_url;
$GLOBALS['db_url'] =& $db_url2;

In this case, the global variable $db_url is the entire associative array defined in settings.php, not any one individual database.

This is all being called from phpbb2drupal.pages.inc first with "$result = _phpbb2drupal_check_tables($tables, 'phpbb', 0);" which lives in phpbb2drupal.module

I just removed my associative array from settings.php, replacing this with a simple single default drupal db reference and voila, I now have the proper phpbb2drupal admin/settings page appear.

So I would suggest this as an issue, no? Where phpbb2drupal can not work with the use of associative arrays in settings.php for the use case where multiple database connections are stored in settings.php (usually for authentication or connection to external dbs).

The short term solution is to do imports without associative arrays turned on, but the proper solution is a fix to _phpbb2drupal_db_connect

#8

nbz - July 19, 2009 - 16:22
Category:support request» feature request

Yeah, that is something that will need to be fixed at some point.

Marking this a feature request as new code will be needed.

 
 

Drupal is a registered trademark of Dries Buytaert.