back to phpList.org

Is there a way to convert database to utf8 by command line?

Hi,

Is there a way to convert database to utf8 by command line?
When I try to do it through the phplist login, it does not get completed and the database is not coverted.

Any way to do the conversion using command line?

@pvanthony It appears that you can run the page converttoutf8 from the command line, similar to processqueue etc.

@duncanc Thank you for replying.
I hope you can help me with the syntax for the command line or a link to the documentation.

There is a link to the manual on the home page https://www.phplist.org/

Why do you need to convert the database? That should be needed only when upgrading from phplist 2.x. Is that what you are doing?

I am doing it because phplists states that after I upgraded it.
I will checkout the documentation.

Hi,
From what version did you upgrade?

Initially from phplist version 2 to phplist 3 sometime ago. Then to phplist 3.4 a few days ago.
phplist is asking us to do the conversion.

I have checked the documentation but I could not find the command line for converting the database to utf8.

Any advice?

You can read more about converting the database on this page:

https://www.a2hosting.com/kb/developer-corner/mysql/convert-mysql-database-utf-8

Use the same command as for processqueue but specify the converttoutf8 page instead. So something like this but you will need to know the correct command to run php itself.

php /path/to/phplist/admin/index.php -p converttoutf8 -c /path/to/config.php

But if you know that the tables are already utf8, which you can check with phpmyadmin or similar, then you can probably ignore the phplist prompt.

This did it. Yahoooooo! Thank you very much for helping.
On the command line, it says that it has finished with the conversion.

FYI. phplist still shows that it needs to be converted. Strange.

The main thing is that the command line says all done. Great.

Thank you again for helping.

Can you show a screenshot of this because it doesn’t sound correct.

Thanks. It seems that warning about the available disk space is displayed even when the database is already UTF8. That looks to be an error in the code for the converttoutf8 page.