It looked like the php was built with everything under the sun, except the mysql
I don't know the version of the apache, but you could check either of these two link for the php installation:
version 1: http://www.php.net/manual/en/install.apache.php
version 2: http://www.php.net/manual/en/install.apache2.php
I don't know what version of the apache that you are running, but from the --with-apxs2=/usr/sbin/apxs line, the php expects the apache2.
So there is one way out, but you take you some times (but hey, this is fun
) is to rebuild apache 2, mysql and then php (the last), according to the 2nd link's instructions above.
download the stable version (the stand 4.0.20 is good). Follow the installation, when you do the configure, make sure you do this:
This will put your mysql user /usr/local. You could use other place if you prefer.
Then when you are ready to ./configure the php, copy everything you have from your previous config (make sure to remove all the single quote ', and add these two:
(which assume you build the apache at /usr/local).
Note: when you build the apache, make sure you do this:
This is telling apache to use the php and mysql's so.
In all, study the instructiosn in the php's link above before proceeding.