Sorry for being a pain...

still battling with #1424882: First try with 7.x-2.x-dev I have decided to try everything again with a fresh install of phpbb and D7. Now I cannot even get the migration process to start anymore:


An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /test/batch?id=2&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'phpbb_test.migrate_map_phpbbavatar' doesn't exist: SELECT u.user_avatar AS user_avatar, map.destid1 AS migrate_map_destid1, map.needs_update AS migrate_map_needs_update FROM {users} u LEFT OUTER JOIN {test.migrate_map_phpbbavatar} map ON user_avatar = map.sourceid1 WHERE (user_avatar IS NOT NULL ) AND (user_avatar <> :db_condition_placeholder_0) AND( (map.sourceid1 IS NULL ) OR (map.needs_update = :db_condition_placeholder_1) ); Array ( [:db_condition_placeholder_0] => [:db_condition_placeholder_1] => 1 ) in MigrateSourceSQL->performRewind() (line 318 of E:\xampp\htdocs\test\sites\all\modules\migrate\plugins\sources\sql.inc).

Any idea where this might be coming from now?

Comments

sugargrp’s picture

i have the same problem, any idea? thx

adammalone’s picture

Title: AJAX HTTP error occurred... » Table prefix is prefixing the database

The error here is that the table prefix specified, in your case phpbb_ is prefixing your databse name (test) and is trying to query database phpbb_test instead of the test database.

I experienced a similar issue and instead of fixing decided to do a workaround. I created a new database with none of the prefixes and attempted the import again which worked.

An example of this step by step would be:

mysqldump -u[user] -p[password] [databasename] > output.sql
sed -e 's/phpbb_//g' output.sql > fixed.sql
mysql -u[user] -p[password] [newdatabasename] < fixed.sql
Z2222’s picture

I'm getting a similar error:

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?id=23&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user '********'@'localhost' for table 'migrate_map_phpbbavatar': SELECT u.user_avatar AS user_avatar, map.destid1 AS migrate_map_destid1, map.needs_update AS migrate_map_needs_update FROM {users} u LEFT OUTER JOIN {********.migrate_map_phpbbavatar} map ON user_avatar = map.sourceid1 WHERE (user_avatar IS NOT NULL ) AND (user_avatar <> :db_condition_placeholder_0) AND( (map.sourceid1 IS NULL ) OR (map.needs_update = :db_condition_placeholder_1) ); Array ( [:db_condition_placeholder_0] => [:db_condition_placeholder_1] => 1 ) in MigrateSourceSQL->performRewind() (line 318 of /home/******/public_html/******/sites/all/modules/migrate/plugins/sources/sql.inc).

I tried using a separate database, then tried starting over from a clean DB backup by importing the phpbb database into Drupal.

I then tried again with an external database, with the prefix "phpbb_for2010" [sic] added and got a similar error. It says the table name is 'migrate_map_phpbbavatar', but it's still missing the prefix.

darksnow’s picture

The table prefix supplied should apply no matter which database you are using.

You should also make sure the "Use local database" check box is set appropriately. I wrote this and that check box tripped me up a couple of times during testing ;)

Split-1’s picture

I am experiencing the same issue as #3.

I have tried setting the "Use local database" check box, and without, but the error is the same.

The tables the module is trying to access are not formed correctly. The table prefix is missing from "migrate_map_phpbbavatar". (It also does not exist in my schema. Was this supposed to be created when I installed the module?)

Z2222’s picture

@darksnow
I did try it both ways -- with the box checked and without.

When you write, "The table prefix supplied should apply no matter which database you are using", do you mean that I should delete the prefixes from my database or not? (I think I tried both.)

Thanks...

Z2222’s picture

I've attached some screenshots to show the settings and error message.

adammalone’s picture

If you notice what's happening with the error message, especially that of
Table 'phpbb_test.migrate_map_phpbbavatar' doesn't exist
The database is called 'test' and the table prefix is 'phpbb_'. Note the table prefix is prefixing the database rather than the table as it should be querying
test.phpbb_migrate_map_phpbbavatar
As I said above I had a similar issue prior to simply removing all the table prefixes with a procedure explained here.
I may be wrong but it just looks like the prefix is being implemented at the wrong point.

Z2222’s picture

Do you then leave the table prefx blank on this screen?
https://drupal.org/files/Screenshot%20at%202012-04-02%2010:16:15.png

Z2222’s picture

I tried that sed command and when I imported it back into phpmyadmin, I got this error:

Error

SQL query:

