question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pg_service.conf doesn't work for editing

See original GitHub issue

Hi,

Just installed Lizmap and it’s working great except for editing postgres layers using pg_service.conf.

I get

[8]	Undefined index: host	/var/www/lizmap-web-client-3.1.2/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php	144

error	2017-06-16 10:24:36	[402]	error during the connection %s	/var/www/lizmap-web-client-3.1.2/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php	144

I have setup the PGSERVICEFILE variable in apache and the Map is working.

How can I point PHP to pg_service.conf?

I also want to document this as it’s lacking in the lizmap docs.

PS. I also tried with PGSERVICE dir in fcgid.conf and in env.conf to no avail. Debian stretch - php 7 - lizmap-web-client-3.1.2

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
rldhontcommented, Feb 1, 2019

Hi @zoidable,

You also have to update the PHP environnement.

You can put your pg_service.conf file to /etc/postgresql-common/ directory to be used by all the softwares.

0reactions
ghostcommented, Feb 1, 2019

Thanks @rldhont, I only set the environment variable within the QGIS Server virtual host, so PHP didn’t get it…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Thread: pg_service.conf ignores dbname parameter : Postgres ...
Create/edit pg_service.conf in whatever directory it's supposed to be in on your ... dbname = servicename when the service file doesn't say any...
Read more >
2.4. Setup workstation — QGEP 0.8 documentation
On Windows, you need to save pg_service.conf in Unix format in order to work. One way to do it is to open it...
Read more >
Re: pg_config, pg_service.conf, postgresql.conf
Re: pg_config, pg_service.conf, postgresql.conf . ... later via editing the conf file and SIGHUP. (Of course that doesn't matter for startup-time-only
Read more >
Connecting using Service File - PostgreSQL Now
The service file method works with libpq connections only, not JDBC. Service file can be defined at many levels. User level – at...
Read more >
How to use postgresql.conf to configure and tune ... - YouTube
Tuning your PostgreSQL server plays an important role in making sure you get the most out of your server resources, and running with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found