Schedule demo

Modifying the PHP agent configurations for individual applications


The configuration settings of the PHP agent, including the application name, data port, and status port, can be individually modified for each application.

Note: For instructions on modifying the configurations for all applications on the application server, please refer to this help page.

Table of contents

Linux

Note: Please check this table for the list of the other available options.

For Apache

Add the following key to the .htaccess file present in your application directory:

php_value <directive> <value>

Note: If the .htaccess file does not exist, create the file in your application directory, and ensure that it is allowed to override directives by modifying the server configuration.

Example:

To disable error tracking and modify the method tracking threshold, please use the key below:

php_value zpa.track_errors 0
php_value zpa.method_threshold 5

For Nginx

Add the following key within the relevant location block or server block in the application's Nginx configuration file:

fastcgi_param PHP_VALUE "<directive>=<value>";

Example:

To disable error tracking and modify the method tracking threshold, please use the key below:

fastcgi_param PHP_VALUE "zpa.track_errors=0";
fastcgi_param PHP_VALUE "zpa.method_threshold=5";

Note: Please keep in mind that modifying PHP configuration via fastcgi_param may fail if Nginx and PHP-FPM are running in different containers. In such cases, you must modify the PHP-FPM configuration directly.

For PHP-FPM

Add the following key to the .user.ini file present in your application directory. If it does not exist, create the .user.ini file in the application directory.

<directive>=<value>

Example:

To disable error tracking and modify the method tracking threshold, please use the key below:

zpa.track_errors=0
zpa.method_threshold=5

For Command Line Interface

Add the following key while executing your PHP script from the terminal:

php -d <directive>=<value> /path/to/your/script

Example:

To disable error tracking and modify the method tracking threshold, please use the key below:

php -d zpa.track_errors=0 -d zpa.method_threshold=5 /path/to/your/script

Note: Please check this table for the list of the other available options.

Windows

Add the following configuration to the .user.ini file in the website's root directory:

Note: The default file name is '.user.ini', but it may also be named differently.

<directive>=<value>

Example:

To disable error tracking and modify the method tracking threshold, please use the key below:

zpa.track_errors=0
zpa.method_threshold=5

Note: Please check this table for the list of the other available options.

Thank you for your feedback!

Was this content helpful?

We are sorry. Help us improve this page.

How can we improve this page?
Do you need assistance with this topic?
By clicking "Submit", you agree to processing of personal data according to the Privacy Policy.

Loved by customers all over the world

"Standout Tool With Extensive Monitoring Capabilities"

It allows us to track crucial metrics such as response times, resource utilization, error rates, and transaction performance. The real-time monitoring alerts promptly notify us of any issues or anomalies, enabling us to take immediate action.

Reviewer Role: Research and Development

carlos-rivero
"I like Applications Manager because it helps us to detect issues present in our servers and SQL databases."
Carlos Rivero

Tech Support Manager, Lexmark

Trusted by over 6000+ businesses globally