Tag Archives: PHP

Deploying crontab/cronjobs with PHP projects

I know there are a load of solutions out there already, but nothing that I could see that were as simple as I needed, or as flexible. In particularly I have one project which uses the core code across three …

Read more »

Git with Selenium UI Testing – Unpredictable results

A quick, and rather silly one, that has just caught me out a couple of times: Take a situation where you’re working on a site, and want to run some Selenium tests in the background, possibly with a CI server …

Read more »

WordPress 3.4.1 and AJAX problems

Overnight another team member updated the main blogs to the newest version of WP, and subsequently some plugins we use failed to work correctly. The plugins display a list of items which are retrieved via an API call to our …

Read more »

Handling config files for local development, staging and production in PHP

I’ve had a few stabs at this and never been particularly happy with how it works. My last move was to only provide a skeleton config file under versioning, then complete variables like DB user and pass on individual servers. …

Read more »

Turn PHP Xdebug profiling on and off by BASH script

It was bugging me (debugging me?) that Xdebug profiling dragged my development server down so much. So here’s a simple script to place in /usr/local/bin to turn it off and on more easily. Remember to chmod +x it first. This …

Read more »

Static variables in PHP functions

Today I had to pull an identifying array from a DB to be used by an inner loop to apply categories to some book details I was parsing. Clearly I wanted to build this array once so it had to …

Read more »

Using Fail2Ban to protect WordPress

I posted some previous ideas on this that were okay, but they turned out to be less-than-ideal solutions. They work, but one of the blogs I watch over is a bit busy, and having Fail2Ban watching the Apache access.log was …

Read more »

Separating source code from web root with PHP and NetBeans

I recently tidied my server filesystem and ended up making webroot a little more secure by keeping all of my source out of there, and having nothing that I edit directly in place. Mainly this was done to avoid duplication …

Read more »