Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-10039

2.x to 3.x conversion fails when using mssqlnative to connect to destination database

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.0.8
    • Fix Version/s: 3.0.9-RC1
    • Component/s: phpBB 2.0 convertor
    • Labels:
      None
    • Environment:
      PHP 5.3.5, FastCGI 1.5, IIS (5.1 & 6.0), Microsoft SQL Server (2005 & 2008 R2 tested), all browsers.

      Description

      When converting a 2.x board to 3.0.8, if the 3.x board is installed using MSSQLNATIVE (MS-SQL 2005+ Native) the converter will reliably throw fatal errors. The first error is: "cannot insert into pk_forum_id when IDENTITY_INSERT is set to OFF", if you enable identity insert manually on that key the next error which cannot be worked around is "cannot truncate table 'phpbb_userconv' because it cannot be found or you do not have permission" (the table is never created).

      An effective workaround is to use mssql_odbc when installing the 3.x board.

        Activity

        Hide
        Noxwizard Patrick Webster added a comment -

        In /install/convertors/functions_phpbb20.php, on lines 96, 293, and 1729 this needs to be added:

        case 'mssqlnative':

        Show
        Noxwizard Patrick Webster added a comment - In /install/convertors/functions_phpbb20.php, on lines 96, 293, and 1729 this needs to be added: case 'mssqlnative':
        Hide
        Indiana Krom Indiana Krom [X] (Inactive) added a comment -

        Applied the recommended edits to /install/convertors/functions_phpbb20.php and re-tested, the conversion completed successfully.

        I did spot some unusual but non-fatal debug notices during the private message phase:
        [phpBB Debug] PHP Notice: in file /install/convertors/functions_phpbb20.php on line 1267: Undefined index: privmsgs_id

        However nothing appears out of order or missing with the final board or the converted PMs, I believe this can be closed. Coincidentally getting odbc out of the picture produced a 10x performance improvement, thanks.

        Show
        Indiana Krom Indiana Krom [X] (Inactive) added a comment - Applied the recommended edits to /install/convertors/functions_phpbb20.php and re-tested, the conversion completed successfully. I did spot some unusual but non-fatal debug notices during the private message phase: [phpBB Debug] PHP Notice: in file /install/convertors/functions_phpbb20.php on line 1267: Undefined index: privmsgs_id However nothing appears out of order or missing with the final board or the converted PMs, I believe this can be closed. Coincidentally getting odbc out of the picture produced a 10x performance improvement, thanks.
        Hide
        igorw Igor Wiedler [X] (Inactive) added a comment -

        There are several places where mssqlnative is not listed, such as create_schema_files (maybe intended?) and some queries. Thanks Patrick .

        Show
        igorw Igor Wiedler [X] (Inactive) added a comment - There are several places where mssqlnative is not listed, such as create_schema_files (maybe intended?) and some queries. Thanks Patrick .
        Hide
        Oleg Oleg [X] (Inactive) added a comment -

        Patch from Patrick's instructions. Not tested.

        Show
        Oleg Oleg [X] (Inactive) added a comment - Patch from Patrick's instructions. Not tested.
        Hide
        Oleg Oleg [X] (Inactive) added a comment -

        (19:40:40) nn-1: Noxwizard: could you also test http://tracker.phpbb.com/browse/PHPBB3-10039 sometime?
        (19:41:23) Noxwizard: I already have.
        (19:43:14) nn-1: your original instructions or the patch?
        (19:45:08) Noxwizard: The ones I posted, which are the same that are in the linked patch.
        (19:47:13) nn-1: that technically makes the patch untested
        (19:49:01) Noxwizard: It's the exact same three lines as I put in the ticket.
        (19:50:08) nn-1: that is true
        (19:50:42) nn-1: i suppose i will merge it when the other blockers are taken care of if nobody else does

        Show
        Oleg Oleg [X] (Inactive) added a comment - (19:40:40) nn-1: Noxwizard: could you also test http://tracker.phpbb.com/browse/PHPBB3-10039 sometime? (19:41:23) Noxwizard: I already have. (19:43:14) nn-1: your original instructions or the patch? (19:45:08) Noxwizard: The ones I posted, which are the same that are in the linked patch. (19:47:13) nn-1: that technically makes the patch untested (19:49:01) Noxwizard: It's the exact same three lines as I put in the ticket. (19:50:08) nn-1: that is true (19:50:42) nn-1: i suppose i will merge it when the other blockers are taken care of if nobody else does
        Hide
        naderman Nils Adermann added a comment -

        I verified Patrick's fix. It worked fine for me, so merging.

        Show
        naderman Nils Adermann added a comment - I verified Patrick's fix. It worked fine for me, so merging.

          People

          • Assignee:
            naderman Nils Adermann
            Reporter:
            Indiana Krom Indiana Krom [X] (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development