We chose PHP because hosting is cheap and plentiful, and it is very easy to set up a local development environment. Even for people who have never run a webserver on their computer before. We made the baseline PHP 5, not a version of PHP 5 but just PHP 5 – so a customer can ask their host “do you support PHP 5?” and know that it should work.
However welcoming all versions of PHP 5 can create all kinds of headaches. We had a webchat with some Perch users a week ago, one of the things they requested was a simple way to backup database and resource files uploaded by editors into Perch. In the shower on Saturday morning I thought this through and figured that it should only take a couple of hours to write. All I needed to do was give an interface to zip up and download the files and the output of mysqldump – right?
Or, right, if I could assume that the user was running PHP greater than 5.2 (which has the ZipArchive class), or that the user could execute a command from PHP and that mysqldump was in their path. With Perch we can assume none of these things. On a daily basis we discover just how terrible, terrible hosting can be.
Every requirement we add to Perch comes back to us in support and gives the user the impression that it is hard to install. So we try really hard in the base product and core apps to not require any more than a functioning PHP 5 and MySQL greater than 4.1. For many of our users Perch is the first time they have ever installed a CMS, or installed any server side code at all. Making the process as easy as possible is one of our biggest challenges. We will watch with interest what happens when WordPress starts to require PHP 5.2 with the release of WordPress 3.2 as I think this may cause a tipping point where hosts need to upgrade to allow people to upgrade WordPress. In which case we may be able to move a future release of Perch to 5.2 – which would have solved my Perch Backup problem of last weekend. However, moving to 5.2 wouldn’t solve many of the configuration specific issues we see.
As things stand Drew and I are becoming very knowledgeable in the peculiarities of various hosting companies, the majority of users have no issues at all but problems caused by a strange PHP configuration on a host can be hard to work through in support with a user who isn’t used to debugging a PHP issue. I wondered if this knowledge is the sort of thing though that could be shared. A PHP web hosting wiki of sorts where software developers could share the quirks of hosting with each other, and users could check to see if hosting was a known nuisance when it comes to installing scripts. It might encourage hosts to standardize on installations and would also save other software companies from discovering the same issues we have already uncovered.