When trying to use the migration tool, we get the following error:
The tool is ready to convert the database now.
Warning : mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /home/scoticf/public_html/migration/engine/convert_db.php on line 26
Warning : mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /home/scoticf/public_html/migration/engine/convert_db.php on line 68
Error! An error occurred while resetting the versions!
Is there something we are doing wrong?
Your guidance would be appreciated.
I missed where you got that migration to from? The error is that your result is not complete. It either could not find any rows or something else is wrong.
We have to look into the took to give you better message, or to see how you get rows from the database instead of empty result
The migration tool was downloaded from the site here. (https://wiki.invoiceplane.com/en/1.5/system/upgrade-from-fusioninvoice)
The database is fully populated and we have backed up the live db. Can send you the .sql file if that helps?
1 Like
Iāll let you know if I need it. Thanks for the link man
The hint might be in that error message/If your connection fails, the connect will return false (a boolean). This is being passed to the fetch_row() function.
Please ensure you are connecting successfully. I would suggest you add the following code after the mysqli_connect() statement and the
$connection = mysqli_connect(
$_SESSION['connection']['host'],
$_SESSION['connection']['user'],
$_SESSION['connection']['password'],
$_SESSION['connection']['name']
);
if (mysqli_connect_errno()) {
die("Database connection failed (Error no ". mysqli_connect_errno(). " ) : ". mysqli_connect_error());
}
1 Like
Still getting the error message:
The tool is ready to convert the database now.
Warning : mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /home/scoticf/public_html/migration/engine/convert_db.php on line 30
Warning : mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /home/scoticf/public_html/migration/engine/convert_db.php on line 72
Error! An error occurred while resetting the versions!
despite adding the as suggested,
1 Like
Iāll take a look at it tomorrow morning
Eish. I was hoping that would catch the error. This means that your connection was successful. Move to the next possible culprit - the query. You can see what the actual error is. Try the following change that will display any errors with the query.
Change
$result = mysqli_query($connection, $query);
to
$result = mysqli_query($connection, $query);
if ($result === false) {
echo "error while executing mysql: " . mysqli_error($connection);
die();
}
`
1 Like
Its now throwing up this error:
error while executing mysql: Table āip_client_customā already exists
I realised there was some entries in the DB from a previous install of IP. I removed all the āip_ā tables and reran the migration tool. Now I get this message:
The tool is ready to convert the database now.
Warning : mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given in /home/scoticf/public_html/migration/engine/convert_db.php on line 76
Error! An error occurred while resetting the versions!
What I have noticed is that the migration tool renames the tables but misses off the beginning so for eg
attachments
becomes
ip_achments
Itās a little but tricky to solve. The tables get renamed, but most likely there are already tables in that database with that name.
Every error like this: mysqli_fetch_row() expects parameter 1 to be mysqli_result, boolean given
needs to be handled like this:
$result = mysqli_query($connection, $query); if ($result === false) { echo "error while executing mysql: " . mysqli_error($connection); die(); }
Without the real errors you canāt really debug that conversion.
Are you trying to do the conversion in the same database?
Can you see where the renaming of the tables take place?
This line
$new_name = 'ip_'.$new_name;
Just change the prefix, to something like
$new_name = 'ipv2_'.$new_name;
1 Like
I have recently taken on a customer that has v2.0.0a as there main production system i would like to move them away from this alpha onto 1.5.9 is the migration tool still available as the link above appears dead.
Thanks in advance
@Wilsoc03 there is a migration tool on GitHub but for this one I would do it manually:
- take a look at the structure of each table in ivplv1 and ivplv2
- insert into ivplv1.table select field, field, field from ivplv2
- Make a testing-environment or acceptance-environment and see if the migration worked out ok.
idea?