Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/tmp/mysql.sock' (111) in
/home/sites/site1/web/intranet/main.php on line 309
This sounds A LOT like the problem when you need to change the location of the mysql.sock in your php.ini.. you did check that.. right??
I think Redcrap puts it in another place..
I noticed you compiled php --with-mysql without specifying a location.. You SHOULD compile with the location like
--with-mysql=/usr/local/mysql or something simular.
You see, the bug you think you have found could as well be a configuration mistake..
Bye,
B.