Skip to content

Phil's Blog

The thoughts and ramblings of an Engineer

Tag: php

18 April, 2014 Blog

How to force TLS v1.0 in PHP

PHP 5.6+ Users This is a new feature as documented on the PHP 5.6 OpenSSL Changes page. At time of

Continue reading
15 November, 2013 Blog

Raspberry Pi Project – A 1960s wallbox interfaced with Sonos

The inspiration for this project came from @nivnov pointing me to http://wallbox.weebly.com/. I had somewhat of a different take on the

Continue reading
5 February, 2013 Blog

PHP: Interfacing with HeatMiser WiFi thermostats

I’m quite a big fan of writing code that interfaces with physical data. It somehow feels more fulfilling to see

Continue reading
PHP Logo
4 February, 2013 Blog

PHP: Find number of weeks in a given month

The following function finds the number of weeks in a given month, assuming Monday as the first day of the

Continue reading
PHP Logo
22 December, 2011 Blog

PHP: Find the last day of the month

In PHP you can pass the t format character to the date() function in order to get the number of days

Continue reading
PHP Logo
6 December, 2011 Blog

PHP – Accurately detecting the type of a file

When files are being uploaded, you cannot rely on the the sends. This data is entirely under the control of

Continue reading
PHP Logo
6 December, 2011 Blog

PHP – Why you should use the Factory Method Pattern and how you should do it

This article assumes you’re using PHP version 5.3 or above. If you are not, you should note that “the PHP

Continue reading
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

Posts navigation

1 2 Next Posts»

Recent Blog Posts

  • Yealink T58AA tale of VoIP, NAT and some confused Engineers
    28 August, 2020
  • AWS LogoThe trials and tribulations of running statically linked 32 bit binaries in AWS Lambda
    14 August, 2020
  • Juniper SRX 1500Juniper SRX: Clamp TCP MSS on a single interface
    18 April, 2020
  • Juniper MX204Juniper MX: Simple static VXLAN configuration
    18 April, 2020
  • HPE ProLiant Gen8 G1610TLinux: Kill stuck NFS process (kill -9 doesn’t work)
    3 April, 2020
WordPress Theme: Maxwell by ThemeZee.