[SOLVED] "Centos 7", Wordpress, php upgrade and phpMyAdmin
CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Centos 7.x, Fedora (one version behind latest)
Posts: 141
Rep:
"Centos 7", Wordpress, php upgrade and phpMyAdmin
Issue:
I have Centos 7 on a server, as well as Wordpress (latest 5.1), and phpMyAdmin.
Wordpress would like me to upgrade php on my server (for security, speed and compatibility reasons), however, I am given the impression that phpMyAdmin isn't updated to work with the latest php 7.
Question:
I am not sure what to do...
How have others fared with this combination? What are you doing to remedy the problem?
It mentions that one should give Centos 7 time to naturally switch to php7, because phpMyAdmin does not yet support the upgrade.
I've looked at the phyMyAdmin website and the more recent versions support php7...
Now, I guess I have to figure out what versions of each software I am running. (ie php and phpMyAdmin). I'm not quite sure why Centos 7 - with the latest yum updates - hasn't yet switched use of older php versions...
i'm sure centos is security-aware and provides updates with security patches, so no reason to worry about php(admin).
if a software is installed via centos' package management, i would leave it at that and not mess with it, i.e. allow the natural upgrade process to do its thing.
that said, it's possible that centos has something akin to debian backports...
Distribution: Centos 7.x, Fedora (one version behind latest)
Posts: 141
Original Poster
Rep:
Versions I am Running:
Logged in to phpMyAdmin and found the following information:
I am running phpMyAdmin 4.4.15.10.
I am running Apache/2.4.6 (CentOS) and PHP/5.4.16
Warning:
It gave me the following warning:
Your PHP MySQL library version 5.6.37 differs from your MySQL server version 5.7.25. This may cause unpredictable behavior.
Question:
The more I delve into these things, the more I end up feeling that there is a downward spiral of irreducible complexity going on here.
How do I avoid getting too confused about versions I've installed and cross software compatibility? And then not have to worry about incompatible updates?
Your PHP MySQL library version 5.6.37 differs from your MySQL server version 5.7.25. This may cause unpredictable behavior.
I have that same warning on my server. phpMyAdmin works just fine. That warning has nothing to do with the version of php. I may run it down someday, but see below.*
Code:
# php -v
PHP 5.4.16
That server is CentOS Linux 7.6.1810
Quote:
Originally Posted by 6th_sense
Wordpress is very unforgiving of the use of older PHP versions - at least if you believe what it tells you.
So, I have to install the latest php version - what is going to break? No idea.
The WordPress sites on my server also work just fine, as far as I know (they're customer maintained, but I've heard no complaints)
Recommend you start with *"If it ain't broke, don't fix it" That is, don't change php just because you think you might need to...
I have the same warning on my CentOS 6 VPS at my hosting provider. I'm looking at a server migration sometime this year, because my hosting provider is deprecating CentOS 6. The CentOS 6 is up to date, per yum upgrade.
I've chosen not to panic and do nothing as long as my blog keeps working until the server migration.
My opinion--er, hope--is that it unlikely that Wordpress would choose to break likely thousands, maybe tens of thousands of Wordpress sites which may not be in a position to upgrade the php on their servers because they are on commercial ISPs and shared hosting plans.
Distribution: Centos 7.x, Fedora (one version behind latest)
Posts: 141
Original Poster
Rep:
Hi guys,
Thank You:
Thank you so-o-o much for those words of support.... It is a relief to know that I am not alone. I agree in the hope that Wordpress won't enforce the upgrade - even though the latest version of Centos hasn't by default upgraded the PHP version.
PHP 7 apparently somewhat incompatible with PHP 5 standards:
I did read about PHP 7 and the changes it brings about that are somewhat incompatible with PHP 5.xx - the changes seem to make sense... and one cannot blame Wordpress developpers for wishing to change to the latest greatest PHP version, though it might break OSes like Centos - that attempts to keep older things alive for long periods of time - somewhat out of line with the greater directions of Linux endeavours.
Warning Message I See:
On the dashboard area of Wordpress, I see the following message:
" !PHP Update Required
WordPress has detected that your site is running on an insecure version of PHP.
What is PHP and how does it affect my site?
PHP is the programming language we use to build and maintain WordPress. Newer versions of PHP are both faster and more secure, so updating will have a positive effect on your site’s performance."
They also provide a learn more about updating PHP, which outlines why it is important to update PHP here:
=> Reading that might convince people that Wordpress isn't really committed to keeping Centos installations alive as much as it is committed to staying up-to-date with the latest greatest...
=> However, they do provide some warnings about plugins that aren't compatible...
What An Admin Friend of Mine Did:
One of my friends who is an administrator/co-worker at the place I work upgraded PHP on the work servers (running Centos, but they don't have Wordpress running just yet) - but he also put the yum repository in - and he says he hasn't had any problems - when yum update is run, the updates for PHP is maintained from those repositories. (I am working on my home server, independently).
I guess what you guys are saying casts doubt on whether that is a safe bet. ie. "don't change it if ain't broke." I too find myself keeping my fingers crossed on this one.
Distribution: Centos 7.x, Fedora (one version behind latest)
Posts: 141
Original Poster
Rep:
Hi guys,
Spoke with my friend the administrator and he mentioned that it is possible to test websites with virtual hosts and use different versions of php for each to test whether the website will break or not.
When things come down to the wire - though I hope it doesn't - this might provide a possible test-bed for figuring out what the problems with an upgrade would be, prior to performing the upgrade on the actual site.
I do wish to find out how that works... hopefully ahead of time and not because of an incompatibility issue that crops up.
For now, I feel I should mark this thread as [SOLVED].
sounds like wordpress is asking you (nay, demanding) to break your system.
Quote:
Originally Posted by 6th_sense
Your PHP MySQL library version 5.6.37 differs from your MySQL server version 5.7.25.
so how did you install each of these softwares?
if you installed them both through your distro's package management, and your distro is up-to-date, this shouldn't happen.
so:
- check what installed these
- update your system
Quote:
Originally Posted by 6th_sense
Don't actually remember what was installed by the Centos Package Manager and what wasn't - I keep tonnes of docs to track the changes I made/make....
you don't need to do this manually.
that's what package management is there for - it keeps track of these things, there's alist of installed packages, a history, a log, all accessible via simple commands.
Wordpress is very unforgiving of the use of older PHP versions - at least if you believe what it tells you.
So, I have to install the latest php version - what is going to break? No idea.
Set up a staging environment, such as a VM or something. Then do the upgrade there and see what breaks. Then once you know what to expect and how to solution it, you can do it to the real site that you have.
Distribution: Centos 7.x, Fedora (one version behind latest)
Posts: 141
Original Poster
Rep:
Thank you both - dieselboy and Ondoho.
I am working on the yum command needed to let me know what installed the php mysql library.
Ideally I could set up a staging environment through a VM - I should know how - but, time is quite limited for me... It is apparently quite easy, once you've done these things - but, it is getting there while simultaneously juggling the other priorities - that is quite tricky.
I've also searched online regarding the incompatibility.... there are numerous answers to this question.
Googled "php mysql library version linux"
Some places mention that there is no problem if this is left alone. Others mention installing php-mysqlnd (native driver) and yet others suggest using php-mysqli (which seems to be part of other packages such as php-mysql or php-mysqlnd).
Code:
# yum provides php-mysqli
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.layeronline.com
* epel: epel.mirror.constant.com
* extras: centos.mirror.ca.planethoster.net
* updates: centos.mirror.vexxhost.com
php-mysql-5.4.16-46.el7.x86_64 : A module for PHP applications that use MySQL databases
Repo : base
Matched from:
Provides : php-mysqli = 5.4.16-46.el7
php-mysqlnd-5.4.16-46.el7.x86_64 : A module for PHP applications that use MySQL databases
Repo : base
Matched from:
Provides : php-mysqli = 5.4.16-46.el7
php-mysql-5.4.16-46.el7.x86_64 : A module for PHP applications that use MySQL databases
Repo : @base
Matched from:
Provides : php-mysqli = 5.4.16-46.el7
Tested A Possibility:
Tried installing the Native driver - but I got the following error:
Error: php-mysql conflicts with php-mysqlnd-5.4.16-46.el7.x86_64
Other Mentions of Fixes:
Other people mention that as of PHP 5.3 onwards the native driver for mysql is built in to PHP.
Unsure What to Pursue Now:
This is where I'm left now...
Last edited by 6th_sense; 03-18-2019 at 01:07 PM.
Reason: leave unsolved?
5.6.37 is not mentioned in that output.
in fact you seem to have a different version installed.
have you manually installed 5.6.37, overriding the repo's version?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.