Hi Bruce
> $conn = @pg_connect($tmp);
For testing you should remove the '@' from the PHP-commands to see theerrormessages from the PostgreSQL server. It may help you to find theerrors.
RegardsConni