Our site also had this error (and others) after Dreamhost updated our servers to Ubuntu. The move broke just about all our webpages, including standard installs like WordPress and phpBB, the latter failing because MySQL was unavailable to PHP.
The cause of the problem ended up being a custom php.ini file, combined with a modified .htaccess file, both setup as per Dreamhost's instructions. Once those modifications were removed, the problem went away.
Dreamhost support said the modifications were somehow triggering PHP 5.2 to activate. I'm not sure that's true, since logging phpinfo() revealed that our site was using PHP 5.3.27, but for whatever reason those modifications did trigger MySQL to become unavailable to PHP.
After that was cleared up, we still had problems. Our php.ini file was being used to adjust PHP's include path. Without it code like this was failing:
<?php include('globals.php'); ?>
We could modify all our pages to use something like this:
<?php include( $_SERVER["DOCUMENT_ROOT"] . '/includes/globals.php'); ?>
But we have over 1000 php files, so editing them all wasn't desirable. Instead we had to change to using a custom phprc file located at: ~/.php/5.4/phprc
That now enforces our customized PHP include_path and everything is working smoothly.
I hope that helps,