On this page:
This topic provides an overview of AppDynamics PHP Agent installation.
The Getting Started Wizard in the Controller UI 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's 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, as described here.
The PHP Agent runs on Linux and OSX 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 AppDynamics PHP Agent, confirm that you use a supported PHP version. You can check your PHP version using the following command
The PHP Agent does not work with PHP applications that are built with the enable-debug configure option or in any build otherwise compiled with debugging symbols. To determine whether the application was built with debugging symbols, you can use the following command:
php -i | grep -e "Debug Build"
The response should be:
Debug Build => no
You can get the PHP Agent distribution from the AppDynamics download site, https://appdynamics.com/download. Be sure to get the distribution file appropriate for your system, as follows:
At installation time, you will need to provide Controller connection settings and identifying information for this PHP node. The Getting Started Wizard walks you through this configuration, so if it's your first time installing an AppDynamics Agent, we recommend using the Getting Started Wizard. For general information about the Controller connection settings, see Agent-to-Controller Connections.
To complete the instrumentation, you will need to stop and start the Apache Server. Be sure to perform the installation in a way that minimizes disruption to service users, if applicable.
Do not install the PHP Agent along with other non-AppDynamics Application Performance Management (APM) tools, especially in a production environment. The PHP agent installation may fail if there are other APM products installed in the same managed environment.
The following topics provide installation details for various scenarios:
For AppDynamics, the PHP configuration files of interest are the php.ini and appdynamics_agent.ini fragment. AppDynamics 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 AppDynamics 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 appdynamics_agent.so file in your PHP extensions directory. You can find this directory using the following command:
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:
By 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 ther 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 machine agent's controller-info.xml file, the PHP Agent will not successfully register with the Controller.
To avoid this problem: