Archive for March, 2009

31 Mar

Meta Tag Manager

This plugin will allow you to easily add and manage special meta tags to your whole site, such as Yahoo and Google verification tags.

Download

Requires At Least : 2.5
Test Up To : 2.8.5
Current Version : 1.0
Download latest version

(more…)

31 Mar

PHP __autoload() “not found” thowing exceptions

There is much debate about the __autoload function introduced in PHP5. I personally love it as all those requires, includes etc. made programs quite messy, and frankly annoy me if you create loads of pages that keep on requiring the same classes.

The one fault __autoload has though is that Exceptions cannot be thrown, and that to me would give potential for some great degradeablity.

Thankfully, there are a few ways of hacking the autoload function so that it does throw an Exception. The most common way is to create a class with the class name the autoload function is looking for using the eval() function, and then throw an exception once autoload is happy. (more…)

26 Mar

Linux Commands : Argument list too long

There may come a time where you try to run a command on many files in a folder and you’ll get this annoying message similar to this:

-bash: //bin/chown: Argument list too long

The reason for this annoyance is that Linux kernel has a limitation of bytes it can process through as arguments in exec() commands. Try:

[root@x folder]# egrep ARG_MAX /usr/include/linux/limits.h
#define ARG_MAX 131072 /* # bytes of args + environ for exec() */

And you’ll see what I mean. (more…)

20 Mar

Installing memcache for PHP 5 on Linux CentOS

This has been tested on CentOS but should work on most distros:

Memcache is a caching mechanism for PHP which speeds up access to data by storing it in the RAM. Memcache runs as a server in a similar fashion to a database, except that data is not persistent in the long term. The great thing about Memcache is you don’t need to recompile php. Here’s some instructions on how to install and set it up. (more…)