CENTOS 7.X - PHP 5.4.16 / PHP 5.6.5 - Stuck on 5.4x for Virtual Servers!

6 posts / 0 new
Last post
#1 Sat, 09/10/2016 - 05:02
ninjaboxes

CENTOS 7.X - PHP 5.4.16 / PHP 5.6.5 - Stuck on 5.4x for Virtual Servers!

CENTOS 7.X - PHP 5.4.16 / PHP 5.6.5 - Stuck on 5.4x for Virtual Servers!

Hello there Experts,

I have a very nice server setup that I am working on turning into a powerhouse development web server.

Using CentOS 7.2

I originally had it setup with the multiple versions of PHP (had them all installed w/ custom PHP Version Templates) ... however something went wrong which I cannot trace... after a system update and some installed packages.

Since then I have removed everything PHP and PhpMyAdmin (which no longer works) lol

This is my situation.

[root@MaximumLightning php5.6]# php -v PHP 5.4.16 (cli) (built: Aug 11 2016 21:24:59) Copyright (c) 1997-2013 The PHP Group Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Two Versions of PHP

  • 5.4.16
  • 5.6.5

I didn't use to have /phpmyadmin in my virtual server's home directory (it is now...) and it's giving me the following error:

http://localhost/phpmyadmin/index.php

OUTPUT:

PHP 5.5+ is required. Currently installed version is: 5.4.16

Now I have set all the settings in my Virtual Server settings to use 5.6 ... however when using phpinfo.php , no matter how many times I try reconfiguring or restarting services ... I get the following output:

PHP Version 5.4.16

System Linux MaximumLightning.com 3.10.0-327.28.3.el7.x86_64 #1 SMP Thu Aug 18 19:05:49 UTC 2016 x86_64 , etc...

What do I need to do to obsolete 5.4 and have 5.6.5 default for all my Virtual Servers. I'm trying to be able to use 5.6 & 7 ... but if I cannot get 5.6 working I don't want to complicate my issues further.

Also I dont think phpmyadmin should be in one of my virtual server home directory (when I tried selecting install scripts - phpmyadmin - install options - it outputted with permission errors.)

I figure I screwed up somewhere big.

Any help and guidance would be greatly appreciated.

Thanks guys!

Sat, 09/10/2016 - 05:13
ninjaboxes

50% Resolved: - [Update]

Regarding phpmyadmin ... I had the wrong Alias set in /etc/httpd/conf.d/phpMyAdmin.conf

  • Corrected the entries
  • Saved
  • Restarted HTTPD & PHP-FPM
  • phpmyadmin launches like a charm.

However, same issue with phpinfo.php displaying only 5.6 for any of my Virtual Servers.

Sat, 09/10/2016 - 10:28
andreychek

Howdy,

Glad you got phpMyAdmin working!

Regarding PHP -- for any given Virtual Server, you would need to tell Virtualmin what PHP version it should be using... either PHP 5.4, or PHP 5.6. It wouldn't be both simultaneously.

If you go into System Settings -> Re-Check Config, does Virtualmin detect both PHP versions?

-Eric

