LinuxSoftware

Coding and tramping in Aotearoa / New Zealand


Oct 20

Fixed blog

, david, Monday, 5:08 pm

Sorted out the problem I had before after upgrading to WordPress 2.6.2.  It was to do with my unorthodox wp-config.php file.  When WordPress is installed all the files, code, content and templates, go into /usr/share/wordpress.  A while back I wanted to run multiple blogs on the one system, with different contents and templates, but I wanted them to share the same code.

The solution (which I can’t remember where I found) is all the code files and directories for the blog are symlinks back to /usr/share/wordpress, but the wp-content directory is local for each blog, then an Apache environment variable is set for each blog to point to its config file.   I won’t go into the details because it doesn’t work anymore.  The problem now is the ABSPATH constant is being set in a new file wp-load.php before wp-config.php is loaded where it used to be set. 

ABSPATH points to the base directory for the WordPress files.  I need it to point to the local (per-blog) location, but wp-load.php is forcing it to /usr/share/wordpress.  My new solution is to have the ABSPATH I want stored in a Apache environment file and hack wp-load.php to set ABSPATH to that.  It’s much more ugly because I am now hacking code files instead of just config files, but it works.

In my Apache conf file I have: SetEnv BLOG_ABSPATH "/home/david/www/blog"

My wp-load.php is hacked so that it has: define('ABSPATH', $_SERVER['BLOG_ABSPATH']);

Then the files in /home/david/www/blog are either symlinks to /usr/share/wordpress or real files depending on whether I want them shared for all blogs or just for this one.

Funny thing is I’m no longer running multiple blogs, but I still prefer to have it as an option. And this way means my local stuff lives under /home, while the code still stays in /usr/share/wordpress.


Oct 17

Broken blog

, david, Friday, 8:57 am

It’s Friday morning and before leaving for Te Aroha I decided to update WordPress to 2.6.2.  This has broken my theme :-( .  There is WiFi at the motel, maybe I’ll get it fixed down there.  Not going to do anything more on it right now, so you’re stuck with the default theme.


Dec 30

Yet Another Blog

, , , david, Sunday, 8:17 am

Yes, this is yet another boring blog with posts about my cat and what I had for dinner. There’s still a heap of improvements I want to make, but it looks like I’m finally ready to start putting some content up here.

This is the latest incarnation of a long line of homepages, going all the way back to one I had to learn Vi to create at Auckland University in 1997. (I’m writing the draft for this post in Vim).

For posterity my old HTML blog from 2003-2004 is still here. I moved my website to being 100% wiki after that, but now it’s back to a blog/gallery/wiki mix.

Time for some acknowledgments. The blog is powered by WordPress, the gallery is running Gallery2, and the wiki is running the MoinMoin wiki engine. This stylish theme is the Stardust WordPress theme by Tom Baldovino hacked mercilessly to make it work for the whole site. And I’m running inside a Xen virtual machine which is running Linux (Fedora) with Apache, MySQL, PHP, Python, with a touch of Javascript thrown in, all hosted by SliceHost.

So welcome to my blog.  It’ll be boring, but no one is forcing you to read it. ;)