Help Docs

Modifying the PHP agent configurations for individual applications

PHP agent configurations (such as the application name, data port, and status port) can be modified separately for each application.

Note

If you want to modify the configurations for all of the applications on the application server, check out this help page.

Linux

For Apache

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

php_value <directive> <value>
If .htaccess is not present, create the .htaccess 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 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 use the key below:

fastcgi_param PHP_VALUE "zpa.track_errors=0";
fastcgi_param PHP_VALUE "zpa.method_threshold=5";
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 inside 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 method tracking threshold 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 method tracking threshold 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.

The default file name is .user.ini. However, it can also be in a different name.
<directive>=<value>

Example

To disable error tracking, and modify method tracking threshold 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.

Was this document helpful?

Would you like to help us improve our documents? Tell us what you think we could do better.


We're sorry to hear that you're not satisfied with the document. We'd love to learn what we could do to improve the experience.


Thanks for taking the time to share your feedback. We'll use your feedback to improve our online help resources.

Shortlink has been copied!