Hump day rant: Custom compiled production software

Hump day rant: Custom compiled production software

I am currently faced with a situation where, in infinite wisdom, previous occupiers of my position made the incredibly enlightened decision to a) run our production environment using a custom compiled version of PHP and b) run the staging environment NOT on that same custom compiled version of PHP.

Now, you may be thinking that there isn’t any real issue with running a custom compiled version of PHP on a production platform since this is done quite regularly. I have a different opinion.

Compiling PHP yourself means you have to re-compile PHP yourself when you need something new. Re-compiling PHP on a production platform with many millions of page views a month is a tricky task, takes a lot of effort and to be completely frank, is a real pain in the arse when the shit inevitably hits the fan. Shit has a natural attraction to fans and compiling the interpreter your entire system depends on magnifies this attractive force.

I have just invented an equation to calculate the strength of the attraction that shit has to the fan in front of it: The Shit Attraction Force (F) is equal to the number of servers in the cluster (S) multiplied by number of page views per day (V) raised to the power of dollars generated by the system (d) in a given month. F is measured in F-Tons and is magnified by the number of configure arguments you use before you re-compile. You see what I mean? This kind of force is comparable to the force that is currently pushing the galaxies in the universe apart. Freaking vast, is what I mean.

All of this can be avoided by using simple standard packages. I have not yet come across a ‘production’ requirement for normal web development that actually HAS to use a custom compiled version of PHP. In fact, if your requirement is for a custom version of PHP, you should be building your own suite of packages. Always.

In this particular case, I need PDO to work. Simple little package would have sorted that out. As you might be able to tell, this is currently not the case.

Having a staging environment that mirrors production, in this case, would also have been useful.

So, the things we are doing to sort this out basically involves the re-compiling of PHP in the short-term but in the medium term, thankfully, I’ve preempted this situation and have a spare server ready to start the re-load process though which we will damn well move to a pure package managed environment both in production and pre-production and development and on every freaking desktop.

I have two more things to say about that:

  • May very bad things happen to people who build their own PHP and leave it undocumented.
  • May even worse things happen to people who change pre-production to be different from production.

Don’t be those people.

That is all.

Read More