Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-03-27 08:07:02

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MySQL importing error

Hi,

I simply copied all the files over, including config.php, then edited config.php via Transmit.

Here is the diagnostics, note there are a few path errors and permissions that I have not yet set, since the text looked so weird I thought I would probably have to re-import the text, so I left that.

Note that its not just the TXP import that looks funny, its also data from the Album (PhotoPost) and PunBB databases. That’s why I think it was the way phpMyAdmin exported the data.

Textpattern version: 4.0.3 (r1188)
last_update: 2005-12-29 20:32:41/2006-03-26 16:41:42
Document root: /users/home/solborg/web/public
$path_to_site: /users/home/solborg/web/public
Textpattern path: /users/home/solborg/web/public/textpattern
Permanent link mode: section_title
upload_tmp_dir: /usr/local/www/php/tmp
Temp folder: /big/dom/xsolborg/www/textpattern/tmp
Site URL: www.mysite.com
PHP version: 5.1.2
server_time: 2006-03-27 08:02:25
MySQL: 4.1.18-log
Locale: en_GB
Server: Apache
php_sapi_mode: cgi-fcgi
os_version: FreeBSD 6.1-PRERELEASE

Pre-flight check:
————————————
File Upload Path is not writable: /big/dom/xsolborg/www/files
Temp folder is not writable: /big/dom/xsolborg/www/textpattern/tmp
————————————

.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/

<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]

RewriteRule ^(.*) index.php </IfModule>

php_value register_globals 0

————————————

Charset (default/config): latin1/latin1
character_set_client: latin1
character_set_connection: latin1
character_set_database: latin1
character_set_results: latin1
character_set_server: latin1
character_set_system: utf8
character_sets_dir: /usr/local/share/mysql/charsets/
18 Tables: OK

PHP extensions: standard/5.1.2, SPL, Reflection, date/5.1.2, libxml, bcmath, bz2, calendar, ctype, curl, dom/20031129, exif/1.4 $Id: exif.c,v 1.173.2.4 2006/01/01 12:50:06 sniper Exp $, gd, gettext, gmp, iconv, imap, mbstring, mcrypt, mhash, mysql/1.0, mysqli/0.1, ncurses, openssl, pcntl, pcre, pdf/2.0.3, pgsql, posix, pspell, readline, session, shmop, SimpleXML, soap, sockets, SQLite, sybase_ct, sysvmsg, sysvsem, sysvshm, tidy/2.0, tokenizer/0.1, xml, xmlreader/0.1, xmlwriter/0.1, xsl/0.1, yaz/1.0.2, zlib/1.1, ssh2/0.1, PDO, pdo_mysql/1.0.1
/include/txp_category.php: r1154 (dffd7979531373149c74e3eedfbb50e2)
/include/txp_plugin.php: r1167 (c2c7d7fc1e4918c79cd3658c62e4fbda)
/include/txp_auth.php: r1166 (3e2eaca7b151e14561125ab68e722203)
/include/txp_form.php: r947 (c0e4393328985742bd81cda61d10d5ed)
/include/txp_section.php: r1154 (d85c1ce405fccd9dac364c8ef4eb72eb)
/include/txp_tag.php: r1134 (3e2dfbd6fdccf0693c147ba22a9705e7)
/include/txp_list.php: r1042 (e85d2de1c63b41f0e5bdcf268e3c487b)
/include/txp_page.php: r876 (e22dc37b465b87757722732a225b25f3)
/include/txp_discuss.php: r1170 (1e56e08cc95c255783410076db12529f)
/include/txp_prefs.php: r1170 (c806be1b1f238e75a5ff6b7cf8432d17)
/include/txp_log.php: r906 (68c4f32b70ce41a349f197b6bba6c200)
/include/txp_preview.php: r628 (a16f84b6610fc66db0bce51e25b7af34)
/include/txp_image.php: r1168 (e8ec79ff9b3a21c356ee23da7973b1f0)
/include/txp_article.php: r1170 (88689d7469d16c13d51bd4adff03ebd7)
/include/txp_css.php: r922 (0c596d9968052b89581d1ca65a77c5de)
/include/txp_admin.php: r1074 (7e87ff0e29101593fb170b1a2de9fd59)
/include/txp_link.php: r1154 (7c0c55ff6580793dff0626f169e64ad6)
/include/txp_diag.php: r1154 (5d66b90f7e7720dd0e3526ca1b24cf89)
/lib/admin_config.php: r877 (9aea12193cc76eea1964eb0383ec6513)
/lib/txplib_misc.php: r1170 (7000a1b27aa40c90978211e6cff358ec)
/lib/taglib.php: r628 (493878f922262157601c26a999a1c478)
/lib/txplib_head.php: r1183 (fb85b66b4e379476935233f844844bef)
/lib/classTextile.php: r1141 (b066c2bfa94a26ae3d70b245dcf81369)
/lib/txplib_html.php: r1166 (bd11de6e6daa3391eab75a46db55ae36)
/lib/txplib_db.php: r1170 (5a2c3a1e328cd343a067cbb8fd25cd79)
/lib/IXRClass.php: r765 (2efb0fb05b55c634072b0bae9af38bdd)
/lib/txplib_forms.php: r950 (74da2c67abe4786c353ea416c13656eb)
/publish/taghandlers.php: r1188 (4e8eaeb0543d8fde09d6e423af4253b9)
/publish/atom.php: r1117 (14c1aa23c708898d7723b3d6b9c89050)
/publish/log.php: r864 (c3d16d3dfe375819a19fcd62398e4b86)
/publish/comment.php: r1187 (d55dde574418d2eaf6a394d703056d9a)
/publish/search.php: r884 (80f942f1dc301857c2fa9dcb16aa1246)
/publish/rss.php: r1099 (ce0d82b9435d8f1de01c8e2b6c585f93)
/publish.php: r1186 (d5c20bf2298e87969575f9e622bf2797)
/index.php: r1172 (52f753ebb51c1f7d5312485d9dbad7e4)
/css.php: r944 (df1c754417bdfb4e97a2c83ae5b454ee)

