Acquia Cloud adds PHP 5.5 (and more)
by Barry Jaspan
Acquia Cloud strives to be the best place to build and manage Drupal web sites. One aspect of that is providing the best, most current PHP runtime environment for Drupal. We’ve long supported Drupal 6 and 7, and we are preparing to support Drupal 8 as soon as it is ready. Drupal 8 requires PHP 5.4 or newer, so today we are announcing that Acquia Cloud supports PHP 5.5 for all sites and all subscription levels.
Choosing the PHP version per environment
Acquia Cloud provides multiple environments, such as Dev, Staging, and Prod, for your site development workflow. Converting your site from one version of PHP to another often requires some source code changes or module upgrades. On Acquia Cloud, you can configure the PHP version for each environment separately via the Acquia Cloud UI. For example, you can set your Dev environment to run PHP 5.5 in order to test your site with that version, while leaving your Prod environment running PHP 5.3.
When you choose a PHP version for an environment, all PHP web requests to that environment will be executed using the selected version of PHP. Cloud Hooks and cron jobs are executed with the Unix PATH set up so that “php" runs the correct version of PHP for that environment.
You might develop code on an environment using one version of PHP that does not work in a different version of PHP. If you use the Workflow page drag-and-drop to move code from one environment to another, Acquia Cloud notifies you if the PHP versions for the two environments are different, and lets you deploy the new code and new PHP version in a single step:
SSH, Drush, and PHP versions
Acquia Cloud lets you run Drush commands or any other Unix shell command with SSH. In order to run the correct per-environment version of PHP when you SSH to Acquia Cloud, you need to specify to which environment you are connecting.
For example, suppose that your Dev environment is running PHP 5.5 and your Stage environment is running PHP 5.3. SSH to the server name from the Servers page of the Cloud UI, with the username "[site].[env]", and the default ‘php’ program in the PATH is correct:
$ ssh email@example.com
mysite@free-1:~$ which php
All versions of PHP require an opcode cache to avoid re-compiling the Drupal source code on every page request. On Acquia Cloud, PHP 5.3 and older use APC, the Alternative PHP Cache for PHP opcode caching. Starting with PHP 5.5, OPcache is the standard opcode cache. No action is required on your part to use the correct opcode cache; it will happen automatically.
Besides the opcode cache, APC has long provided a “user caching" API which provides a server-local key/value cache store. While the APC user cache is not always appropriate for sites running on multiple web nodes, there are some valid use cases and we have customers that rely on it. Therefore, PHP 5.5 on Acquia Cloud also includes the APCu PECL extension which is 100% compatible with the APC user caching API. So, even if your site uses the APC user caching API, no action is required for it to keep working with PHP 5.5; it will use the APCu extension automatically.
Get started now for free
To try your Drupal site now with PHP 5.5, just sign up for Acquia Cloud Free and start developing!