Impossible to upgrade from 6.0.5 to 7.0.0 or 7.0.2

Hello!

I have tried to upgrade from 6.0.5 to 7.0.0 or 7.0.2 but impossible.

Always have the following message in the upgrading process: Fatal error: Uncaught Error: Call to undefined method mysqli::get_charset() in /home/install/upgrade.php:188 Stack trace: #0 {main} thrown in /home/install/upgrade.php on line 188

I know this issue have been solved in https://github.com/Dolibarr/dolibarr/pull/8528 but even when the upgrade.php file has been changed, still same problem…

Any one else having same problem? Any solutions? Is it a problem with my server?

Thanks!

Hi. Spanish forum have a post:

En la Linea 188

Cambiar de esto:
$tmparray = $db->db->get_charset();

A esto:
$tmparray = $db->getListOfCharacterSet();

change line 188

1 Like

Thanks Eapcorreo for your answer.

Is this line in the update.php file?

I saw in the Spanish forum this link: https://www.dolibarr.es/foro/viewtopic.php?f=18&t=5686 , where probably it was the answer, but when trying to enter says: “Website Disabled”…

Did you get the answer from the same link? Or other?

Thanks!!

Oliver.

Hi guirot

Yes, link you send is correct, is the post where i read the answer.
File to chage is upgrade.php.

//// this is origin question
Hola,
Recibo el siguiente error cuando intento hacer el upgrade desde softaculos:

Structure database migration

Fatal error: Call to undefined method mysqli::get_charset() in /home/xxxxx/public_html/erp/install/upgrade.php on line 188
Server connection : localhost OK
Database connection : xxxxx_dolib83 OK
Database server version 5.6.36-82.1-log

He probado asociando la carpeta de Dolibarr a php5.6 y php7.0, con el mismo resultado de error.

Alguna idea?
Saludos.

///////////////// this is the answer

En la Linea 188

Cambiar de esto:
$tmparray = $db->db->get_charset();

A esto:
$tmparray = $db->getListOfCharacterSet();

/////////////

Instruction is change line 188 in file upgrade.php
:happy:

Regards,
Eduardo.

1 Like

Eduardo,

Great! Many thanks for your help.

You just saved me a lot of time.

Best regards from Spain!

Oliver.

Hola Oliver

Si eres de España, te mando un gran saludo desde Argentina !

Eduardo.