If you go to www.php.net and read the Install section of the documentation, it explicitly tells you how to install PHP/Apache from source. (works on any Unix system) If you have any further trouble, let us know.

One thing to remember: you have two possible ways of installing, one as a DSO (dynamically loaded Apache module) and the other as statically linked. Some say the performance of the static approach is better, but then, whenever you want to upgrade PHP or change configuration, you also have to recompile Apache.