Trying to revert to PHP 5.4 after hosing install of newer PHP versions

General support questions
Post Reply
stimpygato
Posts: 2
Joined: 2017/10/19 16:27:56
Location: Pennsylvania
Contact:

Trying to revert to PHP 5.4 after hosing install of newer PHP versions

Post by stimpygato » 2017/10/19 16:56:29

Hi all, and my apologies if this is an overly "n00b" question...

I'm working with a remote Centos7 box (on-site, but not in close proximity to me).

This is a development server I was given to have my way with, but unfortunately I have long been dependent on cPanel, and to use this box I was forced to use Webmin/Virtualmin, which required a lot more hands-on setup, which is where I went down the PHP rabbit hole.

After Googling and trying way too many suggestions to create a selectable PHP environment for my different servers and sub-servers, I've effectively hosed my different PHP versions.
Operating system CentOS Linux 7.4.1708
Webmin version 1.852
Usermin version 1.720
Virtualmin version 6.01
Configuration File (php.ini) Path /etc/opt/rh/rh-php56
Loaded Configuration File /home/dev2/etc/php5.6/php.ini
Scan this dir for additional .ini files /etc/opt/rh/rh-php56/php.d
Here's where I'm currently at:
[root@-------------------]# php -v
PHP Warning: PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
These options need to match
in Unknown on line 0
PHP Warning: Module 'mbstring' already loaded in Unknown on line 0
I screwed up imagick library module trying to manually install it - after the Webmin installer failed to do it automatically.
The PHP newer versions seemed to appear in Virtualmin, so I thought I was on the right path, but only when trying to add phpMyAdmin to the backend did I find that my PHP versions were not playing well together.

More than anything, I'm trying to get back to square one with the PHP... so any advice on how to properly downgrade to 5.4 would be greatly appreciated.

Believe me, I've Googled everything I could think of before signing up for this forum, and hopefully as I get more comfortable in the Centos7 environment, I can give back to the community!

Thanks all, and hope someone can help nudge me in the right direction.
============================
I take great pride in my humility.
============================

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Trying to revert to PHP 5.4 after hosing install of newer PHP versions

Post by TrevorH » 2017/10/19 17:24:04

You appear to have installed the php56 SCL packages. You'll need to remove those and then install the ordinary php-* versions of the same packages from base/updates repos instead. If using yum remove rh-php56\* wants to take other packages with it that you do not want removed then you can probably use the yum shell command to stack up the remove and install commands so that the ordinary php-* packages replace the rh-php56-* ones in one transaction and thus don't remove any dependent packages.

We don't support any panels here, not webmin or any others.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

stimpygato
Posts: 2
Joined: 2017/10/19 16:27:56
Location: Pennsylvania
Contact:

Re: Trying to revert to PHP 5.4 after hosing install of newer PHP versions

Post by stimpygato » 2017/10/19 19:27:04

Thank you for the advice! And, I totally understand this forum is exclusively about Centos, not panels or other software/harware.

I went ahead with the first command since nothing good came of subsequent installs, and I think I'm about a step away from having things back to normal, although I now get the message:
Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
I did a locate msql.so, which should be the extension I'm looking for, and got no result. Google says it's possibly from a leftover php.ini file. I have three total for that virtual server.

/etc/php.ini
/etc/php5/php.ini
/etc/php5.6/php.ini (just installed)

I'm pretty close, aren't I? ;)
============================
I take great pride in my humility.
============================

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Trying to revert to PHP 5.4 after hosing install of newer PHP versions

Post by TrevorH » 2017/10/19 21:26:08

You'll want to install php-mysql or php-mysqlnd
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
remirepo
Posts: 447
Joined: 2014/09/21 09:07:12
Location: France
Contact:

Re: Trying to revert to PHP 5.4 after hosing install of newer PHP versions

Post by remirepo » 2017/10/20 03:28:22

> Your PHP installation appears to be missing the MySQL extension which is required by WordPress.

Which is a bad message.... Wordpress don't use old deprecated mysql extension, but the new mysqli one....
Remi's Repository - Forum - Blog

Post Reply