We've been getting the following error when testing our PHP pages that make calls to our postgres database:
Fatal error: Call to undefined function: pg_pconnect() in /var/www/<testpageX>.php on line 14
According to research, it seems as though we failed to compile PHP with postgres support at install time. We used Debian packages to install PHP and don't recall whether compiling with postgres was an option.
- Should we remove PHP and start over with the regular PHP compiler?
You will need to recompile php, but adding the --with-pgsql (possibly --with-pgsql=shared) option. Looking at phpinfo() will give you the options you used when you orginally compiled it, just add the pgsql one.
- Is there a "Debian way" to install PHP with postgres support?
Unfortunately I don't have experiece of Debian, they may have a package with this option pre-configured.
- Are we totally missing the boat here?
Nope, sanity check passes :-)
HTH Chris