Help Docs

Install PHP Agent for Linux (PHP version 7.0 and above)

Prerequisites

  1. PHP version 7.0 or above is required.
    If you use a PHP version below 7.0, kindly follow these steps to install the agent.
  2. If you are using a PHP agent version below 4.0, kindly follow these steps to uninstall the older agent before the installation.
  3. Install S247DataExporter (for Linux or Windows) to allow the PHP agent to communicate with Site24x7. 
    S247DataExporter is mandatory for PHP application monitoring.

Installation instructions

The PHP agent can be installed using any of the following methods:

  1. Set options using the command-line interface
  2. Set options using environmental variables

Set options using the command-line interface

  1. Download the installation script.
    wget -O InstallAgentPHP.sh https://staticdownloads.site24x7.com/apminsight/agents/AgentPHP/linux/InstallAgentPHP.sh
  2. Execute the installation command with the required options.
    sudo sh InstallAgentPHP.sh -lk "licensekey"

    or

    sudo sh InstallAgentPHP.sh -license.key "licensekey"
  3. Restart your web server and the FastCGI Process Manager (FPM).

The list of other available options is given below:

Option

Description

-lk, -license.key

Your account license key

-zpa.application_name

Your application name

Note: The default name is PHP-Application.

-zpa.status_port

The inter-process communication status port number

-zpa.data_port

The inter-process communication data port number

-zpa.remote_exporter_hostname

The hostname of the device on which the exporter is running

Set options using environment variables

  1. Download the installation script.
    wget -O InstallAgentPHP.sh https://staticdownloads.site24x7.com/apminsight/agents/AgentPHP/linux/InstallAgentPHP.sh
  2. Set the required options.
    export S247_LICENSE_KEY="licensekey"
  3. Execute the installation command.
    sudo -E sh InstallDataExporter.sh
  4. Restart your web server and the FastCGI Process Manager (FPM).

The list of other available install options is given below:

Option

Description

S247_LICENSE_KEY

Your account license key

ZPA_APPLICATION_NAME

Your application name

Note: The default name is PHP-Application.

ZPA_STATUS_PORT

The inter-process communication status port number

ZPA_DATA_PORT

The inter-process communication data port number

ZPA_REMOTE_EXPORTER_HOSTNAME

The hostname of the device on which the exporter is running

 

Related article

Troubleshooting steps if you don't see any data after installing the PHP agent

Was this document helpful?

Shortlink has been copied!