Not all php.ini files are created for new servers

I have 4 versions of PHP installed (5.4, 5.6, 7.3, 7.4)

For the latter two, no default php.ini files are created when creating a new server, I would have to do this manually.

How can I fix this problem?

Running the ‘check configuration’ doesn’t show any problems

I now see this:

drwxr-xr-x 4 spinner spinner 4096 Jul 3 11:33 ./
drwxr-x— 12 spinner spinner 4096 Jul 3 08:53 …/
lrwxrwxrwx 1 spinner spinner 14 Jul 3 11:33 php.ini -> php5.6/php.ini*
drwxr-xr-x 2 spinner spinner 4096 Jul 3 08:46 php5.4/
drwxr-xr-x 2 spinner spinner 4096 Jul 3 08:46 php5.6/

While there are 4 versions of PHP installed (and recognized by Virtualmin)

Do I need to add templates somewhere?

More details please, for example 1) your Linux distro; 2) how you installed PHP, particularly which one came first; 3) output of php -v.

1 - Centos 6
2 - Through remi repo
3 - See below:

root@web01 ~# rpm -qa | grep php | grep cli
php73-php-cli-7.3.19-1.el6.remi.x86_64
php56-php-cli-5.6.40-21.el6.remi.x86_64
php54-php-cli-5.4.45-18.el6.remi.x86_64
php72-php-cli-7.2.31-2.el6.remi.x86_64

root@web01 ~# which php72
/usr/bin/php72
root@web01 ~# which php73
/usr/bin/php73
root@web01 ~# which php56
/usr/bin/php56
root@web01 ~# which php54
/usr/bin/php54
root@web01 ~# which php72-cgi
/usr/bin/php72-cgi
root@web01 ~# which php73-cgi
/usr/bin/php73-cgi
root@web01 ~# which php56-cgi
/usr/bin/php56-cgi
root@web01 ~# which php54-cgi
/usr/bin/php54-cgi

So there’s no /usr/bin/php?

And if you type

yum info php56-php
yum info php72-php
yum info php73-php

does yum respond with ‘Installed’ or ‘Available’?

Or anything from yum info php? Because it looks like there’s no global system PHP installed. Which is workable, just not typical.

phpNN-php-cli is a package that needs a fuller package. Surely cli isn’t the only package installed, but if so that would explain missing files. If your installations are complete each version’s php.ini file should be in its respective /etc/opt/remi/phpNN/ directory, plus an overriding duplicate php.ini in /home/user/etc/phpNN/.

Yeah there is:

root@web01 ~# ls -la /usr/bin/php*
lrwxrwxrwx 1 root root 5 Dec 1 2019 /usr/bin/php -> php73*
lrwxrwxrwx 1 root root 32 Jan 15 15:55 /usr/bin/php54 -> /opt/remi/php54/root/usr/bin/php*
lrwxrwxrwx 1 root root 36 Jan 15 15:55 /usr/bin/php54-cgi -> /opt/remi/php54/root/usr/bin/php-cgi*
lrwxrwxrwx 1 root root 33 May 11 14:10 /usr/bin/php54-pear -> /opt/remi/php54/root/usr/bin/pear*
lrwxrwxrwx 1 root root 38 Jan 15 15:55 /usr/bin/php54-phar -> /opt/remi/php54/root/usr/bin/phar.phar*
lrwxrwxrwx 1 root root 32 May 23 13:50 /usr/bin/php56 -> /opt/remi/php56/root/usr/bin/php*
lrwxrwxrwx 1 root root 36 May 23 13:50 /usr/bin/php56-cgi -> /opt/remi/php56/root/usr/bin/php-cgi*
lrwxrwxrwx 1 root root 38 May 23 13:50 /usr/bin/php56-phar -> /opt/remi/php56/root/usr/bin/phar.phar*
lrwxrwxrwx 1 root root 32 Jun 15 05:33 /usr/bin/php72 -> /opt/remi/php72/root/usr/bin/php*
lrwxrwxrwx 1 root root 36 Jun 15 05:33 /usr/bin/php72-cgi -> /opt/remi/php72/root/usr/bin/php-cgi*
lrwxrwxrwx 1 root root 38 Jun 15 05:33 /usr/bin/php72-phar -> /opt/remi/php72/root/usr/bin/phar.phar*
lrwxrwxrwx 1 root root 32 Jun 15 05:33 /usr/bin/php73 -> /opt/remi/php73/root/usr/bin/php*
lrwxrwxrwx 1 root root 36 Jun 15 05:33 /usr/bin/php73-cgi -> /opt/remi/php73/root/usr/bin/php-cgi*
lrwxrwxrwx 1 root root 38 Jun 15 05:33 /usr/bin/php73-phar -> /opt/remi/php73/root/usr/bin/phar.phar*

