note 119586 added to function.pg-connect
| From: | floriparob at gmail dot com | Date: | Tue, 12 Jul 2016 15:20:09 +0000 |
| Subject: | note 119586 added to function.pg-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-205976@lists.php.net to get a copy of this message | ||
Using the "service" parameter as the connection string -- we found that the following
functions:-
putenv("PGSERVICEFILE=/path/to/your/service/file/pg_service.conf");
$connect_string = ("service=testdb");
try {
$pgconn_handle = pg_connect($connect_string);
. . . . . etc.
Note:-
1) the environment variable has to point to the path AND file name.
2) the file has to be readable by Apache.
See:-
https://www.postgresql.org/docs/9.6/static/libpq-pgservice.html
for how to create your pg_service.conf
----
Server IP: 72.52.91.14
Probable Submitter: 189.4.121.176
----
Manual Page -- http://php.net/manual/en/function.pg-connect.php
Edit -- https://master.php.net/note/edit/119586
Del: integrated -- https://master.php.net/note/delete/119586/integrated
Del: useless -- https://master.php.net/note/delete/119586/useless
Del: bad code -- https://master.php.net/note/delete/119586/bad+code
Del: spam -- https://master.php.net/note/delete/119586/spam
Del: non-english -- https://master.php.net/note/delete/119586/non-english
Del: in docs -- https://master.php.net/note/delete/119586/in+docs
Del: other reasons-- https://master.php.net/note/delete/119586
Reject -- https://master.php.net/note/reject/119586
Search -- https://master.php.net/manage/user-notes.php