Sat, 09/10/2016 - 16:25 (Reply to #3)
ninjaboxes

It's actually not allowing me to do Re-Check config... it says that's it's not setup correctly with DNS / BIND. Since i'm using DHCP configuration and custom set /etc/host files.

Is this bad practice? Is there an easier way to accomplish what I am trying to do? (host domains & sub domains) locally for development purposes only.

Thank you kindly for your help.

  • Brandon
Sat, 09/10/2016 - 16:33
ninjaboxes

Okay. I updated my /etc/resolv.conf and added 127.0.0.1 to the nameservers. I now get the following output when running a re-check config.

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..

Your system has 31.21 GB of memory, which is at or above the Virtualmin recommended minimum of 256 MB. BIND DNS server is installed, and the system is configured to use it. Mail server Postfix is installed and configured. Postfix can support per-domain outgoing IP addresses, but is not currently configured to do so. This can be setup in the Postfix Mailserver module. Apache is installed. The following PHP versions are available : 5.4.16 (/bin/php-cgi), 5.6.5 (/opt/rh/php56/root/usr/bin/php-cgi) Webalizer is installed. Apache is configured to host SSL websites. MySQL is installed and running. ProFTPD is installed. Logrotate is installed. SpamAssassin and Procmail are installed and configured for use. ClamAV is installed and assumed to be running. Plugin DAV Login is installed OK. Plugin AWstats reporting is installed OK. Plugin Protected web directories is installed OK. Using network interface enp7s0 for virtual IPs. Default IPv4 address for virtual servers is 192.168.254.24. Default IP address is set to 192.168.254.24, but the detected external address is actually 50.34.161.20. This is typically the result of being behind a NAT firewall, and should be corrected on the module configuration page. Both user and group quotas are enabled for home and email directories. All commands needed to create and restore backups are installed. The selected package management and update systems are installed OK.

.. your system is ready for use by Virtualmin.

Updating Virtualmin library pre-load settings .. .. done

Sun, 09/18/2016 - 23:38
CraigL
CraigL's picture

I linked here from another post talking about PHP7 rather than 5.6 but this may help with both. If you are still having trouble seeing PHP7 as an option for virtual servers, you should select a virtual server, select 'Edit Virtual Server' then click Save Virtual Server. This is required for any VS that were created prior to installing the remi PHP7 release. You also may need to create a symlink to the php56 folder in /opt/rh as Webmin used to require the folder to be called php56 for it to be recognised... my folder looks like this

[opt]# ls
nable  remi  rh
[rh]# ls -l
drwxr-xr-x. 3 root root 4096 Aug  1  2015 httpd24
drwxr-xr-x  3 root root 4096 Aug  2  2015 php54
drwxr-xr-x. 3 root root 4096 Aug  2  2015 php55
lrwxrwxrwx  1 root root    8 Dec 23  2015 php56 -> rh-php56
lrwxrwxrwx  1 root root   15 Jan  4  2016 php56remi -> /opt/remi/php56
drwxr-xr-x  3 root root 4096 Feb 18  2016 python27
drwxr-xr-x. 6 root root 4096 Aug  1  2015 rh-php56

php56 is just a link to rh-php56 so that Webmin/Virtualmin can recognise it.

In my remi folder, I have php70 which Webmin/Virtualmin seemed to find without my intervention.

I have php5.4, 5.5, 5.6 and 7.0 installed for various website compatibility issues (most run on 7 fine - most are Joomla but we have some WordPress and a couple of other oddball CMS as well). App PHP versions are listed in Virtualmin->Services for each site without issue. I have this set of PHP7 packages installed...

Installed Packages
php70.x86_64                                        1.0-5.el6.remi                                         @remi-safe
php70-php-bcmath.x86_64                             7.0.11-1.el6.remi                                      @remi-safe
php70-php-cli.x86_64                                7.0.11-1.el6.remi                                      @remi-safe
php70-php-common.x86_64                             7.0.11-1.el6.remi                                      @remi-safe
php70-php-dba.x86_64                                7.0.11-1.el6.remi                                      @remi-safe
php70-php-gd.x86_64                                 7.0.11-1.el6.remi                                      @remi-safe
php70-php-imap.x86_64                               7.0.11-1.el6.remi                                      @remi-safe
php70-php-intl.x86_64                               7.0.11-1.el6.remi                                      @remi-safe
php70-php-json.x86_64                               7.0.11-1.el6.remi                                      @remi-safe
php70-php-ldap.x86_64                               7.0.11-1.el6.remi                                      @remi-safe
php70-php-mbstring.x86_64                           7.0.11-1.el6.remi                                      @remi-safe
php70-php-mcrypt.x86_64                             7.0.11-1.el6.remi                                      @remi-safe
php70-php-mysqlnd.x86_64                            7.0.11-1.el6.remi                                      @remi-safe
php70-php-odbc.x86_64                               7.0.11-1.el6.remi                                      @remi-safe
php70-php-pdo.x86_64                                7.0.11-1.el6.remi                                      @remi-safe
php70-php-pecl-mysql.x86_64                         1.0.0-0.9.20151007git294ce3b.el6.remi                  @remi-safe
php70-php-pecl-oauth.x86_64                         2.0.2-1.el6.remi                                       @remi-safe
php70-php-pecl-zip.x86_64                           1.13.4-1.el6.remi                                      @remi-safe
php70-php-process.x86_64                            7.0.11-1.el6.remi                                      @remi-safe
php70-php-snmp.x86_64                               7.0.11-1.el6.remi                                      @remi-safe
php70-php-soap.x86_64                               7.0.11-1.el6.remi                                      @remi-safe
php70-php-tidy.x86_64                               7.0.11-1.el6.remi                                      @remi-safe
php70-php-xml.x86_64                                7.0.11-1.el6.remi                                      @remi-safe
php70-php-xmlrpc.x86_64                             7.0.11-1.el6.remi                                      @remi-safe
php70-runtime.x86_64                                1.0-5.el6.remi                                         @remi-safe

Craig Lawrie IT Services Manager DNG Technology