root@web01 ~# yum info php; yum info php54-php; yum info php56-php; yum info php72-php; yum info php73-php
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.wd6.net
  • epel: mirror.nl.leaseweb.net
  • extras: mirror.ams1.nl.leaseweb.net
  • fasttrack: mirror.hostnet.nl
  • remi-safe: mirror.serverion.com
  • updates: mirror.ams1.nl.leaseweb.net
    Available Packages
    Name : php
    Arch : x86_64
    Version : 5.3.3
    Release : 50.el6_10
    Size : 1.1 M
    Repo : updates
    Summary : PHP scripting language for creating dynamic web sites
    URL : http://www.php.net/
    License : PHP
    Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
    : easy for developers to write dynamically generated webpages. PHP also
    : offers built-in database integration for several commercial and
    : non-commercial database management systems, so writing a
    : database-enabled webpage with PHP is fairly simple. The most common
    : use of PHP coding is probably as a replacement for CGI scripts.
    :
    : The php package contains the module which adds support for the PHP
    : language to Apache HTTP Server.

Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.wd6.net
  • epel: mirror.nl.leaseweb.net
  • extras: mirrors.supportex.net
  • fasttrack: mirror.hostnet.nl
  • remi-safe: mirror.serverion.com
  • updates: mirror.ams1.nl.leaseweb.net
    Installed Packages
    Name : php54-php
    Arch : x86_64
    Version : 5.4.45
    Release : 18.el6.remi
    Size : 4.6 M
    Repo : installed
    From repo : remi-safe
    Summary : PHP scripting language for creating dynamic web sites
    URL : http://www.php.net/
    License : PHP and Zend and BSD
    Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
    : easy for developers to write dynamically generated web pages. PHP also
    : offers built-in database integration for several commercial and
    : non-commercial database management systems, so writing a
    : database-enabled webpage with PHP is fairly simple. The most common
    : use of PHP coding is probably as a replacement for CGI scripts.
    :
    : This package contains the module (often referred to as mod_php)
    : which adds support for the PHP language to system Apache HTTP Server.

Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.wd6.net
  • epel: mirror.nl.leaseweb.net
  • extras: mirror.ams1.nl.leaseweb.net
  • fasttrack: mirror.hostnet.nl
  • remi-safe: mirror.serverion.com
  • updates: mirror.ams1.nl.leaseweb.net
    Installed Packages
    Name : php56-php
    Arch : x86_64
    Version : 5.6.40
    Release : 21.el6.remi
    Size : 4.4 M
    Repo : installed
    From repo : remi-safe
    Summary : PHP scripting language for creating dynamic web sites
    URL : http://www.php.net/
    License : PHP and Zend and BSD and MIT and ASL 1.0
    Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
    : easy for developers to write dynamically generated web pages. PHP also
    : offers built-in database integration for several commercial and
    : non-commercial database management systems, so writing a
    : database-enabled webpage with PHP is fairly simple. The most common
    : use of PHP coding is probably as a replacement for CGI scripts.
    :
    : This package contains the module (often referred to as mod_php)
    : which adds support for the PHP language to system Apache HTTP Server.

Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.wd6.net
  • epel: mirror.nl.leaseweb.net
  • extras: mirror.ams1.nl.leaseweb.net
  • fasttrack: mirror.hostnet.nl
  • remi-safe: mirror.serverion.com
  • updates: mirror.ams1.nl.leaseweb.net
    Installed Packages
    Name : php72-php
    Arch : x86_64
    Version : 7.2.31
    Release : 2.el6.remi
    Size : 4.6 M
    Repo : installed
    From repo : remi-safe
    Summary : PHP scripting language for creating dynamic web sites
    URL : http://www.php.net/
    License : PHP and Zend and BSD and MIT and ASL 1.0 and NCSA
    Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
    : easy for developers to write dynamically generated web pages. PHP also
    : offers built-in database integration for several commercial and
    : non-commercial database management systems, so writing a
    : database-enabled webpage with PHP is fairly simple. The most common
    : use of PHP coding is probably as a replacement for CGI scripts.
    :
    : This package contains the module (often referred to as mod_php)
    : which adds support for the PHP language to system Apache HTTP Server.

Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.wd6.net
  • epel: mirror.nl.leaseweb.net
  • extras: mirror.ams1.nl.leaseweb.net
  • fasttrack: mirrors.xtom.nl
  • remi-safe: mirror.serverion.com
  • updates: mirrors.xtom.nl
    Available Packages
    Name : php73-php
    Arch : x86_64
    Version : 7.3.19
    Release : 1.el6.remi
    Size : 1.5 M
    Repo : remi-safe
    Summary : PHP scripting language for creating dynamic web sites
    URL : http://www.php.net/
    License : PHP and Zend and BSD and MIT and ASL 1.0 and NCSA
    Description : PHP is an HTML-embedded scripting language. PHP attempts to make it
    : easy for developers to write dynamically generated web pages. PHP also
    : offers built-in database integration for several commercial and
    : non-commercial database management systems, so writing a
    : database-enabled webpage with PHP is fairly simple. The most common
    : use of PHP coding is probably as a replacement for CGI scripts.
    :
    : This package contains the module (often referred to as mod_php)
    : which adds support for the PHP language to system Apache HTTP Server.

root@web01 ~# virtualmin list-php-versions
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = “UTF-8”,
LANG = (unset)
are supported and installed on your system.
perl: warning: Falling back to the standard locale (“C”).
Version Path


5.4 /usr/bin/php54-cgi
5.6 /usr/bin/php56-cgi
7.2 /usr/bin/php72-cgi
7.3 /usr/bin/php73-cgi

Also when navigating to System Settings > Server Templates > PHP settings I see the 4 versions, with an option to set a template file. So my guess is the templates for 7.2 and 7.3 are missing. Where does virtualmin store them?

Fixed it. It appeared that in both /opt/remi/php72 and /opt/remi/php73 the root/etc folder was missing

Cool! Appreciate the update. I was beginning to wonder if you had a grip on your PHP installs but turns out you definitely do.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.