LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 04-06-2013, 01:41 PM   #1
JSkywalker
Member
 
Registered: Aug 2007
Distribution: openSUSE
Posts: 102

Rep: Reputation: 24
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
 
Old 04-07-2013, 04:45 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,700

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Is postgresql and php-pgsql installed?
 
Old 04-08-2013, 01:17 PM   #3
JSkywalker
Member
 
Registered: Aug 2007
Distribution: openSUSE
Posts: 102

Original Poster
Rep: Reputation: 24
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
 
Old 04-08-2013, 01:34 PM   #4
JSkywalker
Member
 
Registered: Aug 2007
Distribution: openSUSE
Posts: 102

Original Poster
Rep: Reputation: 24
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=>
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
load mcrypt & pdo on my server alsharifhoussam Linux - Server 1 06-26-2011 04:02 AM
[SOLVED] Lighttpd + PHP5 + PDO + Sqlite3 from source? littlebigman Linux - Server 2 05-19-2010 03:12 AM
PHP PDO Issue godzila Linux - Software 1 04-02-2010 08:36 AM
Problem configuring pdo/php braclayrab Linux - Software 0 08-28-2008 04:55 PM
Gentoo not installing pecl-pdo 70mas Linux - Server 1 08-05-2007 10:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 11:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration