cotonti.com : Migration from Seditio 121/125 to Cotonti 0.0.2 https://www.cotonti.com Последние сообщения в теме Cotonti en Fri, 10 Oct 2025 04:18:25 -0000 Kingsley пт, 13 мар 2009 04:35:20 -0000 Lombi
Will be making a tutorial on encoding in case your database needs this (most do), as well as upgrading. Soon.]]>
пт, 13 мар 2009 03:08:36 -0000
Kingsley пт, 13 мар 2009 02:42:14 -0000 ruben
here a script to convert your databse to UTF8

<html>
<head>
<title>Convert MySQL Database to UTF-8</title>
</head>
<body>

<?php
// Fill in your configuration below
$db_server      = 'localhost';
$db_user      = '';
$db_password   = '';
$db_name      = '';

// Do not change anything below this
set_time_limit(0);

$connection = mysql_connect($db_server, $db_user, $db_password) or die( mysql_error() );
$db = mysql_select_db($db_name) or die( mysql_error() );

$sql = 'SHOW TABLES';
if ( !($result = mysql_query($sql)) )
{
   print '<span style="color: red;">SQL Error: <br>' . mysql_error() . "</span>\n";
}

// Loop through all tables in this database
while ( $row = mysql_fetch_row($result) )
{
   $table = mysql_real_escape_string($row[0]);
   $sql2 = "ALTER TABLE $table DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci";
   
   if ( !($result2 = mysql_query($sql2)) )
   {
      print '<span style="color: red;">SQL Error: <br>' . mysql_error() . "</span>\n";
      
      break;
   }
   
   print "$table changed to UTF-8 successfully.<br>\n";

   // Now loop through all the fields within this table
   $sql3 = "SHOW COLUMNS FROM $table";
   if ( !($result3 = mysql_query($sql3)) )
   {
      print '<span style="color: red;">SQL Error: <br>' . mysql_error() . "</span>\n";
      
      break;
   }

   while ( $row3 = mysql_fetch_row($result3) )
   {
      $field_name = $row3[0];
      $field_type = $row3[1];
      
      // Change text based fields
      $skipped_field_types = array('char', 'text', 'blob', 'enum', 'set');
      
      foreach ( $skipped_field_types as $type )
      {
         if ( strpos($field_type, $type) !== false )
         {
            $sql4 = "ALTER TABLE $table CHANGE `$field_name` `$field_name` $field_type CHARACTER SET utf8 COLLATE utf8_bin";
            if ( !($result4 = mysql_query($sql4)) )
            {
               print '<span style="color: red;">SQL Error: <br>' . mysql_error() . "</span>\n";
               
               break 3;
            }
            print "---- $field_name changed to UTF-8 successfully.<br>\n";
         }
      }
   }
   print "<hr>\n";
}

mysql_close($connection);
?>

</body>
</html>
]]>
ср, 11 мар 2009 05:03:44 -0000
donP in markitup.ajax.php
header('Content-type: text/html; charset=UTF-8');
instead of the default
header('Content-type: text/html; charset='.$cfg['charset']);

So, now I have my website headers declaration set to ISO-8859-1, my MySql database with collation and charser set to unicode-utf8-ci, my database datas (I think) inserted with ISO-8859-1 format... :-/ but all seems to go well :-O

The refresh problem has caused by an error (I think) in markitup.setup.php:

Instead of
autorefresh=01:radio::0 preview auto-refresh
I put
autorefresh=01:select:true,false:false:Enable preview auto-refresh

Now, it seems to be in order...]]>
пт, 06 фев 2009 20:37:29 -0000
musashi9 but i still can't click submit on anything without getting that fatal error.

details from my host

Platform
Type Debian

MySQL Version
MySQL Version 5.0.45

Perl Version
Perl 5.8.8

PHP Version
PHP 5.2.2

I also noticed that on my pages with downloads. The download button says "THIS DOWNLOAD IS ONLY AVAILABLE TO REGISTERED MEMBERS", even though I am logged in as Admin]]>
пт, 06 фев 2009 16:59:01 -0000
Trustmaster donP, be careful. What you said should work if all your existing data is in ISO-8859-1. But mixing charsets would be quite dangerous.

Generally we recommend moving to UTF-8 to add multilingual support. But in the end that is personal choice.

musashi9, any details on your server? OS, MySQL and PHP version would be helpful.]]>
пт, 06 фев 2009 14:18:51 -0000
musashi9
After I follow the other steps I get a site that looks like this cotoni site! but after I log in, the skin of my site changes back to my old skin. When I goto my profile to change it back to SED-LIGHT i get an error, this also happens when I try to edit or create new things
2009-02-05 20:11
Fatal error : Wrong parameter in the URL
.
And if i try to access the Admin I just get a blank white page]]>
чт, 05 фев 2009 13:21:55 -0000
donP
But some posts ago you told me:
Trustmaster:
You see AJAX uses UTF-8 by default, that's why previews are often messed. But sending correct header() with exact charset usually fixes the problem

