Discus 4 --> phpBB2 convertor

This is an archive of the phpBB 2.0.x convertors forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
markus_freerela
Registered User
Posts: 67
Joined: Sat Mar 03, 2007 5:33 pm

Re: Discus 4 --> phpBB2 convertor

Post by markus_freerela » Sat Sep 22, 2007 5:23 am

Well, there's a problem with your user data base, you have duplicate entries in them. Anyway, I now developed a version that better deals with duplicate entries in discus which shouldn't occur. The new version has following improvements:
- layer for MySQL versions lower than 4.1 (however could be tested against 4.1 only)
- creates admin account if not already present

Available as always for free from http://www.discusscripts.com/downloads/discus_migr.zip

hal65
Registered User
Posts: 9
Joined: Fri Aug 17, 2007 10:45 am

Re: Discus 4 --> phpBB2 convertor

Post by hal65 » Sun Sep 23, 2007 10:22 am

To move from discus is a nightmare, and till now I was able to migrate none of my boards.

I have duplicated usernames too, in one board I have userxx (group users) and userxx (group moderator), so when I try to import the board in the better situation I have the userxx (mod+user) mixed together. :cry:

Now I'll go to test the new Markus script to see the changes.

Also another problem are the archives, in my boards I have the Auto-Threads and Auto-Messages functions set to on.

For the Auto-Threads function I had to move manually all archived threads to the parent thread and then to delete the empty "Archive to" folders. I have only 100's of them so in a couple of days I have solved this issue.

But what's about "Auto-Messages" ? Years ago I have set it to "Archive by date" (invoke 30 and leave 10), so I have thousands of such archives everywhere in the board.

It could be a way to automate this task ?

markus_freerela
Registered User
Posts: 67
Joined: Sat Mar 03, 2007 5:33 pm

Re: Discus 4 --> phpBB2 convertor

Post by markus_freerela » Mon Sep 24, 2007 3:47 am

Well, my script also relies on unique user names. It'll accumulate all entries with one name under one account. When you have activated the Discus MySQL backend, it'll be the first created account, otherwise it'll be the moderator account. Otherwise, it wouldn't be possible to handle user-promotions and demotions correctly. The script just doesn't stop if it encounters the second account with the same name, it assumes that the one already in the system is the correct one. An alternative would be to build a switch into the system that would e.g. prefix moderator accounts with an "m" and user-accounts with a "u". This would though not handle promote / demote situations correctly AND users would have to use their new user-name to log on to phpBB.

The best way would be if you prepare the duplicate accounts: Change their names in the discus files / db-table and replace the respective entries in the *-log.txt tables, e.g. "USER:john" by "USER:ujohn" and inform the respective users yourself.

phpBB doesn't have an auto-archive function, only a prune (auto-delete) functionality. But maybe you find a hack in the Mod-DB.

markus_freerela
Registered User
Posts: 67
Joined: Sat Mar 03, 2007 5:33 pm

Re: Discus 4 --> phpBB2 convertor

Post by markus_freerela » Fri Sep 28, 2007 3:37 am

I've now released a new version that officially supports duplicate user-names, meaning that the same username may exist in the normal users and the moderators table, but only once in each table. To use this feature, set the constant HAS_DUPLICATE_USERS to 1 (standard = 0). This will do the following:

1) add a prefix to each username (in user-acct AND posts): "m*" for moderator; "u*" for user accounts
2) after the posts have been converted: remove the prefix m* or u* from accounts that exist only on one side. Thus, the prefix will remain with accounts that exist on both sides (user AND mod). This could be because the accounts have separately been created, or as an effect of user promotion or demotion.

To clean up the user database, there are additional functions in the script that help solving this problem. You've got to insert the calls yourself, because the script simply can't know what is correct.

userMerge($db, 'userfrom', 'userto'); //: Move all the posts from userfrom into the userto account
userRename($db, 'userfrom', 'userto'); //: Rename useraccount userfrom to userto
userPassword($db, 'user', 'passwd'); //: Set password passwd to user

Because these functions do a lot, I didn't write an URL param handler that would allow to call the functions vai URL params. If called by a hacker, it could mess up your database! There are samples in the script.

daniel x
Registered User
Posts: 10
Joined: Sat Oct 07, 2006 10:01 pm

Re: Discus 4 --> phpBB2 convertor

