Ok that worked but it took a few other changes to make it work.
After installing the latest php from the link above, ioncube is then out of date, so need to update that to ioncube_loader_lin_5.5.so and adjust the /etc/php.d/ioncube.ini to the new version.
Then mysql would fail to start for some reason so had to physically change the passwords in:
/etc/webpanel/mysql.txt (not sure if this was needed)
/etc/webpanel/panel/include/db_conn.php
to the current root passwords.
After this then a service cwp restart
and it all seems to be running fine.
Thanks for the help.