SetEnv in vhost.local not being seen in php.ini

zorrobyte

Registered
Jun 4, 2015
2
0
1
Indiana
cPanel Access Level
Root Administrator
Greetings!

I have a SetEnv in my vhosts.local:
SetEnv newrelic_appname [% wildcard_safe(vhost.servername) %]

You can see that this is working:

line:
_SERVER["newrelic_appname"]

So I set in my php.ini:
/usr/local/lib/php.ini
newrelic.appname = “${newrelic_appname}”

This should be getting the SetEnv from apache and replacing it with domain.com, however php is not able to access Apache's ENV as it defaults to the default newrelic.appname.

Just to be sure, I can change newrelic.appname = "ANYTHING" and it does indeed change.

How can I access Env variables in vhost.local from php?
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,229
463
I am happy to see the issue is now resolved. Thank you for updating us with the outcome.