Post by daniel x » Mon Nov 05, 2007 12:13 am

Hi!

After over one year I came back to this forum and realised that markus_freerela has released a conversion script which is making many users happy. Great! So I setup a new phpbb, inserted the correct paths into migdiscus.php as indicated and ran the script. Unfortunately the script didn't get very far. I read through all the posts here and still didn't find a solution. Could you please give me a hint what the problem may be? Of course I am willing to donate! :)

The following error messages occured:

Code: Select all

Running Script on MySQL version 5.0.45-community-nt-log

optimizing tables ... 
Cannot optimize table 
SQL=optimize table 
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table 
SQL=optimize table 
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

{many repetitions of the last paragraph..}

Cannot optimize table 
SQL=optimize table 
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566
done!

Migrating Users...
reading user data from file
Warning: fopen(d:/www/www186/cgi-bin/discus_admin_2239829 /passwd.txt): failed to open stream: Invalid argument in d:\www\www186\migdiscus.php on line 466 Error: cannot open file d:/www/www186/cgi-bin/discus_admin_2239829 /passwd.txt
Warning: fopen(d:/www/www186/cgi-bin/discus_admin_2239829 /users.txt): failed to open stream: Invalid argument in d:\www\www186\migdiscus.php on line 466 Error: cannot open file d:/www/www186/cgi-bin/discus_admin_2239829 /users.txt

reading topic titles ...
Warning: fopen(d:/www/www186/cgi-bin/discus /messages/board-topics.html): failed to open stream: Invalid argument in d:\www\www186\migdiscus.php on line 566 d:/www/www186/cgi-bin/discus /messages/board-topics.html not found. Can't continue. Program exiting.
The only lines I changed in migdiscus.php are:

Code: Select all

        /********************* START USER CONFIGURATION *********************/
        $phpbb_root_path = $doc_root . '/Php5/phpBB2/';
        $discus_admin_dir = $doc_root . '/cgi-bin/discus_admin_2239829/';
I have absolutely no clue about the "Cannot optimize table" errors.
The "failed to open stream" messages all show paths with an empty space where there should be none:
d:/www/www186/cgi-bin/discus /messages/board-topics.html
d:/www/www186/cgi-bin/discus_admin_2239829 /passwd.txt


The board I am trying to convert is a discus freeware 4.10.b1 installation with ca. 8000 public postsings

Thanks in advance for any help! :geek:
Daniel

markus_freerela
Registered User
Posts: 67
Joined: Sat Mar 03, 2007 5:33 pm

Re: Discus 4 --> phpBB2 convertor

Post by markus_freerela » Tue Nov 06, 2007 4:49 am

the blank in the path probably comes from the entry in your discus.conf file. You find this file in your discus admin directory. Open it. Move to the line starting with "admin_dir=". Remove any spaces at line end and save the file. The problem with the optimize table is something I'd have to take a closer look at. It may be a problem of MySQL 5 which I can't test against or a setting or other version of your php installation. Can be many things. To find out the problem source, I'll need root access to your server. I'll do that for a donation of US$ 50 plus the provision of your account settings in a private message.

OscarT
Registered User
Posts: 8
Joined: Tue Jun 12, 2007 2:21 pm

Re: Discus 4 --> phpBB2 convertor

Post by OscarT » Tue Nov 06, 2007 6:11 pm

I attempted to use the latest script but it did not work for me.

markus_freerela, I would like your help. :) If you will email me, we can work out the details.

Oscar

http://www.phoenix-creative.com
(my name @ my domain)

Vitals:
MySQL client version: 4.1.22
Your Discus Version 4.00.9 (free version)
Your Discus Version's Serial Number 0.04.00.066
Your Discus Version's Release Date 04/07/2006
Your Server's Operating System linux

Posts: 74481 Pages: 10565 Topics: 20
Largest Topic Posts: 22335 Pages: 2231



This is the result

Code: Select all

Running Script on MySQL version 4.1.22-standard-log

optimizing tables ...

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566
done!
preparing database...

optimizing tables ...

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566

Cannot optimize table
SQL=optimize table
Error=You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
source-line=1566
done!

Migrating Users...
attempting to read users from Discus database table
Sorry, can't read data from Discus user-table. Reason: Table 'phoenixc_discus._users' doesn't exist
Please perform data backup in Discus and click here when done