I'm confused... :-O]]>
чт, 05 фев 2009 04:59:58 -0000
Trustmaster чт, 05 фев 2009 04:12:31 -0000 donP ...but I'm still waiting for a solution to my charset problem :-(]]> чт, 05 фев 2009 03:58:17 -0000 Trustmaster ср, 04 фев 2009 15:17:12 -0000 donP
P.S. I'm doing Italian translation of main.lang and other lang files... I hope it will be usefull and nobody was already doing that...]]>
ср, 04 фев 2009 08:25:28 -0000
Trustmaster
Autorefresh is disabled here. But I don't exclude the possibility of bugged autorefresh in current markItUp! version if you say so. Just needs a bit testing on localhost.]]>
ср, 04 фев 2009 06:47:42 -0000
donP
1. Also here on cotonti.com automatic refresh doesn't go well... it's disabled or you're having the same problem as me?]]>
ср, 04 фев 2009 06:09:27 -0000
Trustmaster ср, 04 фев 2009 05:59:33 -0000 donP ISO-8859-1 / Western Europe, and ISO-8859-1 in datas/config.php...
In addiction, I have no problems in preview if I use fckeditor instead of markitup...

Another problem with markitup: no automatic refresh in preview (despite the fact I set that value in plugin configuration)...]]>
ср, 04 фев 2009 05:21:21 -0000
Trustmaster # donP : My database actually has utf8_unicode_ci collation but my seditio 121 website always had setted-up to ISO-8859-1 charset.
Now, after migration to Cotonti (in local), all goes fine except markitup preview that shows strange characters instead of italian accented letters (àèéìòù).
TExtboxer also had that problem but I solved changing the preview code in js like I explained in this Neocrome Forum...
What can I do with markitup preview?
Please, help me... :-(
Make sure you have chosen correct charset in site configuration. Usually the problem is connected with default charset in PHP output, or your webserver's default charset.]]>
вт, 03 фев 2009 18:24:31 -0000
donP # Trustmaster : Sorry, that note was for people who are switching to UTF-8. Traditional charsets should work just fine.

My database actually has utf8_unicode_ci collation but my seditio 121 website always had setted-up to ISO-8859-1 charset.
Now, after migration to Cotonti (in local), all goes fine except markitup preview that shows strange characters instead of italian accented letters (àèéìòù).
TExtboxer also had that problem but I solved changing the preview code in js like I explained in this Neocrome Forum...
What can I do with markitup preview?
Please, help me... :-(]]>
вт, 03 фев 2009 16:49:54 -0000
foxhound
However, I am a bit confused by the install instructions in the first post (updating from seditio).

# medar : 1. Unzip Cotonti 0.0.2 release in some folder.

So.......cotonti does not need to be installed in the root public_html (where seditio is installed now)? Well, it has to be in there I guess but it can be in a subfolder?

2. Copy to this folder from Seditio folder:
/datas/ all folders but not files

This means I will loose all files my users and I have uploaded when changing to Cotonti?

Migration complete.

I understand all following steps (sql etc) although I cant understand how it will work from within a subfolder.
I did read we can move to Cotonti without loosing anything.....so thats why I am confused reading the first post.
Sorry if I am just missing something obvious.



[edit]
Ahummm
Just ignore me (should not be a problem here though). This is all for setting up a test site............
Remind me to not ask questions after a busy day of work.]]>
вт, 03 фев 2009 07:12:22 -0000
Trustmaster пн, 02 фев 2009 17:41:02 -0000 m_ogz пн, 02 фев 2009 17:36:35 -0000 Trustmaster пн, 02 фев 2009 16:08:05 -0000 Kilandor пн, 02 фев 2009 11:20:03 -0000 n0fx
I understand, Thanks.]]>
пн, 02 фев 2009 08:27:07 -0000
esclkm пн, 02 фев 2009 08:21:24 -0000 n0fx пн, 02 фев 2009 08:17:09 -0000 Trustmaster must be converted to UTF-8 before migrating to Cotonti. You must make a backup first. Then you can try something like this.]]> пн, 02 фев 2009 02:59:39 -0000 Lombi пн, 02 фев 2009 02:25:41 -0000 medar
2. Copy to this folder from Seditio folder:
/datas/ all folders but not files
/plugins/ necessary
/skins/ necessary

3. Updating database.

There is two way to convert database.

UPD
Autoconvert
3.1.1 Use Seditio - Cotonti sql-updater. Unzip folder "updater" to Cotonti folder, set to folder rights 777, and launch updater/index.php .
3.1.2 Create in phpmyadmin database for future Cotonti database. Complete fields in updater and press Start.
All plugins will be deinstalled, all config values will be reset to default. Will set sed-light as default skin for admin.

OR

Manual convert.
3.1.1 Create in phpmyadmin copy of your seditio database and and follow these steps with this copy.
3.1.2 Convert database to utf-8. Instructions: eng, rus with ssh, rus without ssh.
3.1.3 Execute sql-update: http://www.cotonti.com/datas/users/sql_update_45.rar (one, for sed121 or sed125).
All plugins will be deinstalled, all config values will be reset to default. Will set sed-light as default skin for admin.
3.1.4 UPD install autoupdater from the previous step and execute "Postinstall correction".

4. Enter in admin area in your site and reinstall plugin Markitup.

5. Change config of site and install all necessary plugins.

6. Add in your skin new tags if necessary (see sed-light skin for details), Copy to your skin new tpl-files from sed-light skin.

7. Move Cotonti from testing folder to basic place instead Seditio.

Migration complete.]]>
вс, 01 фев 2009 17:07:19 -0000