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:

  1. shut down your Web Sharing

  2. 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…)

  3. modify /etc/php.ini, change ALL /var/mysql/mysql.sock to /tmp/mysql.sock

  4. enable Web Sharing

That will do it.