Marcus etc.

mainly just another WordPress site


Meta Tag Manager


Posted on Mar 31, 2009 in Plugins


[wp-readme-parser url=”http://svn.wp-plugins.org/meta-tag-manager/trunk/readme.txt” download=”http://downloads.wordpress.org/plugin/meta-tag-manager.zip”]

Read More

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.

Read More

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.

Read More

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.

Read More

This post is inspired by Russ Whittmann and Europheus’ solutions , with these goals/improvements in mind:

  • Move spam marked by spamassassin into a special Spam folder in each account (flabergasted this isn’t standard on something like PLESK!)
  • Allow for quota, which is available on some PLESK servers (I previously thought it was available on all servers until recently) .
  • Make a solution with as minimal manual labour as possible outside the PLESK control panel, which relates most specifically to having to edit and create .qmail and .procmailrc files each time you change or add an email account.
  • Avoid having to have a special .procmailrc file for every user, one recipe for all!
Read More

It’s possible to have a server act as a backup server, so in the unfortunate event that your main mail server goes down, mail gets queued up on the backup server until the main one is fixed.

Setting up PLESK to act as a backup MX server is fairly easy, here’s what to do.

Read More

Email archive, Google style!


Posted on Jan 23, 2009 in Mail, PLESK


I managed to get a little email archiving system working which I am finding to be potentially quite useful in the future. The beauty of it is that every email going in and out the system is saved onto a google gmail account, which harnesses their power of filtering, searching and labelling!

This setup was specifically aimed at a PLESK-run box but I’m sure it would work on any box with a qmail/qmail-scanner enabled mailserver, actually any MTA with a Maildir format.

Read More