If you add error_reporting to the end of the list of the disable_functions setting in your php.ini then Wordpress can no longer change error_reporting settings and, thus, the setting provided in your php.ini will be honoured.
Continue readingTag: php
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 readingRaspberry 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 readingPHP: 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 readingPHP: 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 readingPHP: 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 readingPHP – 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 readingPHP – 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 readingHorribly 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 readingPHP – 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