I have spent a week searching and trying all sorts of solutions for my problem to no avail.
Here is the scenario:
PHP version 5.4 was installed.
Now installed PHP version 5.6.
System settings - recheck configuration shows:
The following PHP versions are available : 5.4.16 (/bin/php-cgi), 5.6.25 (/opt/rh/php56/root/usr/bin/php-cgi)
System settings - server templates - apache shows:
Apache mod_php and Default PHP version 5.6.25 (5.4 can also be selected on the dropdown)
NOTE: whatever I change here makes no difference - for eg. change to FCGId - still shows Server API : Apache 2.0 Handler (mod_php) even after server reboot.
php -v and phpinfo() shows PHP5.4.
However when I type in:
scl enable rh-php56 bash
Then php -v shows PHP5.6!
but phpinfo() on one domain and Woocommerce on another domain both show PHP5.4
Reboot server and php -v shows PHP5.4 again.
The template located at:
/etc/webmin/virtual-server/templates/1
is empty.
I am running NGINX.
This is my Apache global configuration (/etc/httpd/conf/httpd.conf):
ServerRoot “/etc/httpd”
StartServers 2
MinSpareServers 6
MaxSpareServers 12
MaxClients 30
MaxRequestWorkers 256
MaxRequestsPerChild 3000
Listen :8080
Include conf.modules.d/.conf
User apache
Group apache
ServerAdmin root@localhost
AllowOverride none
Require all denied
DocumentRoot “/var/www/html”
<Directory “/var/www”>
AllowOverride None
# Allow open access:
Require all granted
<Directory “/var/www/html”>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
DirectoryIndex index.html
<Files “.ht*”>
Require all denied
ErrorLog “logs/error_log”
LogLevel warn
LogFormat “%h %l %u %t “%r” %>s %b “%{Referer}i” “%{User-Agent}i”” combined
LogFormat “%h %l %u %t “%r” %>s %b” common
LogFormat “%h %l %u %t “%r” %>s %b “%{Referer}i” “%{User-Agent}i” %I %O” combinedio
CustomLog “logs/access_log” combined
ScriptAlias /cgi-bin/ “/var/www/cgi-bin/”
<Directory “/var/www/cgi-bin”>
AllowOverride None
Options None
Require all granted
TypesConfig /etc/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddDefaultCharset UTF-8
MIMEMagicFile conf/magic
EnableSendfile on
IncludeOptional conf.d/*.conf
SSLProtocol ALL -SSLv2 -SSLv3
SSLCipherSuite ECDHE-RSA-AES256-SHA384:AES256-SHA256:AES256-SHA256:RC4:HIGH:MEDIUM:+TLSv1:+TLSv1.1:+TLSv1.2:!MD5:!ADH:!aNULL:!eNULL:!NULL:!DH:!ADH:!EDH:!AESGCM
ServerTokens Minimal
ServerSignature Off
TraceEnable Off
<VirtualHost 1.2.3.4:8080 [abcdef]:8080>
SuexecUserGroup “#509” “#503”
ServerName lala.net
ServerAlias www.lala.net
ServerAlias webmail.lala.net
ServerAlias admin.lala.net
DocumentRoot /home/lala/public_html
ErrorLog /var/log/virtualmin/lala.net_error_log
CustomLog /var/log/virtualmin/lala.net_access_log combined
ScriptAlias /cgi-bin/ /home/lala/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/lala/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddType application/x-httpd-php5 .php5
<Directory /home/lala/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.lala.net
RewriteRule ^(.) https://lala.net:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.lala.net
RewriteRule ^(.) https://lala.net:10000/ [R]
php_value memory_limit 32M
php_value suhosin.session.encrypt Off
Apache Log files show this on every reboot:
[Thu Jun 08 16:37:41.746759 2017] [core:notice] [pid 9267] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’
[Thu Jun 08 20:00:30.678476 2017] [mpm_prefork:notice] [pid 9267] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Jun 08 20:01:19.281138 2017] [suexec:notice] [pid 4057] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jun 08 20:01:20.005418 2017] [auth_digest:notice] [pid 4057] AH01757: generating secret for digest authentication …
[Thu Jun 08 20:01:20.007244 2017] [lbmethod_heartbeat:notice] [pid 4057] AH02282: No slotmem from mod_heartmonitor
[Thu Jun 08 20:01:23.446113 2017] [mpm_prefork:notice] [pid 4057] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 PHP/5.4.16 SVN/1.7.14 configured – resuming normal operations
[Thu Jun 08 20:01:23.446502 2017] [core:notice] [pid 4057] AH00094: Command line: ‘/usr/sbin/httpd -D FOREGROUND’
Server configuration - PHP versions shows:
This virtual server is using the mod_php execution mode for PHP, such does not allow per-directory version selection.
I do not know if it is Apache or NGINX that is reading the wrong information.
I just cannot change the PHP version at all.
Please help!