kieranbarnes Independent PHP, WordPress & CubeCart Programmer

SpamAssassin site wide spam learning

Posted on August 13, 2007

Posted by Kieran

SpamAssassin is great. I wouldn't run a mail server without it. Obviously it isn't 100% from day one, thats where Bayes learning comes in. Yes, it auto-learns, but some times we want to convince it a little more.

Anonymous apache & PHP

Posted on August 9, 2007

Posted by Kieran

Like to be conspicuous? Like me.

Then use the  ServerTokens and expose_php options. On a production web server I generally set these two options, pretty much stops and zero day hack attempts and other such nonsense

bash – Argument List Too Long

Posted on July 29, 2007

Posted by Kieran

I've got several scripts that have been failing recently due to the high number of files in a directory.

Say for example, my site wide spamassassin Bayes learning script that runs nightly, it has started failing sometimes when a lot of spam has been caught by users.

I'd see

bash: /bin/rm: Argument list too long

A fix would look like this

for i in /your/directory
do
rm -rvf $i
done

find would probably also do the same job.

Filed under: Geeky, Linux No Comments

Reset MySQL password on Ubuntu in about 1 second*

Posted on July 17, 2007

Posted by Kieran

* It may take a little longer depending on your server and finger speeds!

dpkg-reconfigure mysql-server-5.0

System Monitoring on Ubuntu in 30 seconds

Posted on July 17, 2007

Posted by Kieran

Installing munin has to be the fastest and simplest way of installing a visual system monitor on Linux.

Website Blurb:
Munin the monitoring tool surveys all your computers and remembers what it saw. It presents all the information in graphs through a web interface. Its emphasis is on plug and play capabilities. After completing a installation a high number of monitoring plugins will be playing with no more effort.

MySQL Tuning Server Parameters

Posted on July 13, 2007

Posted by Kieran

These are some of the handy MySQL 5.0 tweaks I do to get the most out a MySQL database;
I adjust the following to suit my server, I try to give MySQL as much resource as possible.

Ubuntu sources.list Generatror

Posted on July 13, 2007

Posted by Kieran

I had a problem with some slow Ubuntu sources today, instead of changing the whole sources.list manually, I stumbled over Ubuntu Nederland's Source-O-Matic.

Slam in the country you want and it generates you a nice new file. Saves at least 30 seconds!

Filed under: Geeky, Linux No Comments

Converting XLS to CSV. Simple, eh? Well, sorta.

Posted on July 3, 2007

Posted by Kieran

I hate problems that can be solved really easily. (With a totally different set of tools). I needed to open Excel (XLS) files in PHP. Simple enough you think, IF you are using Windows.

IF I was using Windows, I would have a bunch of options open to me, I could use PHP's COM & .NET functions. Or PHP's ODBC functions. Or a selection of classess from PHP Classes.

NTLM Authentication (Active Directory) on Apache (Linux)

Posted on July 3, 2007

Posted by Kieran

Here is a quick guide to enabling NTLM authentication for Apache 2.
I generally use Ubuntu, so I am a heavy apt-get'er, but I prefer to build my apache from source.

Apache2 mod_deflate

Posted on July 3, 2007

Posted by Kieran

The mod_deflate module provides the DEFLATE output filter that allows output from your server to be compressed before being sent to the client over the network.

Lazy man's description, your pages load quicker.

Page 8 of 9« First...56789