• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Update php with iuscommunity

Bluesurf

New Pleskian
I have been trying to upgrade the php on my server with the iuscommunity depository. I am having conflicts with remi, which is being tied by Plesk. Here is my effort to remove the offending file:

[root@d7w2-g8zq /]# rpm -qa | grep php-xml*
php-xml-5.4.13-1.el6.remi.x86_64
[root@d7w2-g8zq /]# rpm -e php-xml-5.4.13-1.el6.remi.x86_64
error: Failed dependencies:
php-xml is needed by (installed) psa-php5-configurator-1.7.0-cos6.build1205150820.19.x86_64
[root@d7w2-g8zq /]#

I don't understand this last configurator file - is it like an *.ini file that I can edit? How can I substitute the ius for the remi xml file?
 
Hello,

We do not recommend to upgrade PHP from IUS repo as PHP packages from this repo may be not compatible with Plesk.

In this case, psa-php5-configurator package can be removed using --nodeps option, and after PHP upgrade it should be installed back using Plesk autoinstaller or manually.
 
I have read about this before, and heed the warning, but... I have two problems, as identified below:

PHP Warning: Module 'dom' already loaded in Unknown on line 0
phpinfo()
PHP Version => 5.4.13

The depositories that I have loaded include,

[root@d7w2-g8zq yum.repos.d]# dir
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo epel-testing.repo ius-dev.repo ius-testing.repo plesk-php5.6.repo
CentOS-Debuginfo.repo CentOS-Media.repo epel.repo ius-archive.repo ius.repo mt_dv_extras.repo plesk-php7.0.repo

So, while the php 5.6 is loaded, it is not the default install. And, I have a conflict with the "DOM" module. So, I tried to load the ius php 5.6 - a conflict with the install arises with the php.xml file, and so I want to force the install of this and hopefully it will correct the "DOM" problem that I am seeing.
 
>PHP Warning: Module 'dom' already loaded in Unknown on line 0
The module dom is loaded twice.

Find the second place where this module is loaded using grep and comment it:

# grep -ir dom /etc/php.d/*
/etc/php.d/dom.ini:; Enable dom extension module
/etc/php.d/dom.ini:extension=dom.so
 
Okay, that eliminates the "DOM" problem. How am I getting php 5.4 when the depositories list php 5.6 and php 7.0? I don't even see a repository for the php 5.4.
 
Repositories as IUS contain PHP packages with the name php5*- which is not default name.

Default PHP packages has the name php-5.*

So in IUS repo I can see this kind of packages:

php56u-*
php70u-*

Installation of these packages should be like(5.4 php packages should be removed before):

# yum install php56u php56u-common

As I previously informed, we do not recommend to do this on live server as this may break Plesk.
You are doing this on your own risk. You may also face with different issues on Plesk updates.
 
I listed files to see where the php 5.4 was coming from - have not been able to remove a php 5.4 depo. I got this return:

[root@d7w2-g8zq ~]# yum list installed | grep php*
php.x86_64 5.4.13-1.el6.remi @mt_dv_extras
php-cli.x86_64 5.4.13-1.el6.remi @mt_dv_extras
php-common.x86_64 5.4.13-1.el6.remi @mt_dv_extras
php-gd.x86_64 5.4.13-1.el6.remi @mt_dv_extras
php-imap.x86_64 5.4.13-1.el6.remi @mt_dv_extras
php-mbstring.x86_64 5.4.13-1.el6.remi @mt_dv_extras
php-mysql.x86_64 5.4.13-1.el6.remi @mt_dv_extras
php-pdo.x86_64 5.4.13-1.el6.remi @mt_dv_extras
php-xml.x86_64 5.4.13-1.el6.remi @mt_dv_extras
php5-ioncube-loader.x86_64 5.0.12-centos6.15081418 installed
plesk-php56-ioncube-loader.x86_64
....
psa-php5-configurator.x86_64 1.7.0-cos6.build1205150820.19 @PLESK_12_5_30-dist
psa-phpmyadmin.noarch 4.5.5-cos6.build1205160229.16 @PLESK_12_5_30-dist
psa-phppgadmin.noarch 5.1-cos6.build1205150814.17 installed

I don't know what more besides the php 5.4 is part of the mt_dv_extras repository. I would remove that repository, but don't want to destroy the system if it is depending on some other "extras" from this repository. How can I get a full list of the files in a particular repository? Is it better to force the install of a specific version of php? I did this once by putting a line in the php.ini file directing it to a specific loader, but on restart the Plesk automatically commented this addition out -
;zend_extension= /usr/lib64/php/modules/ioncube_loader_lin_5.6.so ; moved to conf.d/zend_extensions_psa.ini by Plesk

Maybe I need to delete one of the ioncube_loader files? I can't locate the zend folder or the conf.d folder.
 
If you disable/remove repository it will not affect on system. You will no longer receive updates/packages from this repo.

If you want to install PHP from IUS repo, you should remove all php-* 5.4 packages manually without dependencies.

Note: I suggest you to create full server backup first as incorrect PHP removal may also remove Plesk.
 
Alex, I don't understand your instruction:

"psa-php5-configurator package can be removed using --nodeps option"

There are two things that keep me from success -
1) I need to get the system to load php 5.6 not php 5.4. I can do this by uninstalling or removing the 5.4 files, maybe using a "yum shell" command. But, I don't know how to express the command line statement when there are many different file names. Do you literally mean to simply state "yum -y erase php-* 5.4*"?? How can I list the files in the mt_dv_extras depository? Maybe I can simply remove the depository, but I don't know what more is in the depository than the php 5.4. Can I do some ls or nano command to run a list of the files in the depository?
2) I need to find the configuration file - "psa-php5-configurator-1.7.0-cos6.build1205150820.19.x86_64". Maybe I can do an edit of this file with a nano command (if it is like an *.ini file), and direct Plesk to load the proper version of php. What command do I use to locate this file?
 
Back
Top