Chris, I want to say thank you. I have beenn up all night (yep, literally all night working on this) and this message solved all of my problems. What is more it is the only place I found this information. It is not in the FAQ's or anythig. I have now forwarded a copy of this message to the PHP team, asking that tehy include it within the FAQ as think it invaluable!
Chris King wrote:
You complied PHP before you installed mysql. Goto /tmp and type the following command
ln -s /var/lib/mysql/mysql.sock mysql.sock
That will create a symbolic link from /tmp/mysql.sock to /var/lib/mysql/mysql.sock and will correct the problem you are having. Either that, or recompile php.. this way is just quicker.
Hope that helps.
Chris King