This is an old thread but I never found the real solution to the Virtualmin's Squirrelmail error:
"Could not include PEAR database functions required for the database backend.
Is PEAR installed, and is the include path set correctly to find DB.php?
Please contact your system administrator and report this error."
By now, Virtualmin version is 1.831 and I am on Debian 8. The standard PEAR installed by Virtualmin is version 1.9.5.
To solve this annoying problem you need to run the command:
pear install db
This command will fail, because the required version of PEAR for this would be 1.10.x. Now you need to update to PEAR 1.10.x which is pretty easy:
wget http://pear.php.net/go-pear.phar
php go-pear.phar
This will update PEAR, check the version with:
pear version
in my case: PEAR Version: 1.10.3
Now you can run the last command:
pear install db
It will install it and finally the error will not appear anymore.
I hope this will help somebody.
PS. In my working configuration I have uncommented the following line:
;include_path=".:/usr/share/php" (should remove the leading ";")
at the following locations:
/etc/php5/apache2/php.ini
/etc/php5/cli/php.ini and restart Apache