2010
02.06

“Fix”ing WordPress database tables

After restoring tables from a WP mu backup (an incomplete one as it turned out) various issues presented themselves, not least an inability to submit posts (HTTP 500 not informative).
A little searching revealed a likely cause (http://discuss.joyent.com/viewtopic.php?id=19116): missing auto_increment on wp_{n}_posts; not only was auto_increment missing, indexes and keys were too. Later I found a hiccup in tagging, again wp_{n}_terms and related tables had missing metadata.

Fixes

Removing erroneous entries added by admin-ajax.php

delete from wp_{n}_posts where ID = 0 and post_modified = 'YYYY-MM-DD hh:mm:ss';

Add primary index before restoring auto_increment

alter table wp_{n}_posts add primary key (ID);
alter table wp_{n}_posts change ID `ID` bigint(20) unsigned NOT NULL auto_increment;

Add remaining keys

alter table wp_{n}_posts add key post_name (post_name);
alter table wp_{n}_posts add key type_status_date (post_type, post_status, post_date, ID);
alter table wp_{n}_posts add key post_parent (post_parent);

Future backups

mysqldump --opt wordpress > wordpress.sql

Just using –add-drop-table insufficent in some cases.

2010
02.02

Moo!

From sxc.hu - Marijnvb - Cow portrait

This blog and shopping.chrs.nl are now running as sub-blogs of a Wordpress MU install, if there’s anything wonky going on here, that’s why.

2010
01.30

Last Saturday, I woke up with a seemingly brilliant idea, a dot-st domain name for use by my online postage half-site Print My Postage, mypo.st was subsequently registered. However, this isn’t about that; I was on skype telling Brian (King) about this and mused that bri.ks would be a good vanity shortener for briks.si his mozilla software development collective. Unfortunately, Kosovo’s dot-ks doesn’t actually exist; fortunately Kazakhstan’s dot-kz does. I proposed that Brian and briks.si should have their own shortener under bri.kz, with briks.si/! as the install location; why use one of the virtual servers of the hosting account purely for bri.kz, when it’s all the same server.

Now on cdn: How not to register a dot-kz domain.

The fun really started after YOURLS was installed to handle the shortener system, first question: “where to register bri.kz?”, I went down the list of registrars at KazNIC (nic.kz) trying to find one with English as a language option (Cyrillic is bewildering), I settled on http://www.regtime.net/ (.kz 550 rubels per year roughly $20 in Jan 2010), although their https certificate turned out to be webnames.ru (Firefox mismatch warning good for your sanity).

Find your own dot-kz domain(s):

www.

It turned out, that to pay the registration fee to webnames.ru I needed to use a web currency; I chose WebMoney’s WMZ [USD equivalent], signed up for an account (wmtransfer.com) only to find that I needed another account elsewhere to fund the WMZ purse at WebMoney from my credit card.

Note: this is past midnight, so now early Sunday morning.

Off to savechange.ru, signup, login, fill in WMZ purse number.

Liqpay using Ukrainian bank with MasterCard SecureCode whatsit for verification still wanted to verify me, pending micropayments to card no good since only tracked in GBP what with Liqpay wanting USD, so I talked to Liqpay who eventually talked to my card bank, Liqpay authorised payment, savechange converted it from USD to WMZ and I was able to pay the webnames invoice

Technical

root .htaccess sends bri.kz traffic to briks.si/! which sends it to YOURLS to handle

/.htaccess, mod_rewrite [P] no good all referrers briks.si itself; basic redirect, again no good, no referrers at all; solution [E ..] set environment variable between redirects.

RewriteCond %{HTTP_HOST} ^bri\.kz$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) http://briks.si/!/$1 [E=HTTP_REFERER:%{HTTP_REFERER}]

2009
11.01

This [short] blog post should be coming to you from a Shared Accelerator at Joyent running Solaris; rather than the obsolescent FreeBSD server it used to be served from … there was no rush for a Golden Ticket – let everyone else find all the problems first :)

2009
10.18

Powered by Twitter Tools

2009
10.11

Powered by Twitter Tools

2009
09.27

Powered by Twitter Tools

2009
09.25

Seems changes like mine have ended up in la petite url, github didn’t have them last time I looked, it was still at 1.5…

2009
09.20
  • Carl David Anderson discovered the subatomic particle called the muon in 1936 but no one has yet discovered what its point is.{ @qikipedia } #
  • @onion2k manflu? in reply to onion2k #
  • @jonbentley90 what about forcing iLife on Tiger upgraders to 10.6? in reply to jonbentley90 #
  • @jonbentley90 since it's an eBay-bought Mac mini, it's getting eBay-bought Leopard whilst all the early-adopters wrangle with Snow #
  • @jonbentley90 Unfortunately said eBay-bought Leopard discs are for some 2007 Intel machines and a 2006 Core Duo Mac mini isn't amongst them #
  • @namecheap, did you know that Cameroon's area is 183,569 square miles? #.cmsale and that "your" isn't short for "you are" #
  • RT @Malarkey If you want my bookmarks and elsewhere links via Twitter, follow @cowshedstudio. (RT) (S) (W) (BW) (AD) #
  • @philnelson 52 + 2 jokers? Anything specific? in reply to philnelson #
  • @philnelson presumably la petite url isn't one of those in reply to philnelson #

Powered by Twitter Tools

2009
09.13

Powered by Twitter Tools