seansch

Registered
Jul 31, 2016
2
0
1
Olean, NY
cPanel Access Level
Root Administrator
Hello All,

I have been trying to setup Newrelic PHP APM on my WHM server. I have the module installed and reporting already but am having trouble setting user specific php.ini settings.

Currently the system is running CENTOS 7.2 x86_64 kvm – WHM 58.0 (build 8)

I have been able to successfully have php recognize the local php.ini by placing a copy in /home/USER/public_html . When viewing phpinfo() it correctly shows that this file is loaded.

Where my issue comes in is that newrelic has its own ini file stored in /opt/cpanel/ea-php56/root/etc/php.d/newrelic.ini and it appears this gets loaded AFTER the local /home/USER/public_html/php.ini and overrides my settings.

I simply want to load:
[newrelic]

newrelic.appname="My App Name"
But this is being overridden by
newrelic.appname = "PHP Application" in the /opt/cpanel/ea-php56/root/etc/php.d/newrelic.ini file.

How would I go about loading my changes AFTER the php.d directory is parsed?
 
Last edited by a moderator:

seansch

Registered
Jul 31, 2016
2
0
1
Olean, NY
cPanel Access Level
Root Administrator
A quick update.

I was able to accomplish this by placing a .user.ini file in /home/USER/public_html

I simply placed 'newrelic.appname="My App Name"' in this file and it appears to be working.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,227
463
A quick update.

I was able to accomplish this by placing a .user.ini file in /home/USER/public_html

I simply placed 'newrelic.appname="My App Name"' in this file and it appears to be working.
Hello,

I'm happy to see you were able to address the issue. Documentation on the usage of this file is found at:

How to Set Up a PHP .user.ini File.

Thank you.