So I’m pleased to announce that, on Wednesday 13th August there will be the first Leeds Girl Geek Dinner!! Tickets are £10 and if you needed any further encouragement, I’m one of the speakers for the evening. If you’re going, or have any questions, leave a comment below – and I’ll see you there!
Tag Archives: tech
LugRadio Live UK
Mysql Error
ERROR 1005 (HY000) at line 123: Cant create table(errno: 150)
This is caused by a mysqldump or export process exporting tables in alphabetical order and not in the order in which they rely on one another. My tables had foreign keys which fail on import if the other table doesn’t exist when you create the table with the key. In this case I was only importing six or eight tables so I simply opened the script in a text editor and re-ordered the import blocks. On a bigger scale a more technical solution might be required!
Vim Macro: cleaning up line endings
:% s/^M$//
To type the correct ^M character, you’ll need to press Ctrl + V followed by Ctrl + M (the first combination means “take the next combination literally).
To turn this into a macro you should do the following. In command mode, pressq, followed by any letter. This will be the shortcut to access the macro. Then type the command as above. Finally, press q again to stop recording and its done. You can use your macro by pressing @ and then the letter you chose.
Serendipity and Feed Problems
I edited an old post, because the image links were broken (I did have a nightmare migrating because I was so inconsistent about the format of the image tags in textpattern, completely my own fault). I was very careful not to update the published date of the article, however the edited article appeared in the feed, which wasn’t what I had in mind! It turned out that this is by design. On line 262 of includes/functions_entries.inc.php (I have serendipity 1.1.3), I found this:
$cond['orderby'] = 'last_modified DESC';
I’ve commented out this line, which was in an if($modified_since) clause. Hopefully this will stop updated entries from appearing in the feed – I have a few other old ones to fix images in so we’ll soon see.
At around the same time, Ivo mentioned that he was seeing the order of posts change in his reader (google reader) when people commented on my posts. I suspect that this is part of the same issue and I’m optimistic of it also being fixed by this change. However when I was looking into the problem I noticed that the URL he was using to access my feed, http://lornajane.net/index.rss2, actually returned RSS 0.91. Not ideal! The problem is the rewrite rule in serendipity’s .htaccess file, which looks like this:
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss|rdf|rss2|xml) rss.php?file=$1&ext=$2
When you request index.rss2 it should rewrite to rss.php?file=$1&ext=$2 but the “rss” matches first so the user gets redirected to index.rss instead. As a nasty hack to get around this I removed the rss from the above example and gave it a line of its own:
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rdf|rss2|xml) rss.php?file=$1&ext=$2
RewriteRule ^(index|atom[0-9]*|rss|b2rss|b2rdf).(rss) rss.php?file=$1&ext=rss
Requests to index.rss2 are now correctly rewritten as rss.php?file=index&ext=rss2 and will get RSS 2.0 format in the response. I have just noticed however that this is the most requested page on the site so I really hope I didn’t break anything!
Zend Core Mysql Error
debian:/usr/local/Zend/mysql/bin# ./mysqld
080627 12:31:16 [ERROR] Can't find messagefile '/usr/local/mysql/share/mysql/english/errmsg.sys'
080627 12:31:16 [ERROR] Aborting
This is for two reasons. First: you need to be up one level of directory to be able to run these commands. Some errors will tell you that but this one doesn’t. Secondly, you need to use the mysqld_safe command.
debian:/usr/local/Zend/mysql# bin/mysqld_safe
Starting mysqld daemon with databases from /usr/local/Zend/mysql/data
This works for me – I have no idea if it is the prescribed method but background the process above and you’re good to go.
DPC Interview
DPC Day 1
I’ve been able to catch up with a lot of people since arriving late last night and making the mistake of not going to bed until late because I wasn’t tired (still on UK time) and then having to get up early today! Tonight we have an Ibuildings employees event which will be great, I’m excited to put faces to names for all my colleagues – the downside of the telecommute is that I mostly know people on Skype or IRC and not in real life. Later on there is a pre-conference social as well (from 8pm) – which is why my day is only half done :)
Looking forward to tomorrow, when there will be a phpwomen stand upstairs outside the main hall, we’ll be giving out shirts (they’re white this year) so if you want one then come and get it! Tomorrow at 2pm I’m giving my talk “PHP Deployment with Subversion” which looks like it will be well attended. Oh and its Worldwide Knit In Public Day as well so I’ll be attempting to fit that in as well!
Dutch Conference
When I was invited (or perhaps that should be “volunteered”) to speak at this event, I realised that I would need a lot of preparation in order to be able to deliver something like this. I arranged to give short technical presentations at local GeekUp events and went to both Leeds and Sheffield and spoke there. When I had assembled the content of the talk for Amsterdam, I circulated the slides around a few technical colleagues and friends, to make sure that it was accurate and covering sensible material. I was also charmed and excited to have the chance to attend the PHP London User Group meet last week and to give the actual talk there. So, at this point, there is little more I can do to prepare other than attempt not to get too drunk at the pre-conference social on Friday night!
The social side of things is something I’m really looking forward – this conference is organised by my employers, so I’ll have the opportunity to meet the developers I work with every day but haven’t met yet or don’t see often. This in itself I know will be fabulous, although I will certainly forget everyone’s names! In addition there will be people I know online from #phpc and of course some members of phpwomen.org as well – we are running a PHP Women stand at the conference and giving out shirts – so if you want one you had better come along and ask nicely :) I am also looking forward to meeting new people that I don’t yet know I’m going to meet – so here’s hoping for a wonderful time and not too many talk nerves!! To recover I’m staying on in Amsterdam for a few days since I haven’t visited the city before, seems like a good opportunity.
Baby Courgette Plants
I did get the plants home intact and planted them out. I was going to post a whole garden post as I have a few other things also to plant, but I’ve been elsewhere all week and now its raining rather a lot, so I’m blogging instead. Here’s the courgette plants in their new home:
Waiting for my attention are some sweet peas given to me by Great Uncle Sid and some training lobelia I bought yesterday to try to improve the view from my new kitchen window … more about those another day.