Why would MySQL crash when WordPress attacked?

WordPress brute force attacks are increasingly common at the time I write this – September 2014. Recently a server I look after was coming under attack and then after a few minutes the site would display ‘Error establishing a Database Connection’. When I logged into the server the MySQL service wasn’t running. My first thoughts were that… Read More »

MySQL NO_ZERO_DATE default

It is a good idea to use MySQL with sql-mode = NO_ZERO_DATE,NO_ZERO_IN_DATE (among other options) If the NO_ZERO_DATE flag is not set, MySQL will allow ‘0000-00-00′ in date and datetime fields. This also allows the silent conversion of invalid dates to this zero date as well. You probably don’t want to find zero dates being… Read More »

How to stop splitting PHP strings in NetBeans 8

In Java and JavaScript strings cannot span multiple lines. NetBeans 8 will helpfully change the code you are writing so the a single multi-line string will become many single line strings joined together. However if you are using NetBeans for PHP this can become a little annoying especially if you are writing long SQL statements.… Read More »

Category: PHP