Skip to main content

SetEnv doesn't appear in php info

Comments

7 comments

  • Yukinarija
    Found that it doesn't work if .php files are accessed via https. Works via http. Investigating further.
    0
  • JacobPerkins
    Hi, Note that each virtualhost in Apache will have a :80 vhost and an :443 vhost. Make sure you made changes to those vhosts in both areas. That should get it working for :443 for you. I hope this helps!
    0
  • Yukinarija
    Haha Jacob! TYVM! Just noticed that myself and came back here to reply - to leave a solution, hahaha... ! Have a nice day and thanks for replying!
    0
  • Yukinarija
    Jacob - sorry to ask you again, but I figured that maybe you could give my tired head today an another idea. Basically, in php.ini -> newrelic.appname = "${newrelic_appname}" With suPHP (and above) - it works fine. with fastCGI (and above) - variable is empty. I suppose this is because fastCGI starts with a clean enviroment when an app is ran? (To confirm this, I suppose I should switch the server back between and see if i can print _SERVER or _ENV variables, though I can't do that now, since it's being used.) I looked into Apache's mod_fcgid and found 'FcgidInitialEnv', which I used just below 'SetEnv' in the virtualhost config. Though, - php.ini still doesn't pickup the variable? Any thoughts on this? I do my best to test it out properly tomorrow to understand the inner workings (as I am still lacking quite a bit of knowledge). Thought that maybe you'd know. TYVM and have a great evening.
    0
  • cPanelMichael
    Hello, The following post provides information about editing the php.ini file in EasyApache 4: EA4 php.ini/local.ini behavior Please also see the following thread if you are using PHP-FPM: Enabling PHP-FPM in MultiPHP Manager Thanks!
    0
  • Yukinarija
    Thanks! I am actually still using EA3 on this one, but I will switch over to EA4 as a test. Too bad about HTTP2 support. Edit: Setting .user.ini for CGI/FastCGI SAPI in public_html of the user seemed to work for fastCGI. So in the end to include NewRelic with fastCGI - I did: 1) Install NewRelic, with 'all' 2) Tweak templates, to include 'SetEnv' 3) Use that variable, via .user.ini ( newrelic.appname = ${newrelic_appname} ) Since I need this for all domains, I will probably look for an another solution, though as a 'selectable' choice - it's pretty decent I suppose. If anybody has any idea, how could I make FastCGI react to my global php.ini (with the same newrelic.appname = ${newrelic_appname} ) - I really appreciate it. Though it's missing the variable there, and 'FcgidInitialEnv' doesn't help.
    0
  • cPanelMichael
    Thanks! I am actually still using EA3 on this one, but I will switch over to EA4 as a test. Too bad about HTTP2 support.

    Hello, Thank you for the clarification. While PHP-FPM is supported in EasyApache 4, I wanted to note that support for mod_fcgid is not yet available. It's planned for cPanel version 62: EasyApache 4 mod_fcgid Regarding the PHP values in EasyApache 3 when using FCGI, what shows up under loaded configuration files when opening a PHPINFO file under the document root? Thank you.
    0

Please sign in to leave a comment.