If your version of php has been setup with rpms (common for a lot of linux systems) .
Using webmin http://www.webmin.com you can search for the installed php package and uninstall it.
YOu can then download php from php.net and decompress it to your /usr/local directory of your server then.
Stop apache.
./configure (with the params you want)
make
make install
Start Apache.
The help on php.net is better. Just rip out the rpm install of php and configure it from the php download packs.