-
Notifications
You must be signed in to change notification settings - Fork 15
PHP
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.
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).
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.
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.
We install the following PHP extensions and configure them:
- APC
- PHP-CURL
- PHP-MySQL
- PHP-GD
- PHP-sqlite
- PHP-XMLRPC
- PHP-XDEBUG
- xhprof (PHP 5.6 only at the moment)