daniel x
Registered User
Posts: 10
Joined: Sat Oct 07, 2006 10:01 pm

Re: Discus 4 --> phpBB2 convertor

Post by daniel x » Thu Nov 08, 2007 9:06 pm

Hi Markus

I sent you a personal message with the account details. Regarding the donation: Is the following link still valid? (found it in a post which is already many months old)
https://order.kagi.com/cgi-bin/store.cg ... K&&lang=en

best regards
Daniel

markus_freerela
Registered User
Posts: 67
Joined: Sat Mar 03, 2007 5:33 pm

Re: Discus 4 --> phpBB2 convertor

Post by markus_freerela » Fri Nov 09, 2007 7:49 pm

Hi daniel, oscar

@daniel: yes the link is still valid. Thanks in advance ;)
I have managed running it on your server and it now runs flawlessly.

Depending on the settings of your php installation, the "optimize tables" command could have run into problems. These are fixed now. If you download the latest version, the "optimize table" command shouldn't show errors anymore.

it's still available at http://www.discusscripts.com/downloads/discus_migr.zip

daniel x
Registered User
Posts: 10
Joined: Sat Oct 07, 2006 10:01 pm

Re: Discus 4 --> phpBB2 convertor

Post by daniel x » Fri Nov 09, 2007 9:09 pm

Hi Markus,

Thanks for your work! I browsed through the converted forum and it looks all fine..
The donation was sent a few minutes ago.

best regards
Daniel

:D

markus_freerela
Registered User
Posts: 67
Joined: Sat Mar 03, 2007 5:33 pm

Re: Discus 4 --> phpBB2 convertor

Post by markus_freerela » Sat Nov 10, 2007 7:08 am

thank you very much ;)

daniel x
Registered User
Posts: 10
Joined: Sat Oct 07, 2006 10:01 pm

Re: Discus 4 --> phpBB2 convertor

Post by daniel x » Sun Nov 11, 2007 2:24 pm

Hi Markus

I'd like to add a follow-up question:
After your successful conversion to phpbb2.x I tried to get rid of the spam accounts and spam messages on my board. To this end I installed starfoxtj's admin toolkit which has the exact features needed. Unfortunately the toolkit generates an error when used to delete a user on my database:

Code: Select all

An incorrect value has been returned for group_id in the 'phpbb_groups' table:
Line: 1213
File: /Php5/phpBB2/toolkit.php
User ID: 2541
Username: betting football
Details: This value should be a purely numeric integer. The value returned by the database is:

bool(false)


Please contact Starfoxtj at http://starfoxtj.no-ip.com and report this error.

Note: The script has halted before any changes to the database were made for this specific user.
All other users that were deleted before betting football were properly removed.

Full envoirment details:

