Skip to main content

Configure the PHP agent

The standard configuration for all agents uses this order of precedence.

You may use a YAML configuration file or environment variables to configure the agent when running your application:

  • You can create your own YAML configuration file or use this YAML template that contains all valid properties for the PHP agent,

  • or you can use environment variables to configure your build.

Tip

Use the Contrast agent configuration editor to create or upload a YAML configuration file, validate YAML and get setting recommendations.

PHP YAML template

Use this template to configure the PHP agent using a YAML configuration file. (Learn more about YAML configuration.)

Place your YAML file in the working directory of your application or in the default location: /etc/contrast/contrast_security.yaml

https://docs.contrastsecurity.com/common-agent-config/php_contrast_security.yaml