A long time ago, we realized that offering just one PHP version (at the time, 5.2.X) was not going to last forever. As the release of PHP 5.3.X quickly approached, we needed to find a solution to let our customers decide what they wanted to run. After all, everybody likes having options, and more importantly new customers don’t want to see you offering only legacy versions. So our sysadmins went to work and we figured out a solution that let us run multiple versions of PHP concurrently. Pretty cool, right? Now 3 years later we’ve implemented a better solution with more options and an easy to use interface. Oh, and we now support PHP 5.5. You ask, we deliver.
The Choice is Yours: PHP Selector
Anyone who has ever seen the Matrix (and who hasn’t?) knows of this infamous scene, where the to-be hero Mr. Thomas Anderson, aka Neo, is introduced to Morpheus. Neo is then given the option of two pills, one red, one blue, each leading to a different fate. While the Matrix is cool, we think multiple PHP versions are cooler, so we’re one-upping Morpheus by giving you four options for PHP versions. Take that, Morpheus.
While we’ve had PHP 5.2.X, 5.3.X, and 5.4.X support available for a while, with our new PHP selector you’re also now able to select the PHP 5.5.X branch. To change your PHP version, simply login to cPanel and use the top-left finder to search for ‘Select PHP Version’. Click the icon and you’re off to the races.
One important note: you should no longer use the “Apache Handlers” option within cPanel when managing your cPanel versions. This will still work however over time it will become depreciated (PHP 5.5.X will not work via this method currently). If you’re changing PHP versions, only use the PHP Selector from now on.
When you first open up the PHP Selector you’ll see a page that looks like this:
From here, you can obviously see all of the currently enabled extensions at the server level. Without making any changes these are the default values we have set server wide. As you can probably assume, checking the radio button next to an option and clicking ‘Save’ will enable that extension for your account. You have the freedom to enable them all if you want, and each PHP version can have different extensions enabled. Play around, have fun, make changes, and do us a favor if you could? If you find any bugs, report them please! 🙂
Similar to how easy it is to enable extensions, changing PHP versions is just as simple. All you’d do is use the ‘PHP Version’ dropdown, select the version you want, and hit ‘Set As Current’. Two seconds later, you’re now running a new version of PHP. Before we had this installed customers had to manually add a handler for their PHP version through cPanel, and it didn’t always work like we wanted. Customers often had issues installing certain software through Softaculous as the recognized default PHP version was too old, so we were spending plenty of staff hours researching and fixing that on a case by case basis. I can safely say none of us will miss those tickets, and I bet our customers won’t either.
Last but not least, you now get access to modify your php.ini! We used to allow various changes via directives in your .htaccess file but this wasn’t as nice as being able to edit a php.ini directly. With the PHP selector, you just need to click the ‘Show PHP Settings’ and you’ll be taken to a page that looks like this:
From here, you can change various settings of your own personal php.ini file. Things like timezone, error reporting/displaying, memory limit, etc. Previously you’d need to manually edit your .htaccess (which can be a pain) but now there is an easy to use interface for those same options. Progress is good!
Introducing PHP 5.5
For the most part, the changes made in PHP 5.5.X aren’t terribly exciting for us as a hosting company. Developers and PHP enthusiasts alike may get more of a rise from the new features, but we’re just happy to be able to support it for our customers. Anyone looking for a full read on the changes can check out the PHP 5.5 new features manual on the php.net website. One big change that may impact a few of you reading this is the improvement to the GD extension, which is easily one of the most used extensions by our shared hosting customers.
As this is brand new for us we’re expecting a bug or two, but that happens with any new software. Like I said before, should you guys get any errors / weird behavior, we would really appreciate you reporting it to us. Even if it seems trivial or small, we can likely find a larger underlying problem and make sure no one else is affected.