The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Override php.ini EA4/suPHP

Discussion in 'EasyApache' started by seansch, Jul 31, 2016.

Tags:
  1. seansch

    seansch Registered

    Joined:
    Jul 31, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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?
     
    #1 seansch, Jul 31, 2016
    Last edited by a moderator: Jul 31, 2016
  2. seansch

    seansch Registered

    Joined:
    Jul 31, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,664
    Likes Received:
    646
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page