How to Upgrade PHP from 5.4.16 to >= PHP 5.6.5 / PHP 7 on Centos 7?

General Tech Bugs & Fixes 2 years ago

0 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I am using centos 7 and it came with php 5.4.16. Now i have to install moodle moodle 3.2 which requires at least PHP 5.6.5.

I tried installing php from remi and IUS repositories but no luck. All i get is error: conflict with the previous install.

If i install any other version of php phpmyadmin won't work. (I tried on development server it didn't work)

By the way I tried googling a lot..but ended up with not working solutions. SO I had to create this.

How do I acheive moodle and phpmyadmin both working on my server ?

Any help is highly appreciated.

Please check below

[root@intranet ~]# yum -y install php56u php56u-opcache php56u-xml php56u-mcrypt php56u-gd php56u-devel php56u-mysql php56u-intl php56u-mbstring php56u-bcmath
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirror.ehost.vn
 * epel: mirror.lzu.edu.cn
 * extras: centos.excellmedia.net
 * ius: mirror.amsiohosting.net
 * remi-safe: mirror.veriteknik.net.tr
 * updates: mirror.tadu.vn
 * webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php56u.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Processing Dependency: php56u-cli(x86-64) = 5.6.29-1.ius.centos7 for package: php56u-5.6.29-1.ius.centos7.x86_64
--> Processing Dependency: php56u-common(x86-64) = 5.6.29-1.ius.centos7 for package: php56u-5.6.29-1.ius.centos7.x86_64
---> Package php56u-bcmath.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-devel.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Processing Dependency: php56u-pecl-jsonc-devel(x86-64) for package: php56u-devel-5.6.29-1.ius.centos7.x86_64
---> Package php56u-gd.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-intl.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-mbstring.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-mcrypt.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-mysqlnd.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Processing Dependency: php56u-pdo(x86-64) = 5.6.29-1.ius.centos7 for package: php56u-mysqlnd-5.6.29-1.ius.centos7.x86_64
---> Package php56u-opcache.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-xml.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Running transaction check
---> Package php56u-cli.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-common.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Processing Dependency: php56u-pecl-jsonc(x86-64) for package: php56u-common-5.6.29-1.ius.centos7.x86_64
---> Package php56u-pdo.x86_64 0:5.6.29-1.ius.centos7 will be installed
---> Package php56u-pecl-jsonc-devel.x86_64 0:1.3.10-2.ius.centos7 will be installed
--> Running transaction check
---> Package php56u-pecl-jsonc.x86_64 0:1.3.10-2.ius.centos7 will be installed
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
--> Processing Dependency: php56u-pear for package: php56u-pecl-jsonc-1.3.10-2.ius.centos7.x86_64
--> Running transaction check
---> Package php56u-pear.noarch 1:1.10.1-4.ius.centos7 will be installed
--> Processing Dependency: php56u-posix for package: 1:php56u-pear-1.10.1-4.ius.centos7.noarch
--> Running transaction check
---> Package php56u-process.x86_64 0:5.6.29-1.ius.centos7 will be installed
--> Processing Conflict: php-mysql-5.4.16-42.el7.x86_64 conflicts php-mysqlnd
--> Processing Conflict: php56u-process-5.6.29-1.ius.centos7.x86_64 conflicts php-process < 5.6
--> Processing Conflict: php56u-gd-5.6.29-1.ius.centos7.x86_64 conflicts php-gd < 5.6
--> Processing Conflict: php56u-bcmath-5.6.29-1.ius.centos7.x86_64 conflicts php-bcmath < 5.6
--> Processing Conflict: php56u-common-5.6.29-1.ius.centos7.x86_64 conflicts php-common < 5.6
--> Processing Conflict: php56u-cli-5.6.29-1.ius.centos7.x86_64 conflicts php-cli < 5.6
--> Processing Conflict: php56u-xml-5.6.29-1.ius.centos7.x86_64 conflicts php-xml < 5.6
--> Processing Conflict: php56u-5.6.29-1.ius.centos7.x86_64 conflicts php < 5.6
--> Processing Conflict: php56u-pdo-5.6.29-1.ius.centos7.x86_64 conflicts php-pdo < 5.6
--> Processing Conflict: php56u-mysqlnd-5.6.29-1.ius.centos7.x86_64 conflicts php-mysql < 5.6
--> Processing Conflict: php56u-mbstring-5.6.29-1.ius.centos7.x86_64 conflicts php-mbstring < 5.6
--> Finished Dependency Resolution
Error: php56u-bcmath conflicts with php-bcmath-5.4.16-42.el7.x86_64
Error: php56u-mbstring conflicts with php-mbstring-5.4.16-42.el7.x86_64
Error: php56u-gd conflicts with php-gd-5.4.16-42.el7.x86_64
Error: php56u conflicts with php-5.4.16-42.el7.x86_64
Error: php-mysql conflicts with php56u-mysqlnd-5.6.29-1.ius.centos7.x86_64
Error: php56u-mysqlnd conflicts with php-mysql-5.4.16-42.el7.x86_64
Error: php56u-process conflicts with php-process-5.4.16-42.el7.x86_64
Error: php56u-xml conflicts with php-xml-5.4.16-42.el7.x86_64
Error: php56u-pdo conflicts with php-pdo-5.4.16-42.el7.x86_64
Error: php56u-cli conflicts with php-cli-5.4.16-42.el7.x86_64
Error: php56u-common conflicts with php-common-5.4.16-42.el7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
profilepic.png
manpreet 2 years ago

There is a brief guide IUS Usage Guide. In short you can try following:

yum install yum-plugin-replace
yum replace php --replace-with php56u

0 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.