[PHP] Install PHP Agent on AWS EC2 server with cPanel and WHM

Hello everybody, I have a problem: I can’t install php agent on my EC2 server with cPanel and WHM (I use this AMI: https://aws.amazon.com/marketplace/pp/prodview-azvsuhfhptzxc?sr=0-1&ref_=beagle&applicationId=AWSMPContessa). It shows me no errors, only that it can’t install it.
Can someone help me please?

I use these commands:

rpm -Uvh http://yum.newrelic.com/pub/newrelic/el5/x86_64/newrelic-repo-5-3.noarch.rpm
yum install newrelic-php5 -y
sudo NR_INSTALL_SILENT=1 newrelic-install install

sed -i -e “s/REPLACE_WITH_REAL_KEY/MYPERSONALKEY/”
-e “s/newrelic.appname[[:space:]]=[[:space:]].*/newrelic.appname=“pinocchio”/”
$(php -r “echo(PHP_CONFIG_FILE_SCAN_DIR);”)/newrelic.ini

curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash &&
NEW_RELIC_API_KEY=MYAPIKEY
NEW_RELIC_ACCOUNT_ID=MYACCOUNTID NEW_RELIC_REGION=EU
/usr/local/bin/newrelic install -n logs-integration

curl -Ls https://download.newrelic.com/install/newrelic-cli/scripts/install.sh | bash &&
NEW_RELIC_API_KEY=MYAPIKEY
NEW_RELIC_ACCOUNT_ID=MYACCOUNTID NEW_RELIC_REGION=EU \
/usr/local/bin/newrelic install -n php-agent-installer

Hello @caraffialex.bus.

Welcome to the community!

While this may be due to a compatibility issue, I am going to reach out to our support engineers to verify. Please review our requirements and compatibility doc for the New Relic PHP agent: https://docs.newrelic.com/docs/apm/agents/php-agent/getting-started/php-agent-compatibility-requirements/. Please note our support engineers will reach out on this post when available.

Thank you for your answer. I have already checked this link and it’s OK for requirements and compatibility