When the following error occurs, it may be because mysqli has not been installed.
Call to undefined function mysqli_connect()
So I installed as follows. (I also tried typing the command php-mysqli, but this doesn't seem to matter)
sudo yum install php-mysql
Finally, the customary apache restart worked!