Fedora core 4 comes with PHP5 wich is a new version of the PHP package. (The point is that PHP4 and PHP5 are the same package. So you can’t simply urpmi or yum php4.)
You may need PHP4 for some reasons : compatibility, performance. (I heard that there might be a compatibility flag in PHP5 ??)
Step 1 :change the repositories for PHP
Exclude PHP from the current (fc4) repository, so it won’t be upgraded. In /etc/yum.repos.d/ : add exclude=*php* *jpgraph* in every .repo file.
Add the Fedora Core 3 updates (and extra for JPgraph) repository with the option includepkgs=*php* jpgraph*.
Step 2 : install the compatibility library
Now, you could install PHP4, but not php_pgsql : you would have a dependency problem with Postgresql libpq.so.3 !
So you need to download a compatibility library :
curl http://developer.postgresql.org/~devrim/compat-postgresql-libs-3-3PGDG.i686.rpm > compat-postgresql-libs-3-3PGDG.i686.rpm rpm --import http://www.gunduz.org/devrimgunduz.pgp.pub yum install compat-postgresql-libs-3-3PGDG.i686.rpm yum install php-pgsql
Note : there is a compat-db in Fedora’s repository, but it is for The Berkeley DB database library.