> The exact same connection string works fine in a standalone perl program.
Given the permissions errors you mentioned upthread, I'm wondering whether you're running on Red Hat/CentOS, and if so whether SELinux is preventing apache from connecting to unexpected port numbers. I seem to recall that there's a SELinux boolean specifically intended to allow or disallow database connections from webservers, but I couldn't tell you the name offhand.