Wrong php.ini being used when creating PHP 7 server

2 posts / 0 new
Last post
#1 Wed, 05/03/2017 - 08:37
amityweb

Wrong php.ini being used when creating PHP 7 server

I recently added PHP 7 to the server as an additional PHP version. I already had PHP 5.3.3 (the default with the server) and 5.5 and 5.6 as extras.

But when I create a new server, the php.ini file found in /home/myuser/etc/php7/php.ini is from /etc./php.ini which I believe is for 5.3, and so my sites give me errors as the sites I am installing require PHP 7. I have found the correct php.ini file to be in /etc/opt/rh/rh-php70/php.ini

Note: php.ini files for 5.5 and 5.6 are in a slightly different location: /opt/rh/php54/root/etc/php.ini /opt/rh/php55/root/etc/php.ini

How can I configure the server to use the PHP 7 php.ini when creating new servers?

I have other servers in which I added PHP 7 and they did not have this issue, so something must have gone wrong with it?

Thanks

Wed, 05/03/2017 - 09:16
amityweb

Under Server Templates -> Default Settings -> Apache Website, I have manually set the location of the PHP 7 file and that works. BUT, PHP 5.5 and 5.6 are also set to Default, so why would they take the correct php.ini file and PHP 7 not?