• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Postgresql connection problem

T

tellus

Guest
I recently had my very first customer that wanted a pgsql database (got it from the plesk addon) and everything looked good at first but the customer noticed that it was not possible to connect to the pgsql db from a php script (yes, php is compiled with --with-pgsql) but it worked fine from phppgadmin.

I did some tests myself and for some reason it works in php scripts with:

PHP:
pg_connect("host='' port=5432 dbname=$dbname user=$user password=$pass")

but not with:

PHP:
pg_connect("host=localhost port=5432 dbname=$dbname user=$user password=$pass")

Why is this? Is there something I need to change to get this to work with writing "localhost" since that is the most common usage.

Running freebsd and postgre 7.4.6
 
Back
Top