Thursday, 12 July 2018

php 7 nightmare

OK so Centos 6 insists on installing php 5.3 and even if you download other RPMs and install them, they do not replace the existing 5.3 which stays dominant. But basically everything web-based these days wants php 5.6 or php 7 so you have to get rid of 5.3.


Step 1. Go into /etc/yum.repos.d/ and 

mkdir old

mv Centos* old


Step 2. Uninstall all php stuff:

rpm -qa | grep php | xargs yum delete -y


Step 3. Install remi repository

yum install   http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

yum --enablerepo=remi-php72 list    [if you want to see what is there]


Step 4. Enable repo

yum --enablerepo=remi-php72

 

Step 5. Install in this order:

      yum --enablerepo=remi-php72 install php

 

      yum --enablerepo=remi-php72 install php-common

 

      yum --enablerepo=remi-php72 install php.x86-64

 

      yum --enablerepo=remi-php72 install php


yum install http://rpms.famillecollet.com/enterprise/6/remi/x86_64//libargon2-20161029-2.el6.remi.x86_64.rpm [this is a dependency]

      yum --enablerepo=remi-php72 install php-7.2.7-1.el6.remi.x86_64

 

      yum --enablerepo=remi-php72 install php-pecl-mysql

 

      yum --enablerepo=remi-php72 install php-pecl-ncurses

 

      yum --enablerepo=remi-php72 install php-pecl-zendopcache.x86_64

 

      yum --enablerepo=remi-php72 install php-pecl-ncurses

 

      yum --enablerepo=remi-php72 install php-pecl-zip.x86_64

 

      yum --enablerepo=remi-php72 install php-ZendFramework-Db-Adapter-Mysqli.noarch

 

      yum --enablerepo=remi-php72 install php-json.x86_64

 

      yum --enablerepo=remi-php72 install php-PHP-CSS-Parser.noarch

 

      yum --enablerepo=remi-php72 install php-Raven.noarch

 

      yum --enablerepo=remi-php72 install php-bcmath.x86_64

 

      yum --enablerepo=remi-php72 install php-devel.x86_64

 

      yum --enablerepo=remi-php72 install php-dropbox-php-Dropbox.noarch

 

      yum --enablerepo=remi-php72 install php-gd.x86_64

 

      yum --enablerepo=remi-php72 install php-mcrypt.x86_64

 

      yum --enablerepo=remi-php72 install php-mbstring.x86_64

 

      yum --enablerepo=remi-php72 install php-mssql.x86_64

 

      yum --enablerepo=remi-php72 install php-mysqlnd.x86_64

 

      yum --enablerepo=remi-php72 install php-opencloud.noarch

 

      yum --enablerepo=remi-php72 install php-pdo.x86_64

 

      yum --enablerepo=remi-php72 install php-pdo-dblib.x86_64

 

      yum --enablerepo=remi-php72 install php-pear.noarch

 

      yum --enablerepo=remi-php72 install php-pecl-env.x86_64

 

      yum --enablerepo=remi-php72 install php-pecl-dbase.x86_64

 

      yum --enablerepo=remi-php72 install php-pecl-memcached.x86_64

 

      yum --enablerepo=remi-php72 install php-pecl-selinux.x86_64

 

      yum --enablerepo=remi-php72 install php-pecl-session_mysql.x86_64

 

      yum --enablerepo=remi-php72 install php-pecl-xmldiff.x86_64

 

      yum --enablerepo=remi-php72 install php-pgsql.x86_64

 

    yum --enablerepo=remi-php72 install php-pspell.x86_64

Step 6. Restart apache

     service httpd restart

php 7 nightmare

OK so Centos 6 insists on installing php 5.3 and even if you download other RPMs and install them, they do not replace the existing 5.3 whic...