To compile Pl/PHP use the following steps:
1. cd /tmp/
   tar -zxvf php-5.0.3.tar.gz

2. cd php-5.0.3
   ./configure
   make libphp5.la
   This will produce file /tmp/php-5.0.3/libs/libphp5.a

3. cd /tmp/

   Place plphp.patch file here

   tar -zxvf postgresql-8.0.0rc2.tar.gz
   cd postrgesql-8.0.0rc2

   patch -p1 <../plphp.patch
   autoconf

   ./configure --with-php=/tmp/php-5.0.3
   cd src/pl/plphp/


4. Run
    make
    make install
    
    this build and install plphp.so to your postgres lib directory

5. Start postmaster and execute following sql to create plphp language:
   CREATE FUNCTION plphp_call_handler() RETURNS  LANGUAGE_HANDLER AS 'plphp' LANGUAGE C; 
   CREATE TRUSTED LANGUAGE plphp HANDLER plphp_call_handler;