Offline

#14 2006-03-27 09:05:43

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: MySQL importing error

Yes, the installation is ok. It must be something that phpmyadmin does during expot or import.

Can you ot use mysqldump and mysql command utilities to export/import? You shouldn’t have a problem with that.

Other than that, in phpmyadmin you can choose a character-set for how things are displayed – but I am not sure if that effects the export in any way. (Try setting it to latin1/iso-8859-1). Make sure you are not opening/editing the file with anything after the export, because resaving it may “break” characters as well, if they are saved wrong.

Offline

#15 2006-03-27 10:24:53

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MySQL importing error

I guess I could do it through the command line, if I could figure out how to connect to TXD server via the command line ;-)

I use the script on the TXD knowledge base for saving a backup (http://help.textdrive.com/index.php?pg=kb.page&id=113) of the database.

There is an article on how to connect to TXD through the command line, guess I will have to look at that. In case anyone knows how to do it, that would be helpful!!

Offline

#16 2006-03-27 10:30:21

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: MySQL importing error

And you can keep using that script. Then you will simply have to edit the script and add the option -Q after mysqldump.

Offline

#17 2006-03-27 10:34:58

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MySQL importing error

I think I figured it out. Thanks to what you said about Latin1 Senser.

When importing into phpMyAdmin there is an option to select the character set. By default it is UTF. I changed it to Latin1 and hey presto the characters display properly!

Thanks a lot Senser, hope this helps someone else too.

Offline

#18 2006-03-27 11:27:27

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MySQL importing error

Maybe I spoke too soon – the TXP import is now fine as I mentioned above, now I have issues with a punBB and PhotoPost import. Those show up with messed up characters.

I imported them both in UTF and Latin1, both appear incorrect. Any idea how these should be imported? Character set?

Offline

#19 2006-03-29 08:39:21

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MySQL importing error

Still having problems with this. PunBB and PhotoPost imports don’t work. I have tried from the command line too. Looks like Norwegian characters are displayed properly in the punBB database, but not properly in the browser.

TXP database is the reverse – some strange characters in the database, displays properly in the browser.

How to export/import this thing?!!

BTW, -Q command made no difference.

Offline

#20 2006-03-29 11:48:39

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: MySQL importing error

-Q is for quoting special chracters. It was to solve your problem in the first post with the privs table. It has nothing t do with charsets.

You might try to import export the tables for textpattern seperately (and differently) from punbb and photopost. Try asking on their support forums which charset problems can appear and how to solve them.

Offline

#21 2006-03-29 11:53:02

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MySQL importing error

Thanks Senser. I have in fact exported the databases separately. There aren’t many options that I know of for exporting.

Have posted now on PhotoPost and PunBB forums. Hopefully someone will know. I can’t be the first person to have this problem! Appreciate your reply.

Offline

#22 2006-03-29 16:23:40

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MySQL importing error

Senser, you may be interested to know that it does not appear to be an import error. Rather, it seems to be a text encoding error.

In the current site, Textpattern is set to UTF in the meta tag, while PunBB and PhotoPost are by default iso-8859-1 or Latin1.

In the new site, all the files were copied and sent over, no editing at all. They are the same.

On the new site, when viewing through Firefox and Safari (both by default are iso-8859-1), Textpattern is ok but not PunBB and PhotoPost. If I manually change the text encoding to iso-8859-1 (Latin1), then the characters suddenly display properly.

I find this strange, since by default FF and Safari use iso-8859-1. Seems in this case, I have to do it manually.

The only difference between the sites now is the DNS name servers. I only see the new site by editing the /etc/hosts file on my OSX machine.

Weird, could this be because the DNS changes have not been made. Shot in the dark perhaps.

Offline

#23 2006-04-16 05:00:15

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: MySQL importing error

OK, looks like the error is caused by TextDrive, which uses UTF-8 as the default everywhere

That’s why Textpattern works fine with Norwegian characters (as it is in UTF), while punBB and PhotoPost, both iso-8859-1, don’t work properly unless one changes the default encoding in the browser.

Is there a way around this?

Offline

#24 2006-04-16 07:55:49

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: MySQL importing error

It’s not textdrive’s fault, it was a poor choice of defaults on the part of the developers of the mysql-client libraries. I believe they have changed that since for more recent versions. See:
http://bugs.mysql.com/bug.php?id=9948

The fix is for PHP-Applications to specify the charset of the db-connection. Usually the easiest way to do that is with mysql_query("SET NAMES utf8") or something similar. You can find out more about this in the mysql-manual.

Offline

Board footer

Powered by FluxBB