I read the page on recompiling php and I got to the part where I was running "up2date libpng-devel libjpeg-devel freetype-devel freetype libjpeg libpng." I ran it and it gave me
Downloading headers to solve dependencies...
There was an error downloading:
http://mirror.centos.org/centos/4/os...L4_U2.i386.hdr
There was an error downloading:
http://mirror.centos.org/centos/4/os...2.1-1.i386.hdr
...continually