February 04 2012 14:44:50
Languages
Navigation
Friends & Affiliates
Roadmap
[N] Error log like in P...
[N] Submit photo - Subc...
[N] Warnings - who can ...
[N] [edit profile]Save ...
[N] Moving panels with ...
[N] Forum thread deform...
[N] Thumbnails in downl...
[N] [Locale German] New...
[N] Warnings only for a...
[N] Different avatar sizes
Users Online
· Guests Online: 5

· Members Online: 0

· Total Members: 464
· Newest Member: Erikutis
Last Seen Users
· dalem19:37:30
· Erikutis21:45:07
· videry 1 day
· inflames 1 day
· SilverAngel 2 days
· jebajseti 2 days
· outchorn 2 days
· uygarozan 4 days
· deejay-erik 5 days
· DJSimse 5 days

Login
 Username  Password  
View Thread: database content for PiF 0.08.00 or highter
Who is here? 1 Guest
 Print Thread
database content for PiF 0.08.00 or highter
slaughter
Hi,
in next version PiF 0.08.00 we will use utf-8 charset for the data which are stored in the database.

This may cause some errors if you already have PiF 0.07.00 installed.
For a clean installation it should work like a charm.

I already tested the new utf-8 charset on this site.

I used a script to convert the data from the existing database to utf-8.
I will attach it here in the post.

But I found out some errors:
a) In table "comments" the "comment_type" isn't 100% converted.
I used the following statements in PHPMyAdmin to make it work:

UPDATE YOURPREFIX_comments SET comment_type='r' WHERE comment_type='r\0'
UPDATE YOURPREFIX_comments SET comment_type='A' WHERE comment_type='A\0'
UPDATE YOURPREFIX_comments SET comment_type='N' WHERE comment_type='N\0'
UPDATE YOURPREFIX_comments SET comment_type='C' WHERE comment_type='C\0'


b) in table "admin" there is the same problem with "admin_rights".
I just deleted all admin rights and added them again.


I am not sure, but the issue could be the CHAR(4) in admin_rights and the CHAR(2) in comment_type.


This is the result of my testing so far.
slaughter attached the following file:
utf8-converter-2.zip [1.13 kB, 82 Downloads]
Edited by slaughter on 19-10-2010 19:07
 
arat
When I create my database does it make any difference which utf8 collation option I select? I selected utf8_general_ci and all seemed to go well. Is this the correct selection for English Wink
 
slaughter
arat wrote:
When I create my database does it make any difference which utf8 collation option I select? I selected utf8_general_ci and all seemed to go well. Is this the correct selection for English Wink

Yes, with this one all Locales/Languages should work as far as I know.
 
Ruepel
well... not all users are coders... i tryed to install 0.08, but i get only errors with the charsets.... well 0.07 was running fine... but with my little skills a can not figure out, whats going wrong... tested now 5 hours to get it workin and i dont want to stay in 0.07... well.. looks like, the newer versions are only for coders or php freaks... is there a fix planed or something to make it easier?... or better a step by step readme? im not a sql freak, i only know how to read, maybe edit something after a step by step instruction
Edited by Ruepel on 13-06-2010 15:06
 
Advertising Bot
Posted on 04-02-2012 14:44
Bot Agent

Posts: n^x
Joined: Always

  
slaughter
Here is a "dirty" fix.
It does not convert the content of your database, but it should fix the issue with the characters.

includes/mysql_include.php

Download source  Code
function dbconnect($db_host, $db_user, $db_pass, $db_name, $db_charset = 'UTF8') {
   global $db_connect;
   $db_connect = @mysql_connect($db_host, $db_user, $db_pass);
   $db_select = @mysql_select_db($db_name);
   #$db_charset = mysql_set_charset($db_charset, $db_connect);
   if (!$db_connect) {
      die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><strong>Unable to establish connection to MySQL</strong><br />".mysql_errno()." : ".mysql_error()."</div>");
   } elseif (!$db_select) {
      die("<div style='font-family:Verdana;font-size:11px;text-align:center;'><strong>Unable to select MySQL database</strong><br />".mysql_errno()." : ".mysql_error()."</div>");
   }


Edited by slaughter on 13-06-2010 19:15
 
Ruepel
thx, i will try it soon as possible

Grin
 
browser1
Some infusions generate character problems under PiF. For example with apostroph ('Wink, ä, ű, ő, í.

How can I avoid them?
 
ep98
They're using non-utf8 compatible tables Smile
 
www.cmsbg.info
browser1
So, what should I do? Can I switch these tables in CPanel?
 
ep98
In code... first
then make sure that this tables are empty and if they're empty.... use conversion from phpmyadmin
but first from code.

w8 for Infusions directory.
SignatureMay The Source Be With You !
Infusions Directory
 
www.cmsbg.info
Silver_Wings
I got the problem again with the latest updated of PiF
Is there a fix for this too?
http://nightwishbelgium.be/news.php you can see that the text isn't displayed properly
 
Rafik89
Notice: Use of undefined constant DB_NAME - assumed 'DB_NAME' in E:\xampp\htdocs\PiF\utf8-converter.php on line 48


Download source  Code
mysql_query("ALTER DATABASE " . DB_NAME . " CHARACTER SET utf8", $link_id);




Download source  Code
$DB_HOST = 'localhost'; // Enter your Database Host
$DB_USER = 'xxxx'; // Enter your Database Username
$DB_PASSWORD = 'xxxx'; // Enter your Database Password
$DB_DATABASE = 'PIF'; // Enter your Database Name




Something wrong :D
Signature
 
http://rafik.eu
slaughter
Oh, maybe try to replace DB_NAME with $DB_DATABASE
 
Rafik89
I know, just turn attention to the errorSmile
Signature
 
http://rafik.eu
slaughter
I updated the download file in first post Wink
 
Jump to Forum:
Similar Threads
Thread Forum Replies Last Post
Auto Database system General Questions 1 17-01-2012 00:17
Share this thread
URL:
BB-Code:
HTML:
AddThis:
Share |
Render time: 0.24 seconds - 115 Queries 831,002 unique visits