LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   "Centos 7", Wordpress, php upgrade and phpMyAdmin (https://www.linuxquestions.org/questions/centos-111/centos-7-wordpress-php-upgrade-and-phpmyadmin-4175650136/)

6th_sense 03-13-2019 08:11 PM

"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?

6th_sense 03-14-2019 04:08 PM

Here is the article that gave me reason to pause:

https://www.digitalocean.com/communi...-7-on-centos-7

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...

ondoho 03-14-2019 04:30 PM

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...

6th_sense 03-14-2019 05:10 PM

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?

6th_sense 03-14-2019 05:29 PM

Hi Ondoho,

Thank you so much for that reply.

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....

Aaaahhhhh! (Grabbing my hair and making like Einstein)

6th_sense 03-14-2019 05:45 PM

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.

scasey 03-14-2019 06:33 PM

Quote:

Originally Posted by 6th_sense (Post 5973938)
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 (Post 5973949)
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...

frankbell 03-14-2019 08:18 PM

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.

6th_sense 03-15-2019 07:54 AM

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:

https://wordpress.org/support/update-php/

=> 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.

6th_sense 03-15-2019 09:50 AM

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].

Regards,

- 6th -

ondoho 03-16-2019 04:35 AM

sounds like wordpress is asking you (nay, demanding) to break your system.
:rolleyes:

Quote:

Originally Posted by 6th_sense (Post 5973938)
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 (Post 5973942)
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.

https://wiki.centos.org/PackageManagement/Yum

dieselboy 03-16-2019 11:48 PM

Quote:

Originally Posted by 6th_sense (Post 5973949)
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.

6th_sense 03-18-2019 10:29 AM

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.

Thank you guys again...

6th_sense 03-18-2019 01:05 PM

Hi Ondoho, [Should I classify this thread as unsolved, or should I be posting this issue as another thread?]

Tried to fix the incompatible issue:

I ran the following command:

Code:

[root@...] # yum list installed | grep mysql
mysql-community-client.x86_64        5.7.25-1.el7                    @mysql57-community
mysql-community-common.x86_64        5.7.25-1.el7                    @mysql57-community
mysql-community-libs.x86_64          5.7.25-1.el7                    @mysql57-community
mysql-community-libs-compat.x86_64  5.7.25-1.el7                    @mysql57-community
mysql-community-server.x86_64        5.7.25-1.el7                    @mysql57-community
mysql57-community-release.noarch    el7-11                          installed
php-mysql.x86_64                    5.4.16-46.el7                    @base

Searched Google (numerous answers):

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...

ondoho 03-18-2019 04:12 PM

Quote:

Originally Posted by 6th_sense (Post 5973938)
Your PHP MySQL library version 5.6.37 differs from your MySQL server version 5.7.25. This may cause unpredictable behavior.

Quote:

Originally Posted by 6th_sense (Post 5975143)
Code:

[root@...] # yum list installed | grep mysql
mysql-community-client.x86_64        5.7.25-1.el7                    @mysql57-community
mysql-community-common.x86_64        5.7.25-1.el7                    @mysql57-community
mysql-community-libs.x86_64          5.7.25-1.el7                    @mysql57-community
mysql-community-libs-compat.x86_64  5.7.25-1.el7                    @mysql57-community
mysql-community-server.x86_64        5.7.25-1.el7                    @mysql57-community
mysql57-community-release.noarch    el7-11                          installed
php-mysql.x86_64                    5.4.16-46.el7                    @base


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?

it's all very confusing.

try a search:
https://www.startpage.com/do/dsearch...table+behavior.


All times are GMT -5. The time now is 08:24 AM.