Install PHP Agent for Linux (PHP version 7.0 and above)
Prerequisites
- 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.
- If you are using a PHP agent version below 4.0, kindly follow these steps to uninstall the older agent before the installation.
- 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:
Set options using the command-line interface
- Download the installation script.
wget -O InstallAgentPHP.sh https://staticdownloads.site24x7.com/apminsight/agents/AgentPHP/linux/InstallAgentPHP.sh
- Execute the installation command with the required options.
sudo sh InstallAgentPHP.sh -license.key "licensekey"
- Restart your web server and the FastCGI Process Manager (FPM).
The list of other available options is given in this table.
Set options using environment variables
- Download the installation script.
wget -O InstallAgentPHP.sh https://staticdownloads.site24x7.com/apminsight/agents/AgentPHP/linux/InstallAgentPHP.sh
- Set the required options.
export S247_LICENSE_KEY="licensekey"
- Execute the installation command.
sudo -E sh InstallDataExporter.sh
- Restart your web server and the FastCGI Process Manager (FPM).
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 |