Go to All Forums

PHP - APM Installation Problem

Terminal Error:

Installing
Error in installation :: PHP version not supported
Please contact technical support
Please restart the Web Server


My Linux Server Specs:
CENTOS 7.8
PHP Version: 7.2

Like (3) Reply
Replies (15)

Hi Mark, 

This could happen if the PHP installation directory is not set in the PATH environment variable. Kindly ensure you have set the same in the system's PATH variable and that are able to access php in the terminal before retrying the installation.

Also, kindly share the output of the following commands, 

php -i | grep API 

php -i | grep extension_dir

 

If you are using PHP using cPanel/WHM or similar setups, kindly follow our manual installation instructions 

www.site24x7.com/help/apm/php-agent/install-php-agent.html#manual

 

Thanks & Regards,

Shrinivasan 

Developer, APM Insight PHP Agent

Like (0) Reply

Please see output of the 2 commands below:

php -i | grep API 

Server API => Command Line Interface
PHP API => 20170718
Zend Extension Build => API320170718,NTS
PHP Extension Build => API20170718,NTS
GSSAPI => Yes
DOM/XML API Version => 20031129
MHASH API Version => Emulated Support
Client API library version => mysqlnd 5.0.12-dev - 20150407 - $Id: 3591daad22de08524295e1bd073aceeff11e6579 $
API Extensions => mysqli,pdo_mysql
Client API version => mysqlnd 5.0.12-dev - 20150407 - $Id: 3591daad22de08524295e1bd073aceeff11e6579 $
Phar API version => 1.1.1

 

php -i | grep extension_dir

extension_dir => /opt/cpanel/ea-php72/root/usr/lib64/php/modules => /opt/cpanel/ea-php72/root/usr/lib64/php/modules
sqlite3.extension_dir => no value => no value

Like (0) Reply

After following the manual installation, I got the new error below:


sudo sh run.sh start
Agent started
run.sh: line 6: ./zpdp: Permission denied

 

ps -ef | grep zpdp

root 26802 26379 0 13:50 pts/0 00:00:00 grep --color=auto zpdp

Like (0) Reply

Hi Mark,

Thanks for the command output. The PHP agent should be loaded. Kindly restart your apache/fpm process and verify the same using

php -i | grep zpa

 

Reg the permission error, kindly make sure the zpdp file has executable flag. To enable it, you can run the following command on the /opt/zpa/bin directory and try restarting the service. 

chmod +x zpdp  

Hope this helps, 

Thanks & Regards,
Shrinivasan 
Developer, APM Insight PHP Agent

Like (0) Reply

Hi Shrinivasan,

I have done the steps you said and it successfully installed. However, in the portal of site24x7 > APM it doesn't show any data and there's a message: 

No data collected for selected time period.
The following could be the reasons :
There were no transactions performed in your application for the chosen time period.Kindly follow the support.site24x7.com/portal/kb/articles/troubleshooting-steps-to-check-if-installation-of-php-has-been-done-properly.
 

I have checked the phpinfo but zpa doesn't show in the list.

Like (0) Reply

Hi Mark, 

If the zpa is not loaded in phpinfo it is possible that the agent is not registered properly or the apache/fpm service is not restarted. 

Kindly ensure if 

1. zpa.ini is present in the respective ini directory. You can find this using the following command

php -i | grep "Scan this dir for additional .ini files"

2. zpa.so copied is the corresponding API version. In your case, ensure you have copied "/opt/zpa/lib/zpa20170718.so" to "/opt/cpanel/ea-php72/root/usr/lib64/php/modules/zpa.so" . Note that the file name must be zpa.so in the destination directory (obtained from php -i|grep extension_dir). 

3. Restart the apache/php-fpm service. And verify again using "php -i | grep zpa

Kindly let us know if this works. 

Thanks & Regards,
Shrinivasan 
Developer, APM Insight PHP Agent

Like (0) Reply

Hi Shrinivas,

I still don't see any data in Site 24x7 after installing the PHP agent. 
I have followed all the steps mentioned here:
www.site24x7.com/help/apm/php-agent/install-php-agent.html

Still can't see Site 24x7 displaying any data for my webserver.

 

Please can you advise?

Thank you!

Like (0) Reply

