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
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!
50% Resolved: - [Update]
Regarding phpmyadmin ... I had the wrong Alias set in /etc/httpd/conf.d/phpMyAdmin.conf
However, same issue with phpinfo.php displaying only 5.6 for any of my Virtual Servers.
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
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.
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 is ready for use by Virtualmin.
Updating Virtualmin library pre-load settings .. .. done
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