Running PostgreSQL (postgresql-7.4.7-3.FC2.1)
Fedora Core 2
phpBB2 version 2.0.21
Table prefix for phpbb2: phpbb_
The phpBB2 installation is on one database, and Drupal is on another (both PostgreSQL). I configured phpBB2Drupal appropriately for this setup.
Whenever I go to the phpBB2drupal configuration, I get a flurry of errors. They're all obviously because the script can't seem to find the appropriate phpBB2 tables.
* Table phpbb_categories does not exist!
* Table phpbb_forums does not exist!
* Table phpbb_posts does not exist!
* Table phpbb_posts_text does not exist!
* Table phpbb_topics does not exist!
* Table phpbb_users does not exist!
Some tables couldn't be found. Please correct the errors so that the phpBB2 tables can be accessed.
However, when I display the phpbb tables from within PostgreSQL, I get:
phpbb=> \dt
List of relations
Schema | Name | Type | Owner
--------+-------------------------------+-------+------------
public | phpbb_auth_access | table | phpbb_user
public | phpbb_banlist | table | phpbb_user
public | phpbb_categories | table | phpbb_user
public | phpbb_config | table | phpbb_user
public | phpbb_confirm | table | phpbb_user
public | phpbb_disallow | table | phpbb_user
public | phpbb_easymod | table | phpbb_user
public | phpbb_easymod_processed_files | table | phpbb_user
public | phpbb_forum_prune | table | phpbb_user
public | phpbb_forums | table | phpbb_user
public | phpbb_groups | table | phpbb_user
public | phpbb_posts | table | phpbb_user
public | phpbb_posts_text | table | phpbb_user
public | phpbb_privmsgs | table | phpbb_user
public | phpbb_privmsgs_text | table | phpbb_user
public | phpbb_ranks | table | phpbb_user
public | phpbb_search_results | table | phpbb_user
public | phpbb_search_wordlist | table | phpbb_user
public | phpbb_search_wordmatch | table | phpbb_user
public | phpbb_sessions | table | phpbb_user
public | phpbb_sessions_keys | table | phpbb_user
public | phpbb_smilies | table | phpbb_user
public | phpbb_themes | table | phpbb_user
public | phpbb_themes_name | table | phpbb_user
public | phpbb_topics | table | phpbb_user
public | phpbb_topics_watch | table | phpbb_user
public | phpbb_user_group | table | phpbb_user
public | phpbb_users | table | phpbb_user
public | phpbb_vote_desc | table | phpbb_user
public | phpbb_vote_results | table | phpbb_user
public | phpbb_vote_voters | table | phpbb_user
public | phpbb_words | table | phpbb_user
(32 rows)
Anyone seen this problem before?
Thanks.
Jack
Comments
Comment #1
JoeIsuzu commentedOr should I have posted it in the "Converting to Drupal" forum?
Comment #2
beginner commentedHello.
I am checking for the presence of the tables using aquery like the following:
SHOW TABLES LIKE 'phpbb_categories'Obviously, it works for MySQL but not for postgreSQL.
Can you tell me what is the equivalent for the query above, in postgresql?
Comment #3
JoeIsuzu commentedLooks like the "show" command is entirely different in PostgreSQL, but I haven't found an equivalent yet.
Jack
Comment #4
beginner commentedBoth drupal and phpBB are on postgresql, aren't they?
How would you check the existence of a table, in postgresql?
Comment #5
JoeIsuzu commentedI could "describe" all tables, along with the "list of relations" with:
Or just the ones with "user" in their name with:
But I don't think the "\" commands are sql. They're just PostgreSQL internal commands. I don't know if the "\" commands work from php (I know verrry little about php).
Jack
Comment #6
havran commentedSHOW TABLE in Postgresql (PostgreSQL docs, in user comment):
1.4. Accessing a Database
Comment #7
JoeIsuzu commentedAhh, good catch. I suspected the "\*" commands wouldn't work from php. I hadn't had time to dig into the PostgreSQL docs due to a day job that sometimes interferes with my hobby.
So a rough equivalent would be:
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';Although the output does not exactly match what comes from MySQL, it does list every public table and nothing else on the lines (but it produces some header and footer information).
Jack
Comment #8
havran commentedMySQL variant:
SHOW TABLES LIKE 'phpbb_categories'And PostgreSQL variant:
SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_name LIKE 'phpbb_categories'Comment #9
JoeIsuzu commentedYes, I was just trying to display them all. Your query matches the one given by beginner.
So, what does that get us? I wouldn't know where to start with the php coding.
Thanks.
Jack
Comment #10
JoeIsuzu commentedSo...
- Is this a verifiable bug?
- If so, is it likely to get "assigned" and patched/fixed?
I'd love to help fix it, but that's well beyond my present level of ability, and would demand more time than I have. If this isn't fixed, I would find it much easier to just find a CMS that will play nicely with my phpBB2 forum.
Thanks.
Jack
Comment #11
beginner commentedI'll provide a patch later this afternoon.
Comment #12
beginner commentedI am using the posgresql query kindly provided by havran (thanks!).
Please test this module. You should have 'pgsql' printed at the very top of your settings/phpbb2drupal page.
Please report back if it works for you so that I can commit the changes.
Comment #13
JoeIsuzu commentedI'd be willing to test the patch, too. Where can I get it? I don't currently use CVS, so if that's required, I'll have to set it up first.
Thanks.
Jack
Comment #14
beginner commentedthe pre-patched module is attached above.
Comment #15
JoeIsuzu commentedDOH! I'm still getting used to this forum layout, I missed the attachment.
I put this into the "modules" directory, and then attempted to configure it. This got rid of most of the error messages. All of the remaining messages pertain to the "Import Private Messages?" section. It appears that if I uncheck this, these error messages will go away. But I had hoped to import the private messages, as well as the rest of the forum content and membership data. If I don't import them now, it may be difficult to do later (?).
Below is the error text from the top of the screen:
Also, from the "Import Private Messages?" section:
Thanks for the assistance so far. I'm closer...
Jack
Comment #16
havran commentedFor beginner: i recomended change this
for
This is way used in .install files.
For JoeIsuzu: maybe you can try find this and replace in your installed module. Good luck!
Comment #17
JoeIsuzu commentedThat got rid of all the error messages. I'm now getting the good kind of message:
"Check again all the settings above, and if everything is ok, you can now proceed with the migration"
I haven't yet begun the actual migration, I'm waiting for some dead time on the phpbb2 forum.
Jack
Comment #18
JoeIsuzu commentedI tried the migration. It did not go smoothly, but I'd still call it "progress". I got a lot of errors during the migration, but I'll do some research and only post the ones that stump me.
The memberlist seemed to migrate okay.
Forum posts migrated to somewhere, but they're not showing up in the forums. They DO show up in the "New Forum Topics" block, and I can read them from there. I saw them somewhere immediately after the migration, but can't find them now. All of them (except mine) showed "anonymous" as the author (yes, I imported the memberlist BEFORE the forums).
I really like Drupal, so if I can get my phpBB2 migrated, and my Gallery integrated, I'm happy. phpBB2Drupal is obviously a "work in progress" but I knew that going in. I appreciate the kind help so far!
Thanks.
Jack
Comment #19
beginner commentedThanks to havran for your help on this issue. You saved me a lot of time :)
I committed the changes, so this issue is now fixed.
Jack, if you still have problems (it seems you have! none of what you describe is supposed to happen), please open another issue, one per specific problem, and give me as much details as you can. It may be that some other queries do not work well with postgresql.
http://drupal.org/node/add/project_issue/phpbb2drupal
Comment #20
JoeIsuzu commentedThanks, I'll do that. It looks like I'm still a long way off from having it working.
Jack
Comment #21
(not verified) commentedComment #22
hugeknot commentedHello
it is 2 years later and I have had exactly the same issue while trying to migrate my phpbb2 board, as far as I know, both databases are mysql.