Archive for the 'Education' Category

libpam-mount automounts SMB shares at login, just like Windows

Monday, October 8th, 2007

Now my Ubuntu workstation, part-way upgraded to the 7.10 “Gutsy Gibbon” release, works almost as elegantly as my Windows machines have worked forever. My network music store now auto-mounts into my home directory when I login. Finally. I’ve been beating away at this, on and off, for bloody years. I’m just not a great sysadmin, I guess!

Method follows.

(more…)

(My)SQL Infection

Friday, October 5th, 2007

What could I do with this?


CREATE TABLE child (
  id BIGINT NOT NULL AUTO_NUMBER PRIMARY KEY
, parent_table VARCHAR(64) NOT NULL
, parent_id BIGINT NOT NULL
, FOREIGN KEY parent_table REFERENCES INFORMATION_SCHEMA.tables(name)
, FOREIGN KEY parent_id DEREFERENCES parent_table(id)
) ENGINE=fantasy COMMENT=’Don’t run this at home, folks!’;

AND
(more…)

Mummy, does the IPCC make it snow?

Thursday, February 8th, 2007

“No love, they only blow hot air.”

Yay! Snow in Sheffield again. Piccies just as soon as my camera batteries charge. Oh dear, my camera has failed doesn’t seem to like the cold! Anyways, a couple of pics from out front and back.
(more…)

Christmas Bogus Bogus PHP PDO Bug

Wednesday, January 10th, 2007

The following code works on Linux (3 rows returned) but not on Windows, which returns a SQL syntax error citing LIMIT "0", "3". See PHP bug 35801 closed as “bogus” by an idiot on Christmas Day 2005 for the bogus reason:

Limit statements cannot be part of prepared statements.

Anyone care to confirm?

(more…)

Protected: Howto: Dynamic HTML Forms With PHP Arrays And “Loopy Magic” (in real time)

Monday, September 11th, 2006

This post is password protected. To view it please enter your password below:

Investigating WordPress 2.0.4 Performance

Sunday, August 6th, 2006

“Smiley” Peformance Monitor plugin for WordPress

As there have been reports of dramatic slow-downs after upgrading to WordPress 2.0.4, and my blog is still running 2.0.3, naturally I wish to investigate these reports prior to upgrading. I could wait for the WordPress developers to do this, but I’m impatient. WordPress 2.0.4 contains a critical security fix that I wish to apply, among others. I don’t want to sacrifice performance for a tiny amount of extra safety.

I previously investigated the memory use of WordPress 2.0.2. I shall build upon that work to introduce execution timestamps and database queries into the performance graph. I shall then directly compare the performance of 2.0.3 and 2.0.4 on the same dataset - my blog, of course!

(more…)

Security By Obscurity

Thursday, July 27th, 2006

Or, in this particular case, a futile attempt at outright deception.

Menu and plugin tweaks indeed! If I believed that, I might never have noticed the ever-so-vital change to line 364 of admin-functions.php.

Rewrite Rule Management, or “How To Blow Your Mind With PHP Arrays (or Objects, If You’re Wierd)”

Friday, July 7th, 2006

A thought inspired by this message on the wp-hackers mailing list by Mike Purvis, and The Cathedral and The Bazaar by Eric S. Raymond, a few chapters of which I read recently for the first time. Lesson 9 sprang to mind. Then this did. An old defeat.

(more…)

Is www. Obsolete? Correct Configuration Of The WordPress Address Options

Tuesday, June 6th, 2006

Which is better; http://www.libertini.net/libertus/ or http://libertini.net/libertus/ ?

Both are URLs that refer to precisely the same resource: this blog. Given that both are perfectly valid, which one should I use as the address of my WordPress blog? The WordPress documentation for the General Options is vague but on reading it I would conclude that I should enter http://libertini.net/libertus, my latter choice.

The WordPress documentation is out-of-date. The correct answer is: neither.

(more…)

Memory Usage in WordPress 2.0.2

Monday, May 29th, 2006

I’m a sensitive soul with computers. Whilst I appreciate the incredible power and capacity that modern computers provide, I cannot help but remember those hazy days during my youth when I learned how to program. My first computer was modest by today’s standards - a Sinclair ZX81 with 8Kb of ROM (including a built-in BASIC interpreter) and 1Kb of RAM. That was enough for some but I didn’t really get started until I had 16Kb of RAM. That was enough for me and my skills at the time. I proceeded to write computer games.

WordPress is a personal publishing system designed to work on modern servers. Servers are enormous. The server that hosts this blog has 125,000 times more RAM than my first computer. My blog may use only 8MB, a limit enforced by the programming language that the blog uses; PHP.

So how does WordPress fill this tiny pocket of the big machine? Today I’m looking at the memory footprint of WordPress 2.0.2. How efficiently does WordPress use its most precious resource?

(more…)