Help Docs

Modifying the PHP agent configurations

  • This is only applicable to version 4.1 and above of the agent.
  • If you want to modify the configurations for each PHP application separately, check out this help page.

The PHP agent configurations (such as the application name, data port, and status port) can be modified for all of the applications on the application server.

Linux

Windows

Linux

Set options using command-line arguments

Execute the configure command along with the directive and its corresponding value:

sudo sh /opt/zpa/bin/agent_php.sh configure -<directive> <value>

Example

Execute the following command to change the default application name and disable capturing MySQL:  

sudo sh /opt/zpa/bin/agent_php.sh configure -zpa.application_name "appname" -zpa.capture_mysql 0
Note

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

Set options using environmental variables

  1. Export the directive and its corresponding value:
    export <directive>=<value>
  2. Execute the configure command:
    sudo -E sh /opt/zpa/bin/agent_php.sh configure

Example

Execute the following commands to change the default application name and disable capturing MySQL:

Step 1

export ZPA_APPLICATION_NAME="appname"
export ZPA_CAPTURE_MYSQL=0

Step 2

sudo -E sh /opt/zpa/bin/agent_php.sh configure
Note

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

Set options by modifying the configuration.json file

  1. Modify the configuration.json file.
  2. Execute the configure command:
    sudo sh /opt/zpa/bin/agent_php.sh configure

Example

Execute the following commands to change the default application name and disable capturing MySQL:

Step 1

{
 "php.install_path": "",
 "agent_configuration": {
      "extension": "php_zpa.dll",
      "zpa.application_name" : "appname",
      "zpa.capture_mysql" : 0
   }
}

Step 2

sudo sh /opt/zpa/bin/agent_php.sh configure
Note

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

Windows

Set options by modifying the configuration.json file

  1. Modify the configuration.json file.

    Example

    To change the default application name and disable capturing MySQL: Execute the following command:
    {
     "php.install_path": "",
     "agent_configuration": {
          "extension": "php_zpa.dll",
          "zpa.application_name" : "appname",
          "zpa.capture_mysql" : 0
       }
    }
  2. Double-click the MSI file, select Repair APM Insight PHP Agent, and click Finish.

Other available options

INI Directive Environment Variable Description

zpa.application_name

ZPA_APPLICATION_NAME

  • This is your new application name.
  • The default value is PHP-Application.

zpa.data_port

ZPA_DATA_PORT

  • This is the inter-process communication (IPC) data port number.
  • The default value is 20022.

zpa.status_port

ZPA_STATUS_PORT

  • This is the IPC status port number.
  • The default value is 20021.

zpa.hostlicense_apply

ZPA_HOSTLICENSE_APPLY

zpa.method_threshold

ZPA_METHOD_THRESHOLD

  • This is the threshold (in milliseconds) above which the method must be tracked. 
  • The default value is 10.

zpa.remote_exporter_hostname

ZPA_REMOTE_EXPORTER_HOSTNAME

  • This is the hostname of the device on which the exporter is running. It can also be left empty if the exporter and agent are running on the same device.
  • The default value is empty.

zpa.stack_depth

ZPA_STACK_DEPTH

  • This is the depth of stack trace to be captured. 
  • The default value is 15.

zpa.capture_casssandra

ZPA_CAPTURE_CASSANDRA

  • 1 is for capturing, and 0 is for disabling. 
  • The default value is 1.

zpa.capture_clirequest

ZPA_CAPTURE_CLIREQUEST

zpa.capture_distributed_trace

ZPA_CAPTURE_DISTRIBUTED_TRACE

zpa.capture_http

ZPA_CAPTURE_HTTP

zpa.capture_memcached

ZPA_CAPTURE_MEMCACHED

zpa.capture_mssql

ZPA_CAPTURE_MSSQL

zpa.capture_mysql

ZPA_CAPTURE_MYSQL

zpa.capture_oracle

ZPA_CAPTURE_ORACLE

zpa.capture_pdo

ZPA_CAPTURE_PDO

zpa.capture_postgres

ZPA_CAPTURE_POSTGRES

zpa.capture_redis

ZPA_CAPTURE_REDIS

zpa.track_errors

ZPA_TRACK_ERRORS

zpa.track_exceptions

ZPA_TRACK_EXCEPTIONS

zpa.track_zend_execute_internal

ZPA_TRACK_ZEND_EXECUTE_INTERNAL

zpa.track_zend_execute

ZPA_TRACK_ZEND_EXECUTE

zpa.span_limit

ZPA_SPAN_LIMIT

Maximum number of spans per transaction to be traced. Default value is 10000.

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!