Help Docs

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

Prerequisites

  1. PHP version 7.0 or above is required.
    Note

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

    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 -license.key "licensekey"
  3. Restart your web server and the FastCGI Process Manager (FPM).
Note

The list of other available options is given in this table.

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

The list of other available install options is given below:

INI Directive

Environment Variable

Description

-zpa.application_name

ZPA_APPLICATION_NAME

Your application name

Note: The default name is PHP-Application.

-zpa.status_port

ZPA_STATUS_PORT

The inter-process communication status port number

-zpa.data_port

ZPA_DATA_PORT

The inter-process communication data port number

-zpa.remote_exporter_hostname

ZPA_REMOTE_EXPORTER_HOSTNAME

The hostname of the device on which the exporter is running

Related article

Was this document helpful?

Would you like to help us improve our documents? Tell us what you think we could do better.


We're sorry to hear that you're not satisfied with the document. We'd love to learn what we could do to improve the experience.


Thanks for taking the time to share your feedback. We'll use your feedback to improve our online help resources.

Shortlink has been copied!