LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (http://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   CentOS6.4 / PHP5.3.3 / Postgresql 9.1 how to t PDO ? (http://www.linuxquestions.org/questions/linux-distributions-5/centos6-4-php5-3-3-postgresql-9-1-how-to-t-pdo-4175457151/)

JSkywalker 04-06-2013 02:41 PM

CentOS6.4 / PHP5.3.3 / Postgresql 9.1 how to t PDO ?
 
Ik have CentOS6.4 / PHP5.3.3

How do i enable PDO for postgresql ? (and where can i get that ;)

phpinfo() says:
PDO
PDO support
enabled

PDO drivers
sqlite
pdo_sqlite

PDO Driver for SQLite 3.x
enabled
SQLite Library
3.6.20

michaelk 04-07-2013 05:45 PM

Is postgresql and php-pgsql installed?

JSkywalker 04-08-2013 02:17 PM

Yes, i installed postgres 9.1

phpinfo() shows (under PDO):
Quote:

support
enabled
PDO drivers
pgsql, sqlite
pdo_pgsql
PDO Driver for PostgreSQL
enabled
PostgreSQL(libpq) Version
9.1.9
Module version
1.0.2
Revision
$Id$
now i have next error:
Quote:

Fatal error: PDO connection error 'pgsql:dbname=davical user=davical_app': SQLSTATE[08006] [7] could not connect to server: Permission denied Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? in /usr/share/awl-0.53/inc/AwlDBDialect.php on line 81
when i do:
Quote:

# sudo su - postgres
-bash-4.1$ psql -U davical_app davical
psql (9.1.9)
Type "help" for help.

davical=> select fullname from usr;
fullname
-----------------------
DAViCal Administrator
(1 row)

davical=>

Which give /me the idea i have a database with some info in it.....

contents of pg_hba.conf is:
Quote:

local davical davical_app trust
local davical davical_dba trust
host davical davical_app 192.168.178.12/32 trust
host davical davical_dba 192.168.178.12/32 trust
local all all peer
host all all 127.0.0.1/32 ident
host all all ::1/128 ident
(192.168.178.12 is the ip-address of the machine is have apache&postgresql, and trying to get 'davical' running ;)

JSkywalker 04-08-2013 02:34 PM

and, BTW, also this:
Quote:

davical=> \conninfo
You are connected to database "davical" as user "davical_app" via socket in "/tmp" at port "5432".
davical=>


All times are GMT -5. The time now is 08:13 AM.