Smokes your problems, coughs fresh air.

Tag: MediaWiki (Page 2 of 2)

Lost my Sysop rights in the 15Monkeys wikis

I am constantly bugged by spammers in my 15 Monkeys wiki farm[1, 2], but I wasn’t allowed to protect the victim pages anymore. So, I wondered where my Sysop rights had gone.

Turned out they weren’t gone:

SELECT user_id, user_name, CONCAT( '"', ug_group, '"' ) AS ug_group_quoted
FROM mw_nl_user_groups
INNER JOIN mw_nl_user ON ( ug_user = user_id )
user_iduser_nameug_group_quoted
1BigSmoke"bureaucrat "
1BigSmoke"sysop "

They were just padded a bit. I have had a similar problem with MediaWiki before, so I remembered where to look within the hour this time. 😉 I tried a quick fix:

UPDATE mw_nl_user_groups SET ug_group = rtrim(ug_group);

I was surprised to see in phpMyAdmin that the values where now no longer padded with spaces, but with null-bytes (“\0“) instead. I tried to fix this untill I found out that this is the normal behaviour in MySQL 5.0.15. The MySQL documentation also mentions that, before 5.0.15, VARBINARY values were padded with spaces instead. Apparently, my mystery problems with padding were never caused by MediaWiki but by MySQL itself… PostgreSQL, where are you when I need you?

My advice: don’t run your own database-backed CMS if you don’t have at least rudimentary DBA skills.

The suckiness is: this time, the problem isn’t solved by just converting the padding. 🙁 I’ll have to look into it some further.

Images not showing after upgrade to MediaWiki 1.13

When I upgraded two of my MediaWiki installations[1, 2] a while ago, images were no longer being displayed. I found out that this was due to some problem with a change to the image.image_name column.

Gladly, the fix was easy (adopted from the message in the mailing list):

ALTER TABLE image ADD COLUMN img_name2 varchar(255); 
UPDATE image SET img_name2=img_name;
UPDATE image SET img_name=img_name2;
ALTER TABLE image DROP COLUMN img_name2;
Newer posts »

© 2024 BigSmoke

Theme by Anders NorenUp ↑