I have heard a lot about PHP Pear or PHP Extension and Application Repository.  I never really had to use it but heck, I tried Ruby on Rails and it was pretty cool–why not try Pear.  The repositories that I downloaded were Mail and MDB2.  Mail was pretty straight forward–I liked how clean declaring the header information was, as opposed to PHP4’s method of doing so.

What I really liked about PHP Pear’s MDB2 library was the fact that defining the datasource
is as clean as you can get.  If you have any problems connecting to the MySQL
using the socket, check that you have MDB2/mysql.php.

I mean…How much cleaner this be?  mysql://username:password@localhost/database