PDA

View Full Version : I need your help


BillB1
02-17-2022, 05:50 AM
I am trying to upgrade from vb 3.6 to 5.6.6
Restored old database from backup file to vb 3.8.11
hoping to upgrade to 4.2.5 then 5.6 BUT...

It's not going so well with Arabic Language,
The upgarde went fine on my local machine, Xampp
but not on the host server,
all arabic text turns into gibrish or question marks.

I have tried the following:
1. Xampp with several PHP versions from 5.6 to 7.4,
2. Converted collation and charset from Latin1 swedish to UTF8
3. used the VB script: utf8convert.phar
4. Imported the same exact working database from Xampp, same VB files
then tried with multiple fresh installations, No luck!
5. SQL on xampp is the same as the host server tried both MariaDB 10.1 and 10.2, and
I have read similar threads, and tried solutions presented on this forum, no luck!

This is what I get:
https://dantdubai.org/vb/

What am I missing?

snakes1100
02-17-2022, 09:39 PM
Verify the charsets match for sql when you export it out of xampp server & the charsets match what xampp is when importing it into the host server.

character_set_client latin1
character_set_connection latin1
character_set_database latin1
character_set_results latin1
character_set_server latin1
character_set_system utf8

You could also try settings the charset in vb's config file.

BulliM
02-18-2022, 07:55 AM
Thereis an error in your header.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="En">

should be:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="En">

And the content charset is...

content="text/html; charset=windows-1256"
Should be utf-8.

BillB1
02-19-2022, 12:17 AM
Verify the charsets match for sql when you export it out of xampp server & the charsets match what xampp is when importing it into the host server.

character_set_client latin1
character_set_connection latin1
character_set_database latin1
character_set_results latin1
character_set_server latin1
character_set_system utf8

You could also try settings the charset in vb's config file.

Thank you for the promp reply!
I'll export the DB from Xampp following charset above, upload it to host and then restore.
I've noticed one difference: Xampp has MariaDB 10.1 while the host has MariaDB 10.2
I am not sure if this is what causing issues!

Thanks again
Bill

--------------- Added 1645237574 at 1645237574 ---------------

Thereis an error in your header.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="En">

should be:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="En">

And the content charset is...

content="text/html; charset=windows-1256"
Should be utf-8.

Thanks for the reply,
To be honest, I don't know where or how to do it, but I assume if I can get out of the gibberish, I'll be able to make these changes from admincp. correct?

Thanks again
Bill

snakes1100
02-19-2022, 11:27 AM
If the host allows it, you can use a local php.ini to set the charset, add it to the public_html dir via ftp.

BillB1
02-19-2022, 04:52 PM
If the host allows it, you can use a local php.ini to set the charset, add it to the public_html dir via ftp.

Yes, I have root access. it's VPS.
Notice:
1. Following your advise, on the second import, things did change, got better a bit,
Now you can see REAL English and actual words!
https://dantdubai.org/vb/
2. Also I can login into admincp, so deleted the Arabic language, tested several language packs
but still.....In fact you may notice the actual shape/fonts, they look like Vietnamese instead of Arabic? I copied and pasted it in Google translate Auto detect said Vietnamese :confused:

I wish to share this image with you:
Same DB on both servers: xampp being on the left side, the other one on hosted VPS.

All the best,
Bill

socialteenz
02-20-2022, 04:02 PM
Create a blank index.php file to your root to prevent your files from appearing on the root (https://dantdubai.org)

BillB1
02-20-2022, 09:47 PM
Create a blank index.php file to your root to prevent your files from appearing on the root (https://dantdubai.org)

Sure thing, and thanks for the heads-up:)

--------------- Added 1645404853 at 1645404853 ---------------

Updating the topic in case someone faces a similar Charset issue with non english language.
After going through so many suggestions, forums, and stackoverflow
especially this Hell of Latin1 vs. utf8 arguments, I feel silly.

The reason why I had all these ?????? and Gibberish characters was the very Locale
setting on the Centos7 server.

This is how it was solved:
logged in as root> terminal
# yum update
# localectl status
checked the system locale:
# cat /etc/locale.conf
list available locale on server:
# localectl list-locales | grep en_
pick AR support locale:
# localectl set-locale LANG=<<locale_name>>
and confirm
# localectl status.

Then I importing the same OLD Latin1 database charset and collation.
Since Arabic is not my language, I copied several pages worth of global phrases from xampp
and pasted them into global phrases on the host, charset is just fine!
https://dantdubai.org/vb/

Still not out of the woods yet, Next step:
Restore about 90.000 users with 1.3 million posts.
I'll stay with vb3.8 to see if impex is up to the task.
Had anyone tried impex to selectively import some tables and exclude old styles, language pack, outdated mods etc?