PHP 5.6 ignoring Virtualmin's site-specific PHP configs

3 posts / 0 new
Last post
#1 Tue, 09/06/2016 - 12:36
Aaron Adams

PHP 5.6 ignoring Virtualmin's site-specific PHP configs

Some weeks ago we upgraded to Ubuntu 16.04 LTS, which comes with PHP 7 by default and does not provide PHP 5.6. Our customers' websites aren't yet ready for PHP 7, so we installed PHP 5.6 from another (non-Ubuntu) repository. Since that upgrade, PHP 5.6 has not recognized the site-specific PHP settings that Virtualmin will create. A look at phpinfo() shows "Additional .ini files parsed", and none of those paths include the user homes where Virtualmin places php.ini.

Is the ability to parse site-specific php.ini files a function of PHP or Virtualmin? If it's up to Virtualmin, how can I troubleshoot it? If it's PHP, how do I (re?)configure it to parse site-specific php.ini files? Would that require giving up PHP from this particualr repository and compiling my own?

Any help is much appreciated.

Tue, 09/06/2016 - 20:24
andreychek

Howdy,

That functionality should work in any supported distro... but you could be seeing a PHP config issue related to those non-standard PHP versions.

When looking at the phpinfo() output, what does it say next to the "Server API" section? Does it say something about "Apache handler", rather than saying "CGI/FastCGI"?

It should say "CGI/FastCGI", but if it doesn't, that may mean that it's using mod_php, which could cause what you're seeing.

-Eric

Tue, 09/06/2016 - 20:42
Aaron Adams

Ah! Yes, it does say "Apache 2.0 Handler" next to "Server API". So it seems like I should install the php5.6-fpm package and disable mod_php in Apache. Then in Virtualmin, I go to Server Configuration -> Website Options for each domain and make sure "PHP script execution mode" is set for "FCGId (run as virtual server owner)". Is that correct?

Topic locked