Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.
James Williams edited this page Sep 6, 2017 · 5 revisions

PHP 5.6 and PHP 7.0 are installed and running using PHP-FPM.

You can easily configure different sites to use the different PHP versions.

Using PHP 7

PHP 5.6 is the default PHP interpreter for sites hosted by Parrot, but it's easy to change using PHP 7.1 if you want.

Simply add a file called:

.parrot-php7

In the root folder of a site hosted with Parrot and run:

vagrant provision

Parrot will detect the file and change to sending PHP requests to the PHP 7.1 FPM instance. Alternatively, you can name the file .parrot-php7.1 or .parrot-php7.0 (to use the PHP 7.0 FPM instance).

Base configuration

Parrot installs a 'base' configuration for php configuration settings, from parrot-config/php/parrot-base.ini. You should not edit this file unless you wish to contribute these changes back upstream.

We set some (hopefully) sensible defaults.

Local configuration

We know that you may wish to override the base configuration or change the PHP configuration in addition to the base config, so we provide a file to store those changes that will be applied for you, but is ignored by git for easy merging etc.

The file you should put local modifications in is parrot-config/php/parrot-local.ini there's a template in parrot-config/php/parrot-local.ini.template to copy if you need it.

After making changes run:

vagrant provision

To make puppet apply them to your PHP installation in Parrot.

You may need to customise things like memory limits temporarily or error reporting settings etc. Think about the changes you are making though, and if they are appropriate to be shared in the base config and pushed back upstream.

Extensions

We install the following PHP extensions and configure them:

Clone this wiki locally