CentOS 7: Switch to PHP 5.5


I needed PHP 5.5 for an application but isn’t available in the epel repo so googled and used https://webtatic.com/packages/php55/.

Nice and easy.

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum clean all
yum remove php*
yum install php55w php55w-opcache php55w-mysql php55w-fpm
systemctl restart php-fpm
systemctl restart nginx

Sorted…except it wasn’t, it broke my PHP. Of course it did. Just needed to re-fix the stuff in /etc/php-fpm.d/www.conf you know:

sed -i -e 's/user = apache/user = nginx/g' /etc/php-fpm.d/www.conf
sed -i -e 's/group = apache/group = nginx/g' /etc/php-fpm.d/www.conf

Sorted…except it still isn’t. For some reason I was getting “connect() to unix:/var/run/php-fpm/php-fpm.sock failed” errrors. Couldn’t be arsed to figure out why, the file was being created fine… I just switched it back to listen =; in www.conf and fastcgi_pass; in /etc/nginx/conf.d/example.conf