Why in the world do you need rpm? (Well, it is easier to do ungzipping, untarring, configuring, making and installing)....
But do this - go to php.net and get yourself php 4.0.4 pl 1 in tar.gz file.
Once you'll copy it to your /usr/local directory run tar -zxvf command... and then read Install file - it'll tell you how to compile php as DSO or static module.. If you follow directions, then you should be done in 30 minutes.
Di