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
- Set options using the command-line arguments
- Set options using environmental variables
- Set options by modifying the configuration.json file
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
Set options using environmental variables
- Export the directive and its corresponding value:
export <directive>=<value>
- 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
Set options by modifying the configuration.json file
- Modify the configuration.json file.
- 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
Windows
Set options by modifying the configuration.json file
- 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
}
} - 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 |
|
zpa.data_port |
ZPA_DATA_PORT |
|
zpa.status_port |
ZPA_STATUS_PORT |
|
zpa.hostlicense_apply |
ZPA_HOSTLICENSE_APPLY |
|
zpa.method_threshold |
ZPA_METHOD_THRESHOLD |
|
zpa.remote_exporter_hostname |
ZPA_REMOTE_EXPORTER_HOSTNAME |
|
zpa.stack_depth |
ZPA_STACK_DEPTH |
|
zpa.capture_casssandra |
ZPA_CAPTURE_CASSANDRA |
|
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. |
-
On this page
- Linux
- Windows
- Other available options