CentOS7 php7.0.10 (Multiple PHP Versions) need help

16 posts / 0 new
Last post
#1 Thu, 04/06/2017 - 17:37
raykai

CentOS7 php7.0.10 (Multiple PHP Versions) need help

Hi,

I just fallowed the instructions on this page https://www.virtualmin.com/documentation/web/multiplephp to install php 7.

Its only saying to install the packages rh-php70 rh-php70-php-mysqlnd. I was wandering what the normal common packages list is for php 7.0.10 as im getting many packages missing when ruining apps.

Having a install code for the common packages would be nice.

Thx for your time.

Thu, 04/13/2017 - 16:55
volk

You probably are correct on this. Almost no script or application will correctly install because there is at least one thing missing in PHP, zip or mcrypt or just anything.

The instructions probably should be a more complete because all that does is install PHP7 but nothing will actually work with just plain PHP 7.

You should probably open a bug or feature request explaining that once PHP 7 is installed almost all scripts fail to install because something is missing.

Thu, 04/13/2017 - 19:18
Diabolico
Diabolico's picture

Just install missing modules because no one knows what are you using or what you will need. That instructions are perfectly fine and its up to the server owner to install additional PHP modules. To make instructions to install most of the "useful" things it will only push lazy people or the one who dont know anything about server management to install a whole bunch of modules without any need for them.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Thu, 04/13/2017 - 19:29 (Reply to #3)
volk

Sure, but people buying the PRO and then trying to install some script, it will absolutely fail. They expect the provided scripts in the paid version to work.

You can't have all modules in PHP for every possible app, but the basics should be included at least for the most popular applications. I don't mind installing them manually but I can only guess how this can cause an issue for newbies. In particular if they are just following the documentation.

Fri, 04/14/2017 - 01:15
Diabolico
Diabolico's picture
but I can only guess how this can cause an issue for newbies

Sorry but "newbies" should never manage a server what is facing the web. Its just recipe for disaster.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Fri, 04/14/2017 - 01:43
volk

You probably are right, but if you read some of the posts here, it seems to me that some people not only don't ever touched Linux before but know little to nothing about basic computer operations.

Fri, 04/14/2017 - 02:23
geocrasher

I have a server setup that I use for my customers whose servers I manage. I am using this PHP setup, adapted from that very link you gave, and it has been working well for me. It does have most modules, and I see no reason to be choosy over which modules you installed. Better to have it and not need it than need it and not have it. I put the instructions on my github account for you:

https://raw.githubusercontent.com/corneliusroot/Virtualmin/master/PHP%20...

Fri, 04/14/2017 - 02:35 (Reply to #7)
volk

Sure but you are then using a third party repository. The official documentation in Virtualmin correctly does not suggest that. The PHP 7 instructions are for the officially supported method that Red Hat provides now for version 7 and hence it is also available with CentOS 7. That is the official way to add extra packages.

There is always a security risk when it comes to using third party repos with your server, you have to trust that party packages now, and they could potentially also cause conflicts in the future with upgrades and other official RPMs. Remi seems quite popular, but this is still something to note.

As for installing all modules, you should not install anything you are not going to use on your sites. If you provide shared hosting to other users, you usually have installed a lot of modules, at least the common ones as you are not aware which applications and scripts your users need. But if you are using Virtualmin for your websites you should only install the ones you require. The more you install, the more each PHP process is going to need regarding memory.

Fri, 04/14/2017 - 02:44
geocrasher

I can't say I disagree with anything you've said, Volk. There's always risk involved. Indeed, my build is for hosting not just my things but other folks sites using various CMS's (Joomla, OpenCart, WordPress etc) and so broad support is what's needed.

If using the Remi repo was ever an issue, I could just as easily rip it all out and build it with something else. For now, it's a solution I've been using for months without issues. Being "officially supported" isn't high on my list of needs, to be frank. If, on the other hand, it was known to cause breakage and dire results, I'd feel differently. But for now it works and gives me the flexibility I and my customers want. YMMV :)

Fri, 04/14/2017 - 09:22
Diabolico
Diabolico's picture

Jumping in just to comment about Remi. Using it for quite some time but to make it clear i upgraded my PHP to 7.1 (Centos 7) and not running side by side. Until now everything works great and way faster. Didnt go with multiple PHP versions because frankly there isnt any need for that. If the software doesnt work with PHP 7.# then i will blame the developer of that software and not PHP, because there was a plenty of time to sort everything. At least now with php 7.# you can really see the difference between bad and good coding.

For the rest i agree with Volk and i still stand behind my two post.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Sat, 04/15/2017 - 13:21
geocrasher

The only reason I run multiple versions is because I host people with some older software that won't run on PHP 7.0/7.1. For them I have 5.6, and in extreme cases, 5.4. System default is 5.6. I've also been working in web hosting for a long time and at work we use cPanel, those servers have every version of PHP from 4.4 up! I hope nobody uses them, but they're there in cases of extreme need.

If I were to standardize on one version, it would be the default CentOS 5.6. In fact it was exactly that way until a customer asked me to make php 7.0/7.1 available.

Sun, 04/23/2017 - 14:37
Diabolico
Diabolico's picture

@geocrasher: I get your point, but the improvement between php 5.x and 7.x is immense, plus we are almost mid 2017 and there is no reason some script or software not supporting php 7.x. If there is any then you have full right to blame the incompetence and laziness of the developer(s).

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Mon, 04/24/2017 - 12:32
geocrasher

@Diabolico: There's one more thing to consider: " If there is any then you have full right to blame the incompetence and laziness of the developer(s)..." or customers! When bringing in a new account, I have to accommodate the old software they already have. I have to make those work. Then I work with them to get them upgraded to a modern version. Thankfully there is flexibility, and it's one of the compromises a web host must make in order to gain and retain customers.

Mon, 04/24/2017 - 14:15
Diabolico
Diabolico's picture

@geocrasher: To be honest i never had such problem. In case some client comes to me i always manage to explain the benefits of having newer software, they pay i setup everything and everyone is happy. But i do understand there are some clients who are "cheap" and/or hard to understand what you are trying to explain. Still if i ever encounter such client i will rather reject the job than change my way of doing business. Dont take me wrong, this is how i work and my interpretation of what is best for me and my client, but i'm not saying this is best way for everyone else.

- I often come to the conclusion that my brain has too many tabs open. -
Failing at desktop publishing & graphic design since 1994.

Mon, 04/24/2017 - 14:29
andreychek

Hi guys -- thanks for all your comments and input!

Indeed, everyone has different needs, which is one of our favorite things about Virtualmin -- there's many different ways to set it up.

Some folks do indeed require both PHP 5 and PHP 7 -- and the SCL setup is our recommended way to handle that.

Some folks also wish to go straight PHP 7 -- and the SCL repo can be used for that too (installing both, then just disabling PHP5 support in Virtualmin).

Others prefer the REMI repo -- and while that's not our recommended method, folks have had great success with that, and Virtualmin does happily work with such a setup. Diabolico has a nice tutorial on how to do that.

raykai -- this is your initial post, so I want to get back to your topic :-)

The PHP packages/modules that are necessary depend on your apps. The ones mentioned in the docs you're seeing are a bare minimum of just standard PHP and MySQL support.

What kind of module support are your apps looking for?

Let us know what your apps need, and we can help share the packages necessary for getting those working.

-Eric

Wed, 11/29/2017 - 16:50
Cloud4G

If you have an existing installation that you want to replace or install another version of PHP, it is suggested to view the installed modules for that version so that you know which modules are needed on the other PHP version. For centos, this command provides a lit of installed modules: yum list installed php PHP -m lists module names without version information

Topic locked