Fun and Games With PHP Precision

  • Posted on: 12 July 2014
  • By: mark

This is another of those "interesting" tech support cases (where "interesting" means painful and tedious).

Our platform collects lots of data for our customers, and generates lots of nice juicy reports for them in an assortment of formats. Being a sensible developer, I'd done this using a typical MVC pattern, so there are models which get data out of the database, and then different views to format it into each report. The support case was that some numbers were being displayed with a ridiculous number of decimal places in Excel reports.

Blog Post Tags: 

The perils of switching from MyISAM to InnoDB

  • Posted on: 3 September 2012
  • By: mark

We've been seeing a lot of contention on one of the larger tables in our database recently. This table has a few billion rows (around 300GB), and uses MyISAM. As our usage has increased, we've started seeing more SELECTs being blocked by UPDATEs, so decided to switch the table to use InnoDB to allow concurrent reads and writes.

Blog Post Tags: 

PHP Fatal error: Maximum execution time of 0 seconds exceeded

  • Posted on: 9 December 2011
  • By: mark

I've got a pretty long-running script. In our live environment this runs under command line PHP, but for convenience on my dev machine I just run it through Apache.

Initially I got an error

Fatal error: Maximum execution time of 30 seconds exceeded

No problem - just up the max_execution_time parameter to zero in my php.ini to give an infinite execution time, restart Apache, and start again. Trouble was, after about ten minutes, I got a slightly different error:

Blog Post Tags: 

My First Android App

  • Posted on: 24 June 2011
  • By: mark

So, one of the main reasons I chose an Android phone instead of an iPhone (apart from not wanting to follow the herd) was so that I could develop my own apps and run them on my own phone. Yes - I know you can write apps for iOS as well, but I'm all PC, Linux and open source, and Mac development is going to need a bigger technology shift than I want to make right now (although I wouldn't rule it out in the future).

Blog Post Tags: 

Force Drupal User Logout

  • Posted on: 14 January 2010
  • By: mark

I had an interesting problem this morning. One of our team had been demonstrating Analytics SEO to a potential reseller, and had forgotten to log out of the site at the end of the demo. He didn't really want to leave them with access to his account (which is a rather powerful administrator-type account), but also didn't really want to phone them and ask them to log out. The reseller is in South Africa, so I can't exactly sneak in and delete their login cookie either.

Blog Post Tags: 

Pages