I just installed PHP4.0.6 in RH7.1, don't use the RPM for PHP, use source, compile it with the --with-mysql --with-apxs switches and you should be good to go. (you will need to read the INSTALL page for the instructions to get apache working with it)
moonie 😉