I just installed Lion and for some reasons my internal website stopped working due to the mysql lock file not being found. I found out that the new osx installation changed the mysql sock file default path from /var/mysql/mysql.sock to /tmp/mysql.sock.
So, to re-enable everything, do:
shut down your Web Sharing
cp /etc/php.ini.default /etc/php.ini (for some reasons my old php.ini got renamed to php.ini.default php.ini-5.2-previous…)
modify /etc/php.ini, change ALL /var/mysql/mysql.sock to /tmp/mysql.sock
enable Web Sharing
That will do it.