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!)
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 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).
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.
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 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.
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.
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.
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.
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:
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.