-- -- Dumping data for table `config` -- INSERT INTO `config` (`config_name`, `config_value`, `is_dynamic`) VALUES ('active_sessions', '0', 0), ('allow_attachments', '1', 0), ('allow_autologin', '1', 0), ('allow_avatar', '1', 0), ('allow_avatar_local', '1', 0), ('allow_avatar_remote', '1', 0), ('allow_avatar_upload', '1', 0), ('allow_avatar_remote_upload', '0', 0), ('allow_bbcode', '1', 0), ('allow_birthdays', '1', 0), ('allow_bookmarks', '1', 0), ('allow_emailreuse', '0', 0), ('allow_forum_notify', '1', 0), ('allow_mass_pm', '1', 0), ('allow_name_chars', 'USERNAME_CHARS_ANY', 0), ('allow_namechange', '1', 0), ('allow_nocensors', '1', 0), ('allow_pm_attach', '1', 0), ('allow_pm_report', '1', 0), ('allow_post_flash', '1', 0), ('allow_post_links', '1', 0), ('allow_privmsg', '1', 0), ('allow_quick_reply', '1', 0), ('allow_sig', '1', 0), ('allow_sig_bbcode', '0', 0), ('allow_sig_flash', '0', 0), ('allow_sig_img', '0', 0), ('allow_sig_links', '0', 0), ('allow_sig_pm', '1', 0), ('allow_si[...]

MySQL said: Documentation
#1054 - Unknown column 'is_dynamic' in 'field list' 

The lines I typed were:

$ sed -e 's/phpbb_for2010//g' original_db.sql >fixed.sql
$ sed -e 's/phpbb_//g' fixed.sql >fixed_final.sql

The second line was because the person who built the site left some tables with the original prefix. I don't know exactly what he did...

Then I gzipped it and uploaded it.

adammalone’s picture

When my tables had prefixes I filled in that box (as would be expected).
When I removed the table prefixes I left that box empty.

I'd recommend against trying this on a live site. I experimented on a development site before finding a method that worked (removing table prefixes) before trying anything to live data.

snlnz’s picture

I'd NEVER try this on a live site, it was a very tricky task to get the data migrated, but I wrote this doco to hopefully be helpful to others:
You can check it here: http://drupal.org/node/57197

Good luck!

Z2222’s picture

Thanks

mygumbo’s picture

Same issue as #3. First, I tried to migrate using the separate phpbb database. Got the same type of SELECT error. Then, I stripped out the prefix on the tables, and still no go.

I imported the phpbb database into my drupal database, and still the same issue, as below. I can run the select from mysql command line-- 'migrate_map_phpbbavatar' exists and I can access it with that username.

An AJAX HTTP error occurred. HTTP Result Code: 500 Debugging information follows. Path: /batch?render=overlay&id=42&op=do StatusText: Service unavailable (with message) ResponseText: PDOException: SQLSTATE[42000]: Syntax error or access violation: 1142 SELECT command denied to user 'XXXXX'@'localhost' for table 'migrate_map_phpbbavatar': SELECT u.user_avatar AS user_avatar, map.destid1 AS migrate_map_destid1, map.needs_update AS migrate_map_needs_update FROM {users} u LEFT OUTER JOIN {YYY.migrate_map_phpbbavatar} map ON user_avatar = map.sourceid1 WHERE (user_avatar IS NOT NULL ) AND (user_avatar <> :db_condition_placeholder_0) AND( (map.sourceid1 IS NULL ) OR (map.needs_update = :db_condition_placeholder_1) ); Array ( [:db_condition_placeholder_0] => [:db_condition_placeholder_1] => 1 ) in MigrateSourceSQL->performRewind() (line 318 of /home/ZZZ/public_html/sites/all/modules/migrate/plugins/sources/sql.inc).

kaztur’s picture

#2 was good for me, Great Thanks, typhonius!

What did I do?

  1. Dumped my DB and inserted it into test DB
  2. export it in .sql format again
  3. opened exported file in notepad++ and deleted all 'phpbb_' word parts
  4. imported the .sql into my test DB back
  5. ran Phpbb2Drupal module
Renekcl’s picture

I get the same error when starting the migration. Prefix defined in phpbb2drupal is not used for in SQL select statements.

Is there any way to migration beside backing up the phpbb3 db and rename the tables?

Bye
René

adammalone’s picture

I just revisited this issue and installed fresh copies of D7 (7.14) and phpbb3. Oddly enough, it seems to accept table prefixes now. I'm keen to find a proper patch/resolution for this so if people are still having issues then let me know, otherwise I suppose we can close the issue.

When I had issues I was running Centos with PHP 5.2, I'm currently running Ubuntu with PHP 5.3

Ideally with versions of drupal, phpbb, distro and PHP version.

JeremyFrench’s picture

Status: Active » Postponed (maintainer needs more info)

I think this module should only now be run under 7.14 and greater. Has anyone had this issue with 7.14+?

JeremyFrench’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing as there is no way to see if this can be reproduced.