Yes you should probably install mysql before php.
Run httpd -l to check if you have mod_so.c installed. If it does not show up you will have to recompile apache to either add it, or staticly link in php. I'd suggest adding it and dynamically linking in php.
Run the php configure with at least these options:
Code:
--with-apxs=/usr/local/apache/bin/apxs
--enable-module=so
--with-mysql
--enable-trans-sid
--enable-shared
Build and install php. You find that the php .so file gets copied into the apache libexec directory. You will have to modify the apache conf file to include this object. See the php docs for details.
When you are done. Write the most usefull php program you will ever use to test php: