Related Pages:

This page provides an overview of  PHP Agent installation. 

Installation Overview

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 You Begin

Before attempting to install the PHP Agent:

The response should be:

Debug Build => no

Installing the PHP Agent

These topics provide installation details for various scenarios:

For cURL installation, see Download Splunk AppDynamics Software.

Files Added by Installation

PHP configuration files

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.

.so and .dll files

The installer also installs the following file in your PHP extensions directory.

php -i | grep  extension_dir

Logs

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 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.

Using a Machine Agent on a PHP Node

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: