2009-01-31 19:51A New Year, A New HostSadly all good things must come to an end, and if you tried accessing this blog at its old address this year, you would see that “The Esuna Networks project finished on the 31st December, 2008.” It was that project that provided me with my first hosting, and I am greatly indebted to it for granting me a home on the web for so long. With its demise, I have had to migrate to pastures new, and have found myself here at MTV Europe (no, not that MTV Europe) where my blog is free to continue, at least for now. I feel I do have to say, though, how much I will miss the excellent friendly service of Esuna, for which I never had to pay a cent, and that I hope the admin goes on to even greater projects and is duly rewarded. We were given plenty of warning about the closing of the service, and so for a while I had been researching alternatives before selecting this one, and I have been very happy with it for the few months I’ve been using it. That brings me to my next point, which is why I didn’t have this blog up and running long before the shut-off date for Esuna. It turns out that this new hosting offers several different levels of service, where the most basic level (that you could pay for) did not come with database support, so I thought I would buy the basic level to start with, and test it out for a few months, before deciding if I wanted to commit to spending the extra money to get a database (and thus a blog). That made sense last year, but this year things are slightly different, in that even the basic (non gratis) level is given access to a database, so I have not had to spend any more. Having procrastination (or rather, cautiousness) pay off like this makes a welcome change, but there was a brief period where my blog was not up online. The irony is, seeing how generous my new host is makes me wish I had spent the money for the database, to reward them, but I can just look forward to upgrading later, when I want some of the extra features that are still exclusive to the other service levels. MigrationMy positive opinion of my hosting providers aside, though, I did encounter some technical problems with the migration of my blog, despite the generally excellent level of programming in Serendipity. I can’t really fault Serendipity for missing the few features peculiar to the way I like to blog, such as my ISO date format and custom CSS style sheet for source code, and the problems were not with the install procedure itself, which was as smooth as I had come to expect. Just as an example of how well the install went, I should mention that it told me it had found that the database was full of data (as I had already imported it from a backup) and thus it was going to leave the data in there and not write over it. The technical problems I had, then, were with a couple of the configuration options and features which didn’t work as intended or expected, so I should explain them here as a warning. Starting with the most dramatic problem, I am sad to say that the first time I went to visit my blog after installing it, I clicked on one of the “Continue reading” links and got the dreaded “No entries to print” message. My instinctive reaction was to look up the solution in my blog, but of course that was difficult given the nature of the problem. Fortunately, Google still had a cache of my old post, to save me from having to derive the solution from scratch again, but it was essentially a matter of “No, Serendipity doesn’t like your permalink style, just use the one you had before.” The particular style was to have my posts appear as pages with the name “post-N.html” (where N is a positive whole number) since having the page name start with a number seems to confuse it. Once I had changed this, I could at least read my posts again, as long as I didn’t mind the ugly formatting. PluginsThe next task was to reinstall all the plugins that make the text I enter in this text box come out as the beautiful HTML that you are seeing rendered by your browser. Specifically this meant installing the GeSHI syntax highlighting plugin, Typographic Smart Quotes plugin, and Markdown plugin. Things were a little worrying in the admin interface where it had errors next to the names of those plugins, but that was because my fresh install didn’t include them, while my database still had references to them. I thought the safest thing to do would be to “remove” them (even though they weren’t really there) and reinstall them. Again, to the credit of s9y, this was intuitive and the software coped with the fact it was deleting something it couldn’t find. Surprisingly, the problem I encountered was not with the removal of a plugin, but with the installation of one, and not because of undeleted cruft, or even really with the plugin itself, but with the site hosting it. With other, less convenient software, this problem wouldn’t even exist, but s9y has the rare (as far as I know) feature of being able to download extensions over the Web and install them itself, and it was this feature which failed. It appears that if one of the files it requires is inaccessible, for instance because of a 403 error, then it just creates an empty file and spits out a load of warning messages on a blank page, before quickly refreshing that page and claiming that everything is fine. This is what was happening to me when I tried installing the GeSHI plugin, and it was only after a couple of attempts that I managed to grab a copy of this intermediate page and view the error messages. I even managed to find a page on the s9y forum reporting the problem, but one month on, a necessary file is still inaccessible because of a permissions problem on the server. If you think your blog might be affected by this, it should be easy to tell, because the main symptom is seeing this sort of thing on every frontend page:
The solution is much simpler than the debugging process, though, as all you have to do is go to the plugin site for s9y and download the GeSHI plugin manually. Then you can follow the standard install instructions, which effectively means uncompressing the files and putting them in the right directory on your hosting. I thought that with all the plugins installed, my blog would be back to normal, but I noticed that in some parts of my posts there was double-escaped XML and superfluous whitespace was being added to the text. Actually there was a one in six chance that the “bug” causing these problems would not have occured, but unfortunately this particular roll of the die didn’t come out in my favour. On the other hand, by encountering this problem and being able to fix it and learn from it, perhaps the outcome was in my favour after all. Of course, there wasn’t a real die involved, just a seemingly random decision I made about which order to install the plugins in, which, with 3 plugins, meant 6 possible orderings (3 choices for the first plugin, 2 for the second, 1 for the third: 3 × 2 × 1). It was this ordering which turned out to be significant, because the changes to your blog post which the plugins perform occur in the order they are listed on the Configure Plugins page, which by default is the order they were installed, although you can reorder them. Perhaps I would have been more aware of this feature if the interface had made it clearer that you could drag and drop the entries in the list of installed plugins to create the order you want, but I did eventually manage to find that this was possible. As a usability bonus, the interface does have special regions on each of the list entries which turn your mouse pointer into a set of Up Down Left Right arrows when you hover over them, but this isn’t particularly discoverable, especially for people using a device without a pointer, like a touchscreen. For future reference, then, the correct order is the one given above: GeSHi, Typographic Smart Quotes, Markdown. URLs and conclusionsI could have just left it at that, now that my posts themselves looked right (apart from a few stylesheet and PHP changes I need to make), but I noticed one small issue that needed fixing and it got me thinking. The URL I had used for my blog this time included a subdirectory “/serendipity/” in the path, whereas on my previous hosting the equivalent subdirectory was called “/blog/”, which I had chosen when I installed WordPress. This more generic term had been a good choice, as opposed to something like “/wordpress/”, as it meant that I didn’t need to change all my URLs when I first switched to Serendipity. Hardcoding your choice of software into your URLs is a bad idea (I even manage to not include the string “php” in them, in case I start using blog software written in Groovy or something) so I wanted to rename the directory to “/blog/” for consistency. This is part of the general principle that cool URIs don’t change, which is a little hard when you switch hosting provider and don’t own your own domain name, but at least if I were consistent about the subdirectory name, it would be simpler for my old host to provide a 301 redirect that changed only the domain (after matching “~hagfish” in the request). Changing the name of a directory, even on a remote host, is not particularly challenging, but an interesting situation can emerge when you are changing the directory that contains your blog. Serendipity is very good at letting you configure things through the web interface, but it doesn’t have a “rename directory” feature, while it does require that you tell it the directory where your blog is installed. This means that if you use a file browser or SSH to change the name of the directory where your blog is stored, you then cannot browse to the admin page of your blog to tell it that you’ve made this change, but on the other hand, if you tell the blog on the admin page that it is actually installed in a different directory to the one that it currently is, the blog will be confused and may not be able to complete the process. The clever solution I came up with, then, rather than grepping through config files for values to manually edit, was to create a symbolic link from the new directory name to the old one, so that both names pointed to the same data. I’m not sure if this was the optimal solution, but it’s what I would do if faced with the same problem again. So, I wish Serendipity would allow more flexible permalink schemes, but other than that I’m happy with my URLs, or at least happy enough to tell Technorati I have moved my blog here, which should start my blog crawling up the Google rankings again. To improve that, I really need more people to link to me, which means getting all my online friends to point their links to this new address. I suppose, then, I should really already be thinking about what happens when I have to move again. How long do you think “volunteer” hosting like this usually lasts (where “volunteer” means “run by someone who has fixed monthly costs and no recurring revenue”)? Is there standard software for running a blog hosted at two places at once, or do you have to run nightly cronjob backups and data imports to keep the posts in synch? |
QuicksearchCategoriesSyndicate This BlogBlog Administration |
Quelltexte und Codeschnipsel werden durch farbige Hervorhebung der entsprechenden Codebestandteile deutlich lesbarer und damit leichter verständlich. Da auch in diesem Blog immer wieder Code-Beispiele zu sehen sein werden, war es mir ein Anliegen, ein ver
Tracked: Jan 31, 19:53