upgrade to 2.6 cause content un-readable

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

Post Reply
ufgeorge
Posts: 27
Joined: Tue Dec 01, 2009 4:34 pm

upgrade to 2.6 cause content un-readable

Post by ufgeorge »

I upgrade from 2.5.x to 2.6.
Everything works fine at 2.5.x.
After upgrade to 2.6, all my faq content with Chinese words become un-readable!!

The menu can show correct Chinese words but my faq content can't...

Please help me!

My faq web site is www.magg.com.tw/faq/

George
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: upgrade to 2.6 cause content un-readable

Post by Thorsten »

Hi,

which encoding does your database use? Which database do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ufgeorge
Posts: 27
Joined: Tue Dec 01, 2009 4:34 pm

Re: upgrade to 2.6 cause content un-readable

Post by ufgeorge »

Thorsten wrote:Hi,

which encoding does your database use? Which database do you use?

bye
Thorsten
DB is mySQL. And I saw mySQL text encoding is UTF-8 Unicode (utf8).
Since I am using Bluehost hosting server, the DB and 2.5.x script was installed by simplescript.
And so is upgrade process.
Do u know is there any change of DB when upgrade? I have a backup DB backuped before upgrade. It seems nothing change of content.
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: upgrade to 2.6 cause content un-readable

Post by Thorsten »

Hi,

ah, okay...

Please restore your 2.5 database backup and edit the file install/update.php by removing the following code:

Code: Select all

        switch($DB['type']) {

            case 'mysql':
                include 'mysql.utf8migration.php';
                break;
                
            case 'mysqli':
                include 'mysqli.utf8migration.php';
                break;
                
            default:
                print '<p>Please read <a target="_blank" href="../docs/documentation.en.html">documenation</a> about migration to UTF-8.</p>';
                break; 
        }
Then re-run the update process again.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ufgeorge
Posts: 27
Joined: Tue Dec 01, 2009 4:34 pm

Re: upgrade to 2.6 cause content un-readable

Post by ufgeorge »

You want me restore only database or restore db and script to 2.5.x?
Is there any simple way?

I use simplescript provided by Bluehost to install/upgrade phpMyFAQ.
If I have to modify update.php then I can't use the method to upgrade...

George
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: upgrade to 2.6 cause content un-readable

Post by Thorsten »

Hi,

you only need to restore the database.

Isn't it possible to edit the update.php file for you? If not, please wait until the release of 2.6.1. I already fixed that issue.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ufgeorge
Posts: 27
Joined: Tue Dec 01, 2009 4:34 pm

Re: upgrade to 2.6 cause content un-readable

Post by ufgeorge »

I do restore all things back to 2.5.x.
Then edit update.php in 2.6.0 as you suggest.

Follow upgrade instructions of document to delete and left some folders/files.

After run /install/update.php

The same.

And also I edit database.php to point to the backup database, the same!

Looks it is not db problem.

What do I miss??
Thorsten
Posts: 15834
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: upgrade to 2.6 cause content un-readable

Post by Thorsten »

Hi,

could you please try the following: Open inc/PMF_DB/Mysql.php and goto line 83 and remove the following code:

Code: Select all

        if (version_compare(PHP_VERSION, '5.2.3', '>')) {
        	mysql_set_charset('utf8', $this->conn);
        } else {
        	$this->query('SET NAMES utf8');
        }
bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
ufgeorge
Posts: 27
Joined: Tue Dec 01, 2009 4:34 pm

Re: upgrade to 2.6 cause content un-readable

Post by ufgeorge »

Yes. That's it...
TKS very much.

George
Post Reply