The pb is not relevant to apache module but with php module.
Once you've installed php use <? phpinfo(); ?> in a php script to verify php configuration.
It prints a section for each configured module.
Look for the MySQL section and verify that parameters are correct.
If MySQL section is not present, you didn't compile PHP with MySQL support.
If parameters are incorrect modify your php.ini.
JBL