array(26) {
  ["user_id"]=>
  string(4) "2541"
  ["clear_posts"]=>
  bool(true)
  ["retain_pms"]=>
  bool(false)
  ["index"]=>
  &string(24) "/Php5/phpBB2/toolkit.php"
  ["phpbb_version"]=>
  &string(5) ".0.22"
  ["phpbb_banlist"]=>
  &string(13) "phpbb_banlist"
  ["phpbb_user_group"]=>
  &string(16) "phpbb_user_group"
  ["phpbb_users"]=>
  &string(11) "phpbb_users"
  ["phpbb_groups"]=>
  &string(12) "phpbb_groups"
  ["phpbb_posts"]=>
  &string(11) "phpbb_posts"
  ["phpbb_posts_text"]=>
  &string(16) "phpbb_posts_text"
  ["phpbb_topics"]=>
  &string(12) "phpbb_topics"
  ["phpbb_vote_voters"]=>
  &string(17) "phpbb_vote_voters"
  ["phpbb_auth_access"]=>
  &string(17) "phpbb_auth_access"
  ["phpbb_sessions"]=>
  &string(14) "phpbb_sessions"
  ["phpbb_sessions_keys"]=>
  &string(19) "phpbb_sessions_keys"
  ["phpbb_privmsgs"]=>
  &string(14) "phpbb_privmsgs"
  ["phpbb_privmsgs_text"]=>
  &string(19) "phpbb_privmsgs_text"
  ["phpbb_topics_watch"]=>
  &string(18) "phpbb_topics_watch"
  ["sql"]=>
  string(139) "SELECT g.group_id FROM phpbb_user_group ug, phpbb_groups g WHERE ug.user_id = 2541 AND g.group_id = ug.group_id AND g.group_single_user = 1"
  ["result"]=>
  resource(10) of type (mysql result)
  ["myrow"]=>
  array(94) {
    [0]=>
    string(1) "2"
    ["user_id"]=>
    string(1) "2"
    [1]=>
    string(1) "1"
    ["user_active"]=>
    string(1) "1"
    [2]=>
    string(5) "admin"
    ["username"]=>
    string(5) "admin"
    [3]=>
    string(32) "f64a8828c3d7383dc2aabe25b5a18f45"
    ["user_password"]=>
    string(32) "f64a8828c3d7383dc2aabe25b5a18f45"
    [4]=>
    string(10) "1194653959"
    ["user_session_time"]=>
    string(10) "1194653959"
    [5]=>
    string(1) "0"
    ["user_session_page"]=>
    string(1) "0"
    [6]=>
    string(10) "1194647589"
    ["user_lastvisit"]=>
    string(10) "1194647589"
    [7]=>
    string(10) "1194193098"
    ["user_regdate"]=>
    string(10) "1194193098"
    [8]=>
    string(1) "1"
    ["user_level"]=>
    string(1) "1"
    [9]=>
    string(1) "4"
    ["user_posts"]=>
    string(1) "4"
    [10]=>
    string(4) "1.00"
    ["user_timezone"]=>
    string(4) "1.00"
    [11]=>
    string(1) "2"
    ["user_style"]=>
    string(1) "2"
    [12]=>
    string(7) "english"
    ["user_lang"]=>
    string(7) "english"
    [13]=>
    string(11) "d M Y h:i a"
    ["user_dateformat"]=>
    string(11) "d M Y h:i a"
    [14]=>
    string(1) "0"
    ["user_new_privmsg"]=>
    string(1) "0"
    [15]=>
    string(1) "0"
    ["user_unread_privmsg"]=>
    string(1) "0"
    [16]=>
    string(1) "0"
    ["user_last_privmsg"]=>
    string(1) "0"
    [17]=>
    string(1) "0"
    ["user_login_tries"]=>
    string(1) "0"
    [18]=>
    string(1) "0"
    ["user_last_login_try"]=>
    string(1) "0"
    [19]=>
    NULL
    ["user_emailtime"]=>
    NULL
    [20]=>
    string(1) "1"
    ["user_viewemail"]=>
    string(1) "1"
    [21]=>
    string(1) "0"
    ["user_attachsig"]=>
    string(1) "0"
    [22]=>
    string(1) "1"
    ["user_allowhtml"]=>
    string(1) "1"
    [23]=>
    string(1) "1"
    ["user_allowbbcode"]=>
    string(1) "1"
    [24]=>
    string(1) "1"
    ["user_allowsmile"]=>
    string(1) "1"
    [25]=>
    string(1) "1"
    ["user_allowavatar"]=>
    string(1) "1"
    [26]=>
    string(1) "1"
    ["user_allow_pm"]=>
    string(1) "1"
    [27]=>
    string(1) "1"
    ["user_allow_viewonline"]=>
    string(1) "1"
    [28]=>
    string(1) "0"
    ["user_notify"]=>
    string(1) "0"
    [29]=>
    string(1) "1"
    ["user_notify_pm"]=>
    string(1) "1"
    [30]=>
    string(1) "1"
    ["user_popup_pm"]=>
    string(1) "1"
    [31]=>
    string(1) "1"
    ["user_rank"]=>
    string(1) "1"
    [32]=>
    string(0) ""
    ["user_avatar"]=>
    string(0) ""
    [33]=>
    string(1) "0"
    ["user_avatar_type"]=>
    string(1) "0"
    [34]=>
    string(0) ""
    ["user_email"]=>
    string(0) ""
    [35]=>
    string(0) ""
    ["user_icq"]=>
    string(0) ""
    [36]=>
    string(0) ""
    ["user_website"]=>
    string(0) ""
    [37]=>
    string(0) ""
    ["user_from"]=>
    string(0) ""
    [38]=>
    string(0) ""
    ["user_sig"]=>
    string(0) ""
    [39]=>
    string(0) ""
    ["user_sig_bbcode_uid"]=>
    string(0) ""
    [40]=>
    string(0) ""
    ["user_aim"]=>
    string(0) ""
    [41]=>
    string(0) ""
    ["user_yim"]=>
    string(0) ""
    [42]=>
    string(0) ""
    ["user_msnm"]=>
    string(0) ""
    [43]=>
    string(0) ""
    ["user_occ"]=>
    string(0) ""
    [44]=>
    string(0) ""
    ["user_interests"]=>
    string(0) ""
    [45]=>
    string(0) ""
    ["user_actkey"]=>
    string(0) ""
    [46]=>
    string(0) ""
    ["user_newpasswd"]=>
    string(0) ""
  }
  ["username"]=>
  string(16) "betting football"
  ["user_level"]=>
  string(1) "0"
  ["admin_id"]=>
  string(1) "2"
  ["row"]=>
  bool(false)
}

