You may not need to build from source, but you will have to get PHP from PHP, and the MySQL libraries from MySQL. There may be a DSO like setup, so you may be able to use precompiled of both. Also, it is likely that your distro has already done this for you.