Ok,
about apache:
If you want to compile PHP for usage with the installed apache you need to add the following configure option:
apache 1.x: --with-apxs=/path/to/apxs
apache 2.x: --with-apxs2=/path/to/apxs
You wrote that you got an error regarding MySQL. Did you install the mysql-devel rpm package ? That package contains some libraries and headers that you need if you want to compile php with MySQL support from sources.
Which php version do you want to install ?
Thomas