A close look at line 1213 of the admin toolkit code reveals that the error message is generated to prevent a MySQL error:

Code: Select all

        //
        // This check fixes the:
        //        Error deleting user's group from groups table:
        //        Line: 1477
        //        File: /toolkit.php
        //        Query: DELETE FROM `phpbb_groups` WHERE `group_id`=
        //        MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
        //
        // Error message that was appearing in v2.1a because the returned value of $row was not correct


        // Debug for numeric check
        /* echo '<pre>';
        var_dump( $row );

        $i = is_numeric( '2 3' );
        var_dump( $i );
        die(); */

        if( !is_numeric( $row['group_id'] ) )

           {

                echo '<font size="4"><b>An incorrect value has been returned for group_id in the \'phpbb_groups\' table:</b></font><br /><b>Line:</b> '.__LINE__.'<br /><b>File:</b> '.$_SERVER['PHP_SELF'].'<br /><b>User ID: </b>'.$user_id.'<br /><b>Username: </b>'.$username.'<br /><b>Details:</b> This value should be a purely numeric integer. The value returned by the database is:<br /><pre>';
                var_dump( $row );
                echo '</pre><br />Please contact Starfoxtj at <a href="http://starfoxtj.no-ip.com">http://starfoxtj.no-ip.com</a> and report this error.';
                echo '<br /><br /><b>Note: </b> The script has halted before any changes to the database were made for this specific user.<br />All other users that were deleted before <b>'.$username.'</b> were properly removed.';
                echo '<br /><br /><b>Full envoirment details:</b><br /><pre>';
                var_dump( get_defined_vars() );
                die();

           }

Do you think the unexpected value for "group_id" was inserted during the conversion from discus to phpbb ?

Of course I tried to reach starfoxtj's own support forum first but it seems to be offline for longer time already.
I also tried to solve the problem by converting the board to phpbb3.x which features powerful options for purging spam accounts. But the conversion routine phpbb2.x > 3.x which is included in the phpbb3.x installer does not convert the html tags in my database (not even the line breaks <br>). Therefore the result is unusable.
If you had any hint how I could go further that would be appreciated a lot. :?

regards
daniel

User avatar
D¡cky
Former Team Member
Posts: 11812
Joined: Tue Jan 25, 2005 8:38 pm
Location: New Hampshire, USA
Name: Richard Foote
Contact:

Re: Discus 4 --> phpBB2 convertor

Post by D¡cky » Mon Nov 12, 2007 4:24 am

daniel,
It seems as thought the group_id is missing. Run this script, Create user-group if missing, then try to delete the users.

Just a thought, the tool that I use to delete spammers is Admin Userlist.
Have you hugged someone today?

daniel x
Registered User
Posts: 10
Joined: Sat Oct 07, 2006 10:01 pm

Re: Discus 4 --> phpBB2 convertor

Post by daniel x » Mon Nov 12, 2007 11:28 pm

thanks dicky!

after applying that script the starfoxtj toolkit works. it still generates an error but apparently AFTER deleting the spam accounts and messages as intended. The result is fine. :D

regards
daniel

OscarT
Registered User
Posts: 8
Joined: Tue Jun 12, 2007 2:21 pm

Re: Discus 4 --> phpBB2 convertor

Post by OscarT » Wed Nov 14, 2007 9:43 pm

markus,

Thanks for the update. I may have missed something, but I am running the free-ware version. It does not use sql to store the user list and such. Have you helped any one convert from the free version?

Thank you for your help and efforts in migrating all of us away from discus.

Oscar

Locked

Return to “[2.0.x] Convertors”