How to change the php.ini directives

By default, the buildpack installs the cli module when you push a standalone application, and it installs the fpm module when you run a web application. You must specify cgi and pear if you want them installed following the below guide.

Step 1. Create the .bp-config/options.json file

In the root folder of your application create a folder with name .bp-config. Under this folder create a file with name options.json

The below example shows an example PHP app directory after you create the .bp-config/options.json file.

index.php composer.json .bp-config/ options.json

Step 2. Specify PHP modules to install

You can explicitly enable any or all of: fpm, cli, cgi, and pear in your options.json file under the PHP_MODULES field.

{ "PHP_MODULES": ["cgi","pear"] }

Step 3. Deploy your applicaiton

Zip your PHP project folder and upload it from the dashboard and your PHP app should run with the version you specified. You can also use the CLI to deploy your PHP app.