Re: Undefined function pg_connect()
От | Gustavo Amarilla Santacruz |
---|---|
Тема | Re: Undefined function pg_connect() |
Дата | |
Msg-id | e4ea2d811002011603u98f5fd4k6934d68fc66bb352@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Undefined function pg_connect() (Chris <dmagick@gmail.com>) |
Ответы |
Re: Undefined function pg_connect()
|
Список | pgsql-php |
Thank you, all.
I had access to the SELinux->Boolean; next, i check the option:
"Allow HTTPD scripts and modules to connect to databases over the network".
Then, a new message was displayed:
Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "gestock" .......
I can login with gestock data (user/password) through the postgresql psql tool. But from apache i can not.
Note: the php.ini file was not modified.
--
Gustavo Amarilla
I had access to the SELinux->Boolean; next, i check the option:
"Allow HTTPD scripts and modules to connect to databases over the network".
Then, a new message was displayed:
Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: Ident authentication failed for user "gestock" .......
I can login with gestock data (user/password) through the postgresql psql tool. But from apache i can not.
Note: the php.ini file was not modified.
On Sun, Jan 31, 2010 at 7:21 PM, Chris <dmagick@gmail.com> wrote:
These should be colon separated, not semicolon - notice it's trying to load both paths included:; Directory in which the loadable extensions (modules) reside.
; http://www.php.net/manual/en/ini.core.php#ini.extension-dir
; extension_dir = "./"
;extension_dir = "./;/usr/lib/php/modules/;/usr/lib/pgsql/"Change it to
PHP Warning: PHP Startup: Unable to load dynamic library './;/usr/lib/php/modules/;/usr/lib/pgsql/curl.so'"Permission denied" sounds like either file permissions or seLinux is stopping the connection.
extension_dir = "./:/usr/lib/php/modules/:/usr/lib/pgsql/"Then, a new message was displayed:
"Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Permission denied Is the server running on host "localhost" and accepting TCP/IP connections on port 5432? could not connect to server: Permission denied Is the server running on host "localhost" and accepting TCP/IP connections on port 5432?"
If you have seLinux enabled, try disabling it (don't know how to do that, sorry) - at least that will tell you if that's the problem.
For file permissions, check your apache user can read where-ever the postgres socket file is put (normally /tmp/.s.PGSQL.5432 on centos/rhel).
--
Gustavo Amarilla
В списке pgsql-php по дате отправления: