After wasting a whole night trying to do it the right way – this is my final steps for upgrading php on CENTOS 6.5
1. use IUS – IUS Community
2. Install the 2 rpm:
rpm -Uvh ius-release*.rpm epel-release*.rpm
3. replace the php with php55u:
yum replace php –replace-with php55u
4. remove from php.conf the FileMatch directive.
5. install JSON library for php55u: yum install php55u-pecl-jsonc
6. yum replace mysql –replace-with mysql56w
7. change in my.cnf one line to table_cache to table_open_cache
You might need to clean yum cache.
Same process for CentOS 7.0, use the yum install yum-plugin-replace in order to make this work.