Skip to content

Phil's Blog

The thoughts and ramblings of an Engineer

Month: November 2011

PHP Logo
24 November, 2011 Blog

Horribly amazing PHP – check if you’re on the last iteration of a foreach loop

The code is so horrible, it’s gone a full circle and become amazing once again. It’s a method of finding

Continue reading
PHP Logo
22 November, 2011 Blog

PHP – Converting bytes to a readable format

The following function takes in a number of bytes and the number of decimal places required in the output and

Continue reading
22 November, 2011 Blog

Solved! phpMyAdmin cannot start session without errors

This was a bit of a ridiculous error. It occurred after a PHP upgrade to 5.2.17 running under Apache with

Continue reading
PHP Logo
16 November, 2011 Blog

PHP – Obtain the maximum allowed file upload size

This was actually remarkably difficult to do, in terms of the volume of code required. It uses the fact that

Continue reading
15 November, 2011 Blog

Cabling your house with cat5e… Geeky or essential?

When I bought my house, I wired it with  cable for data networking. I ran 2 cables to each of

Continue reading
15 November, 2011 Blog

Solved! Debian Wheezy – SASL LOGIN authentication failed: no mechanism available

I’m not sure why I ever run an `apt-get upgrade` on Debian as I usually spend the next week fixing

Continue reading
15 November, 2011 Blog

Reading a signed 64 bit integer from a file with PHP

This may be a ridiculous way to do this but I couldn’t think of anything better at the time of

Continue reading
14 November, 2011 Blog

Parsing a darkstat database with PHP

This is something I wrote for the sake of interest more than necessity but I have found it quite useful

Continue reading
Wordpress Logo
13 November, 2011 Blog

Randomising the order of posts in WordPress

Just before ‘the loop‘ of a WordPress site, you would normally use query_posts(). Not only does this set a global

Continue reading
9 November, 2011 Blog

Simple fix for low pressure or no water in electric showers – change the solenoid coil

Firstly… don’t mistaken me for a shower expert, I’m really not – I just have a pretty crappy shower which

Continue reading

Posts pagination

1 2 Next Posts»
WordPress Theme: Maxwell by ThemeZee.