AppDynamics Application Intelligence Platform

3.8.x Documentation



Release Notes

Skip to end of metadata
Go to start of metadata

Watch an AppDynamics engineer install the app agent for PHP in this AppDynamics in Action video:

Installing the App Agent for PHP

To install the app agent for PHP

1. Untar the tarball containing the agent into a directory. The directory should be owned by the same user that runs Apache or php-fpm. AppDynamics recommends /opt/appdynamics/php-agent.

This documentation refers to this directory as the php_agent_install directory or $<php_agent_install>.

cd $<php_agent_install>
tar -xvjf appdynamics-php-agent-x64-linux.tar.bz2

2. Run the installation script using the following syntax. Each Apache installation is a single node.

$<php_agent_install>/  [-s] [-a=<account_name>@<account_key>]
[--http-proxy-host=<proxy_host>] [--http-proxy-port=<proxy_port>] [-e <php_ext_dir>] [-i <php_ini_dir>]
<controller-host> <controller-port> <app_name> <tier_name> <node_name>
  • -s option: You can optionally specify the -s option if you want the agent to use SSL (HTTPS) to connect to the controller. In this case, set the Controller port to the HTTPS port of the controller.
  • account_key and_account name: The AppDynamics account_key and account_name are required for a controller running in multi-tenant mode. These values are provided in your welcome email from AppDynamics.
  • http-proxy-host and http-proxy-port:  Set the http-proxy-host and http-proxy-port to route data to the controller through a proxy server. The http-proxy-host is the host name or IP address of the proxy server. The http-proxy-port is the proxy server's HTTP or HTTPS port, whichever you are using. If you set the http-proxy-host you must set the http-proxy-port as well.
    Proxy servers that require a username and password are not supported.
  • -e and -i options: By default the installer uses the PHP CLI binary to determine where to install the app agent. This works for most PHP environments.
    If you are using a different PHP, use the -e option to indicate the correct extensions directory for the file and the -i option for the correct ini directory for the appdynamics_agent.ini file.

3. Restart Apache, unless you are installing an agent to monitor PHP-CLI only.

If you are running multiple installations of Apache on the same machine, run once for each Apache, each time with the appropriate node, php_ini dir and php_ext dir options.

See Files Added to Your Installation for information about the default installation directories.

Installation Samples

Here is a sample command to install the agent on a single-tenant controller: controller 8090 myApp myTier myNode

Here is a sample command to install the agent using SSL on a multi-tenant on-premise controller: -s -a=PHPCust1000@9456d222-66e2-54d2-f8aabbc66c4e 8818 myApp myTier myNode

Here is a sample command to route traffic to the controller through a proxy server. --http-proxy-host=myproxyhost --http-proxy-port=8099 controller 8090 myApp myTier myNode

Tip: The installer overwrites your existing settings in the controller-info.xml file. If you configured properties in that file, you need to update them every time you run the installer.

If the startup does not succeed, file a support ticket.

Uninstall the Agent for PHP using

If you installed the agent using, use to uninstall it.

To uninstall:

1. Shut down Apache.
2. From the PHP agent install directory, run the PHP installer with the -u option: -u

3. Delete the <php_agent_install> directory.

Learn More


  1. Unknown User (

    PHP agent installation has a dependency on php-cli being installed.

    yum install php-cli resolves the issue!

    1. Unknown User (

      That will work.

      Also "apt-get install php5-cli" on Ubuntu.