Hi Avani, 

Can you kindly confirm the following? 

1. zpdp service is running. You can verify it either by running "service zpdpsvc status" or "ps -ef | grep zpdp" 

2. You have restarted the apache/nginx/fpm services post installation. 

3. You can see the zpa module version when running "php -i | grep zpa"

If you are still seeing the issue, please check if the server is able to communicate to Site24x7 servers, by running "curl https://plusinsight.site24x7.com " . 

Also, please check the zpa*.log in /opt/zpa/logs directory to verify there are no errors in communication. 

Like (0) Reply

Thanks for replying back.
1. zpdp is running

2. Yes, I restarted

3. Can see zpa version

Ran the curl command. Checked the logs in zpa*.log in /opt/zpa/logs directory. Here is what I can see in the logs:(Have filled the key/sensitive info with ****). I am not sure why do I get "error:no instance found".

Build: 3.0

handler set

Process ID is ****

Setting log level to WARNING

Log level unset

error:no instance found

***************loaded configuration*************

agent.server.port=**

apm.host=

application.name=*********

license.key=*********

transaction.skip.listening=*.css,*.js,*.tiff,*.gif,*.png,*.ico,*.bmp,*.jpg,*.jpeg,*.webp,*.svg,*.svgz

***************done*************

Fetching cloud service provider

Http status code for url:169.254.169.254/ is 200

 

url:plusinsight.site24x7.com/arh/connect?license.key=***********

Checking url:plusinsight.site24x7.com/arh/connect?license.key=********
Posting to URL : plusinsight.site24x7.com/arh/connect?license.key=*******Timestamp: Thu May 13 16:54:50 2021

Curl Error: 77 <--> error setting certificate verify locations:

  CAfile: /etc/ssl/certs/ca-certificates.crt

  CApath: none

Like (0) Reply

Hi Avani, 

Regret the delay in getting back. 

Can you delete the following symbolic link files in /opt/zpa/lib/ directory and restart the zpdp service? 

libcurl.so / libcurl.so.4 

libssl.so

(Note that other files like libcurl.so.4.4.0/libssl.so.1.1 shall not be deleted)

After deleting these symbolic link files, kindly restart the agent service using either "service zpdpsvc restart" or (in /opt/zpa/bin/) "sh run.sh restart". 

Kindly let us know if this works. 

Thanks & Regards, 
Shrinivasan. 
Developer, APM Insight
 

Like (0) Reply

Thanks, this worked!

Like (0) Reply

This worked, thanks! 

Is there any way to alter the default configurations like associating with the correct monitor group/user alert group etc during install?

Like (0) Reply

Hi Avani,

Unfortunately, we currently don't have support for associating configuration/alert profiles during the installation. However, you can work around this limitation by setting configuration rules.

https://www.site24x7.com/help/admin/configuration-rules.html

Using this, you can automate the association of profiles based on criteria like Monitor name (starts with/ends with/contains...), APM Agent Type (DOTNET/JAVA/PHP..) etc.

We'll consider your requirement as a feature request and support it (subject to feasibility) in our future versions.

Hope this helps.

Thanks & Regards,
Shrinivasan
Developer, APM Insight

Like (0) Reply

Hi Shrinivasan,

We have APM agent for PHP installed in our server. I noticed that the monitor was down this Sunday for a 4 minutes where as the server and the website was up and running. I am unable to find the reason behind it's down status. The reason provided in the alert is "Agent is not communicating with Site24x7 server."

How can I troubleshoot this further?

Thanks and regards,

Avani

Like (0) Reply

Hi Avani, 

Please check the agent logs to see if there are any errors in communicating data to the servers in that time period. The logs* should be present, by default, at /opt/zpa/logs/ directory. Possible reasons may include restarting the services, updating the agent or not enough traffic on the server at that time. 

By default, APM agents collect and send monitoring data at 1 min interval, and alert is triggered, after 5 mins of no data communication. If data collection interval and alert settings are set different for other monitors, you may receive alerts differently. 

Hope this helps!

Thanks & Regards,
Shrinivasan
Developer, APM Insight

PS: *By default, logs will mask sensitive data. However, if you feel logs contain any sensitive data, you can reach us through support. 

Like (0) Reply

Was this post helpful?