Hey,
I’m having trouble with upgrading my PHP version from 7.0 TO 7.3
I’m getting an error when trying to install PHP 7.3 using YUM
Error: Package: php70u-fpm-httpd-7.0.32-1.ius.centos7.noarch (@ius)
Requires: php70u-fpm = 7.0.32-1.ius.centos7
Removing: php70u-fpm-7.0.32-1.ius.centos7.x86_64 (@ius)
php70u-fpm = 7.0.32-1.ius.centos7
Obsoleted By: php-fpm-7.3.20-1.el7.remi.x86_64 (remi-php73)
Not found
Error: Package: php70u-fpm-nginx-7.0.32-1.ius.centos7.noarch (@ius)
Requires: php70u-fpm = 7.0.32-1.ius.centos7
Removing: php70u-fpm-7.0.32-1.ius.centos7.x86_64 (@ius)
php70u-fpm = 7.0.32-1.ius.centos7
Obsoleted By: php-fpm-7.3.20-1.el7.remi.x86_64 (remi-php73)
Not found
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
at first, I disabled the original Remi repo for php7.0 using the yum-config-manager --disable and then enabled the new repo 7.3
what can I do to resolve this? I’m using centos 7.6 and I don’t want to completely delete PHP since this is a production server
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello, @omercohen
I will recommend you to take a snapshot of your server before making any changes as this is a production server.
You can try to install PHP 7.3 using the EPEL and Remi repository on your CentOS server:
1 . Enable EPEL and Remi
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
2 . install yum-utils,
yum install yum-utils
3 . Use the yum-config manager to enable the remi PHP 7.3 as the default repository for installing this specific PHP version:
yum-config-manager --enable remi-php73
4 . You can now install all the needed PHP modules:
yum install php php-mcrypt php-cli php-gd php-curl php-mysql php-ldap php-zip php-fileinfo
Note: If there is another extension you need just add it in the command above in order to install it. I will also recommend you to take a snapshot of your server before making any changes as this is a production server and it’s vital to have a working copy of your current server environment before you go and make config changes.
You can check if everything is okay with the following command:
php -v
The expected output will be:
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.1, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.1, Copyright (c) 1999-2018, by Zend Technologies```
Hope that this helps!
Regards,
Alex
For anyone stumbling upon this one, here a detailed steps on how you can upgrade from PHP 7.0 to 8.3 incase anyone needs a newer version.
The error you’re encountering when upgrading PHP from 7.0 to 8.3 on CentOS 7 using YUM involves repository conflicts and dependency issues, particularly with packages installed from the IUS repository that are not properly replaced or upgraded by those from the Remi repository. This can be tricky on a production server where you cannot simply remove PHP without downtime. Here’s a step-by-step approach to safely upgrade your PHP version:
Backup your current PHP configuration and any other critical data. This is essential before making major changes on a production server.
Remove or disable IUS repository, as it may cause conflicts with the Remi repository for newer PHP versions:
yum remove 'ius-release'
yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum-config-manager --enable remi-php83
rpm -qa | grep php70u
Remove the PHP 7.0 packages:
yum remove php70u\*
yum clean all
You might need to install additional PHP modules that your applications require. You can search for available PHP modules by:
```bash
yum search php-
Check PHP version to confirm the upgrade:
php -v
Update PHP configuration files if necessary. Since PHP versions can have different directives and deprecated features, you’ll need to review and possibly modify php.ini and other related configuration files.
Migrate and test PHP configurations and websites to ensure compatibility with PHP 8.3. Pay attention to deprecated features and incompatible changes.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.