Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mediawiki
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
thechris
Veteran
Veteran


Joined: 12 Oct 2003
Posts: 1203

PostPosted: Tue Jun 13, 2006 5:57 am    Post subject: mediawiki Reply with quote

Code:

    * PHP 5.1.4-pl0-gentoo: ok
    * PHP server API is apache2handler; ok, using pretty URLs (index.php/Page_Title)
    * Have XML / Latin1-UTF-8 conversion support.
    * PHP is configured with no memory_limit.
    * Have zlib support; enabling output compression.
    * Turck MMCache not installed, can't use object caching functions
    * Found ImageMagick: /usr/bin/convert; image thumbnailing will be enabled if you enable uploads.
    * Found GD graphics library built-in.
    * Installation directory: /vault/www/localhost/htdocs/mediawiki
    * Script URI path: /mediawiki
    * Connected as root (automatic)
    * Connected to database... 4.1.20-log; enabling MySQL 4 enhancements
    * Created database wikidb
    * Creating tables...Query "CREATE TABLE categorylinks ( cl_from int(8) unsigned NOT NULL default '0', cl_to varchar(255) binary NOT NULL default '', cl_sortkey varchar(255) binary NOT NULL default '', cl_timestamp timestamp NOT NULL, UNIQUE KEY cl_from(cl_from,cl_to), KEY cl_sortkey(cl_to,cl_sortkey(128)), KEY cl_timestamp(cl_to,cl_timestamp) )" failed with error code "Specified key was too long; max key length is 1000 bytes".


ok, now what?
_________________
HW problems. It's a VIA thing.
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Tue Jun 13, 2006 6:21 am    Post subject: Reply with quote

That is usually an issue with Mysql not having the charset mediawiki expects. I *think* the fix is to unmask mediawiki 1.6.6 and install it rather than the older 1.4.15 Gentoo currently has a stable. 1.6.6 defaults to utf8 charset rather than latin1 in 1.4.x. Mysql is now defaulting to utf8 which is where the issues come in.

I'm in the middle of this sort of issue myself and didn't have a chance to test things out. You may want to investigate a bit before taking this as gospel.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Tue Jun 13, 2006 6:26 am    Post subject: Reply with quote

1.6 is far better anyway

many annoying issues fixed and useful functionality added
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
thechris
Veteran
Veteran


Joined: 12 Oct 2003
Posts: 1203

PostPosted: Tue Jun 13, 2006 10:28 pm    Post subject: Reply with quote

ok, i asked on IRC. it seems there is a file in maintainece/tables.sql with a line involving a varchar(86) or varchar(255) (ending index or something) that should be changed to varchar(78).
_________________
HW problems. It's a VIA thing.
Back to top
View user's profile Send private message
at240
l33t
l33t


Joined: 12 Aug 2005
Posts: 603
Location: UK

PostPosted: Thu Jun 15, 2006 11:18 am    Post subject: Reply with quote

thechris wrote:
ok, i asked on IRC. it seems there is a file in maintainece/tables.sql with a line involving a varchar(86) or varchar(255) (ending index or something) that should be changed to varchar(78).

Could you be more precise, please? I'm seeing the same error and am trying to locate what I should alter in that file.
Thanks.
Back to top
View user's profile Send private message
thechris
Veteran
Veteran


Joined: 12 Oct 2003
Posts: 1203

PostPosted: Fri Jun 16, 2006 6:17 am    Post subject: Reply with quote

[/code]CREATE TABLE /*$wgDBprefix*/categorylinks (
cl_from int(8) unsigned NOT NULL default '0',
cl_to varchar(255) binary NOT NULL default '',
cl_sortkey varchar(255) binary NOT NULL default '',
cl_timestamp timestamp NOT NULL,
UNIQUE KEY cl_from(cl_from,cl_to),
KEY cl_sortkey(cl_to,cl_sortkey(128)),
KEY cl_timestamp(cl_to,cl_timestamp)
);
[/code]

the sortkey varchar(255) line is what i changed. i think. sadly i did an emerge -e world and now my changes are undone! i did a mysqldump and found what i set:

Code:

CREATE TABLE `categorylinks` (
  `cl_from` int(8) unsigned NOT NULL default '0',
  `cl_to` varchar(255) character set utf8 collate utf8_bin NOT NULL default '',
  `cl_sortkey` varchar(75) character set utf8 collate utf8_bin NOT NULL default '',
  `cl_timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  UNIQUE KEY `cl_from` (`cl_from`,`cl_to`),
  KEY `cl_sortkey` (`cl_to`,`cl_sortkey`),
  KEY `cl_timestamp` (`cl_to`,`cl_timestamp`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

_________________
HW problems. It's a VIA thing.
Back to top
View user's profile Send private message
ova
Retired Dev
Retired Dev


Joined: 06 Nov 2003
Posts: 120
Location: Russia, Moscow

PostPosted: Thu Jul 06, 2006 6:39 pm    Post subject: Reply with quote

I found that cleanest solution is to use latin1 encoding for mysql. See this bug report:

http://bugzilla.wikimedia.org/show_bug.cgi?id=1322

There is still unanswered question: Does this mysql table changes are dangerous or not :?:

:idea: Thus I just changed mysqld default encoding to latin1 and then used "Backwards-compatible UTF-8" database.

HTH.
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Thu Jul 06, 2006 7:27 pm    Post subject: Reply with quote

I'd say the cleaner solution is to keyword mediawiki and install 1.6 or better and skip the whole utf8/latin1 issue from the start. Unless you really want to migrate your database to utf8 in the next two or three months. It's not terriably painful, but it's an hour or two of work I'd rather not have done.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
ova
Retired Dev
Retired Dev


Joined: 06 Nov 2003
Posts: 120
Location: Russia, Moscow

PostPosted: Thu Jul 06, 2006 9:10 pm    Post subject: Reply with quote

kashani wrote:
I'd say the cleaner solution is to keyword mediawiki and install 1.6 or better and skip the whole utf8/latin1 issue from the start.


Version 1.6 does not fix the problem. At least for me and for people in above mentioned bug.

Idea to have utf8 encoding in database is very good idea, but ... I did not manage to get mediawiki workable with mysql-4.1.20.
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Thu Jul 06, 2006 9:16 pm    Post subject: Reply with quote

Really? Were you starting from scratch with no database? IIRC I tested 1.6.7 which worked fine with a default build of Mysql 5.0.22 and then later replaced the db with the one from my 1.4.15 install after doing all the utf8 fixes.

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
at240
l33t
l33t


Joined: 12 Aug 2005
Posts: 603
Location: UK

PostPosted: Fri Jul 07, 2006 7:54 am    Post subject: Reply with quote

kashani wrote:
Really? Were you starting from scratch with no database?

I too ran into this problem with 1.6. I was starting from scratch, using mysql 4.1.20.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum