Hello,
I did a couple of tries to get PHP7 working 100% correctly on VirtualMin, but I failed.
What are the official instructions (if they exist) to get Virtualmin working 100% correctly with CentOS and PHP7? I prefer the Software Collections way, (so you be able to switch!)
I tried lots of guides and tutorials, even older ones which are pre-virtualmin 5. Now Virtualmin 5 exists and it problably changed. I am looking for the best way, I hope someone can help! (Virtualmin + CentOS or Debian is no problem, just PHP7!)
What I tried:
CentOS7 minimal install. Yum update/upgrade. Reboot
Setup ssh.
Install Virtualmin.
Then
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install php70
Virtualmin detects PHP7 and I choose it as default. But Apache fails to start after installing and choosing PHP7.
Maybe this isn't the right way. I hope someone can tell me the best way.
Thanks in advance!
Howdy,
I would actually try installing PHP 7 alongside your existing PHP version using the software collections repository.
I wouldn't recommend any third party repositories, as those can cause some trouble.
If you have trouble using the software collections repository, let us know the details of the issue you're seeing.
Also, there's details for using the software collections repo here:
https://www.virtualmin.com/documentation/web/multiplephp
Thanks for your fast reply.
I tried it again and it's working now.
This is what I did:
I used Remi repo and PHP7 seems to work perfect. This is what I did (if someone sees something bad, just say because I am not an 100% sure if it is perfect, but here it works).
yum install scl-utils
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install php70
yum install php70-php-mysqlnd
yum install php70-php-curl
yum install php70-php-simplexml
yum install php70-php-devel php70-php-gd php70-php-json php70-php-mcrypt php70-php-mbstring php70-php-opcache php70-php-pear php70-php-pecl-apcu php70-php-pecl-geoip php70-php-pecl-imagick php70-php-pecl-json-post php70-php-pecl-memcache php70-php-pecl-xmldiff php70-php-pecl-zip php70-php-pspell php70-php-soap php70-php-tidy php70-php-xml php70-php-xmlrpc
With this you have PHP7 and all important extensions running next to the other PHP versions!
If anyone sees room for improvement, then I am very interested. Would be good information on this topic.
And I know it would be better to not use third party repos, but I could not find PHP7 for CentOS 7.2 then. Is it correct you only can get this with a third party (Remi) repo?
Also I hope it wasn't a bad choice to choose this repo.
So if i understand you right php70 works for you now when you run this commands?
Yes, after these commands it was installed properly and it's running very well!
I am really happy with VirtualMin (and PHP7).
I installed PHP7 on Centos 7 with NGINX. Then installed Virtualmin/webmin pro. After some debugging everything appears to be working except use of PHP 7 as the default PHP version. I have PHP 5.4.16 and PHP 7 (as per latest update) installed. Virtual servers or sub-servers that are set up using (default) server template with highest PHP version selected results in the server(s) beinng setup using PHP 5.4.16 rather than PHP7. Attempts to select the PHP version using Server Configuration> PHP Versions results in the mentioned "Error
Website options cannot be edited, as no Apache virtual host for yourserver.com port 80 was found!" message.
I am considering uninstalling PHP 5.4.16 or, alternatively, upgrading that version to a later PHP 5 version that is compatible with PHPMyadmin, Joomla, and other application scripts that require higher than 5.4.
Advice on how to proceed to fix this impass would be appreciated.
I got everything working on Ubuntu 16.04 with this, https://tjosm.com/4937/install-virtualmin-nginx-php-7-mariadb-ubuntu-16-04/
I suggest you installing Virtualmin first with the script and then installing Nginx. I don't have much experience with CentOS, but I think the default php version is 7. But I might be wrong.
I provide FREE Server Management Services in exchange of money
guys centos is not working properly with standard install.. even from forums posts - why bother to support it at all.. it does not meet requirements even after fresh install.. php7 is buggy and not officially released yet @ freddy63.. means you will have a troubles.
Configuring/troubleshooting Debian servers is always great fun
Ubuntu 16.04 now ships with PHP 7. I'm using PHP 7 on my Ubuntu 14.04 server. It's working I don't have a doubt about that.
I provide FREE Server Management Services in exchange of money
ah I see.. well, as I said its not ready , was not released yet to be used as an stable and if you will have look around net and this forums - you will found out that it is not working very well.. :) I would say, if your standard php version shipped with your os is working then use that.. no issues at all..... good luck.
Configuring/troubleshooting Debian servers is always great fun
But I installed Virtualmin yesterday on Centos7 wthout any issues
Centos fine with me.
Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.
Centos is the most widely used linux for servers .. it is slower to officially support new capabilities because stability is prized and, probably, because of inertia. I have PHP7 working on Centos 6.8 without any problems and with wider support for applications than PHP5.x However, I thought it was time to shift to Centos 7 as it has been out for some time, over a year and a half and it comes with MariadB. The major problem is lack of experience on the platform including lack of documentation for specific software stacks such as Centos 7, MariadB 10, NGINX, PHP7 with Virtualmin/Webmin/Cloudmin.
It looks like the issue I am having has to do with sequence of installation. I will first try uninstalling PHP 5.4 and PHP 7 and then reinstall PHP7. That may not be the best or easiest thing to do but I am curious to see if it works. Then I will do a fresh install of Centos 7, install needed repos and upgrades, and then follow the sequence that others have found to work. If I find irregularities or information left out, I will feed that back.
I upgraded the Centos 7 standard to PHP5.6 and then installed PHP7 on the VPS using the steps found here. I then installed NGNX, CSF (Configserver Firewall), and all appear to be working.
Get a server running fine with PHP7 is one thing, what about the software like web scripts etc etc.
Would love to know scripts that are running fine with PHP7
Chaos Reigns Within, Reflect, Repent and Reboot, Order Shall Return.
I currently have upgraded to php 7 , and as of right now , the scripts don't work or upgrade as they are all wanting to use php 5.X dependencies.
Not sure if there is a fix for this.
My experience with PHP7 is limited to Joomla 3.6.2, PHPmyAdmin. All J extensions work.
I have installed Virtualmin v6 LEMP stack. Then I tried various upgrades of PHP including both replacements with Remi's PHP7.1 and also multiple PHP versions. Some observations:
It would be great if Virtualmin/Webmin fully supported NGINX with multiple versions of PHP so that the configuration could be chosen/changed after the install of a virtual server. The PHP selection does not work. NGINX with PHP7 have become a mainstream choice alongside LAMP. More new servers are reportedly installed using LEMP/NGINX and PHP7/7.1 use has accelerated.
Howdy,
PHP should work on any supported distro out of the box.
As far as using PHP7 -- PHP7 is indeed supported. It comes with Ubuntu 16.04 by default.
However, switching from PHP5 to PHP7 on an existing domain may require some tweaking. You might want to try switching the PHP Execution Mode to something like mod_php, then back to FCGID -- which will re-generate the Apache config and PHP wrapper scripts.
However, I wouldn't just upgrade to PHP7 on CentOS. Instead, I would install it side-by-side with the existing PHP version, which can be done with these instructions here:
https://www.virtualmin.com/documentation/web/multiplephp
Now, to my knowledge PHP7 isn't yet available in that repo... but there's a test version of that available, which is described here:
http://blog.remirepo.net/post/2015/03/25/PHP-7.0-as-Software-Collection
The remi repo blog now shows php7 as 'remi-safe' repository release, elevated from the 'test' repo. Remi's blog says " php5.5 is Dead'. a pretty bold statement, and says it is no longer being maintained. However, the site continues to support downloads.
Just an update , switching the PHP Execution Mode to something like mod_php, then back to FCGID, worked. and everything updated.
Thank you
I'm chiming in here because I am having a related issue. I posted a thread here : https://www.virtualmin.com/node/41976
I have CentOS 7.2 / Virtualmin , PHP 5.4.16 (BASE PHP) / same as outputted on php -v (terminal) and it's the only PHP version that is displayed in any of my Virtual Server's phpinfo.php file. The re-check configuration doesn't detect php71* packages which are installed successfully. But even disregarding the PHP 7.1 detection...
I have my Virtual Servers setup for a PHP 5.6.5 template and it's only outputting PHP 5.4.16 ... I even tried the above solution for Switching Website Options on each Virtual Server to mod_php and then back to FCGID, saved, restarted httpd & php-fpm . No Dice.
Anything would be greatly appreciated.
Thanks Elite Linux Badasses :)
Update:
I found a tutorial here: https://www.server-world.info/en/note?os=CentOS_7&p=php71
Then hit the terminal and knocked these keysets out:
[root@MaximumLightning brandon]# php -v PHP 7.1.0RC1 (cli) (built: Sep 1 2016 14:09:54) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
And phpinfo.php outputs as the following: (on the PHP 5.6.5 configured Virtual Server)
PHP Version 7.1.0RC1
... Guessing Solved. However, I don't know how versatile this is or if it's proper.
Hope it helps someone.
P.S: In Virtualmin , when I run Re-Check configuration it outputs :
The following PHP versions are available : 5.4.16 (/bin/php-cgi), 5.6.5 (/opt/rh/php56/root/usr/bin/php-cgi)
Not even acknowledging the installed and active PHP 71.0RC1
Anyone? :)
Sorry for opening an old thread. I want to install PHP7 alongside older versions but following the SCL route the range of PHP modules for PHP7 is pretty limited.
Does @cognosco's method using Remi and yum install php70.. etc still give me the ability to allocate PHP version per virtual server?
Many thanks
Hi, the author of the topic here. This same config is still running very well here! It's still my main server and one year and a lot of updates later it is still running strong :)
Thank you for the reply cognosco - it's good to hear this is running so well for you. What I'm wondering is if you still have the ability to allocate PHP version per virtual server?: Virtualmin > Server Configuration > PHP Versions > Version
Yes, this does still work perfect. I can choose between 5.6 and 7.
Perfect - thanks again for responding to an older thread :)
Hello, when the execution mode is on PHP-FPM, how to choose the php version per virtual server? At the moment this is not possible by Virtualmin option and this is an issue in my opinion... thanks
I suggest you must install virtualmin first.
spy hunter arcade