Related Pages: |
This page provides an overview of PHP Agent installation.
In the Controller UI, the Getting Started Wizard walks you through the configuration and installation steps for the PHP Agent.
The installer that you get from the wizard uses the PHP directory specified in your environment PATH variable to determine where to install the agent. If you are instrumenting a PHP installation not specified in your PATH, you can manually configure and invoke the RPM or script installer.
The PHP Agent runs on Linux and MacOS machines. The PHP Agent is designed for PHP operating environments in which:
The PHP Agent may work in environments that do not meet all assumptions. However, you should use extra care in installing and thoroughly testing the PHP agent and application in a staging environment.
Before attempting to install the PHP Agent:
php -i |
enable-debug
configuration option or in any build otherwise compiled with debugging symbols. To determine whether the application was built with debugging symbols, you can use this command:php -i | grep -e "Debug Build" |
The response should be:
Debug Build => no |
For Alpine Linux, use PHP Agent Alpine Linux - 64-bit
Do not install the PHP Agent along with other non- |
(For Alpine Linux) Before you install the PHP Agent:
libstdc++
library:apk add libstdc++ |
session
and sockets
PHP extensions:For example, if you are using PHP 8.2, then install the php82-session
and php82-sockets
extensions:
apk add php82-session php82-sockets |
These topics provide installation details for various scenarios:
install.sh
or install.ps1
, see Install the PHP Agent by Shell Script. Use install.sh
to install on OSX or Linux, and install.ps1
to install on Windows.For cURL installation, see Download Splunk AppDynamics Software.
For , the PHP configuration files of interest are the
php.ini
and appdynamics_agent.ini
fragment. settings can be found in either
.ini
file, depending on the operating system under which your PHP is installed.
The PHP Agent installer adds the appdynamics_agent.ini
file to the directory that contains your php.ini
file. You can find this directory using the following command:
php -i | grep -e "Additional .ini files parsed" |
If the installer is not able to determine the directory where the ini fragments for your PHP deployment live, it displays the required ini fragment and prompts you to copy and paste it into your main
php.ini
file.
Also, see http://php.net/manual/en/configuration.file.php for information about possible locations.
The installer also installs the following file in your PHP extensions directory.
php -i | grep extension_dir |
There is an agent log and a proxy log for each application.
By default, the agent log is written to $<php_agent_install>/logs/agent.log
. The log contains the transactions that the agent processes and then sends to the proxy. The default pattern for agent log naming is:
agent.log
: the current logagent.log.1
: most recent logagent.log.2
: second most recent logagent.log.3
: third most recent logagent.log.4
: fourth most recent logagent.log.5
: fifth recent logBy default, the proxy log is written to $<php_agent_install>/logs/proxy_$date.log
. This log contains the transactions that the proxy accepts from the agent and then sends to the Controller.
If you configure the logs directory with the --log-dir
option, the proxy logs are written to the same directory as the agent logs.
For information about the location of log files generated by an RPM installation, see RPM Log file in Install the PHP Agent by RPM.
You can install a machine agent on a node that runs the PHP Agent. However, note that if you install the machine agent on a PHP Agent node and you specify the tier and node name in the controller-info.xml
file of the machine agent, the PHP Agent will not successfully register with the Controller.
To avoid this problem:
controller-info.xml
file of the machine agent. If you do, the PHP Agent may fail to register.