Just a heads up that if you are getting Apache Seg faults with this configuration it could be related to an old version of perl's DBD that was linked with an incompatible lib.
Background:
I had a working setup of apache+mod_perl+mysql. I upgraded mysql and added php4 (with --with-mysql enabled) into the mix. If I access the mysql database with mod_perl, Apache would produce a Segmentation fault. I tried all the variations of linking php4 with and without a DIR specified. The only real hint was that if I compiled php4 as --without-mysql, all mod_perl worked well. The Apache error log gave no hint that it was a DBI/DBD perl problem.
After much sifting through mailing list I came across a solution Doug MacEachern(of mod_perl fame) advice "you need to configure php using --with-mysql=/path/to/mysql
where /path/to/mysql is the same mysql that dbd::mysql was compiled/linked
against." That made perfect sense as the old DBD module had been linked with an older version of mysql.
Good Luck