ERROR - 2014-12-10 12:15:02 --> Unable to connect to the database

37 views
Skip to first unread message

Sylvain Amado

unread,
Dec 10, 2014, 6:26:21 AM12/10/14
to agend...@googlegroups.com
Hello
in agendav log , I already have this message:
-----------------------------------------------------------------------
 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? /var/www/agendav/web/system/database/drivers/postgre/postgre_driver.php 86
ERROR - 2014-12-10 12:15:02 --> Unable to connect to the database
ERROR - 2014-12-10 12:15:02 --> Severity: Warning  --> pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Permission denied
----------------------------------------------------

But I have verified all my parameters on database.php  and my postgresql server is online (for Davical )
I have follow the installation Guide of Agendav
(modify the pg_hba.conf ...)

Someone  can help me or give me some tips to find the error ?


Jorge López Pérez

unread,
Dec 10, 2014, 6:47:08 AM12/10/14
to agend...@googlegroups.com
Hi Sylvain,

On Wed, Dec 10, 2014, at 12:26, Sylvain Amado wrote:
> ERROR - 2014-12-10 12:15:02 --> Unable to connect to the database
> ERROR - 2014-12-10 12:15:02 --> Severity: Warning --> pg_connect():
> Unable
> to connect to PostgreSQL server: could not connect to server: Permission
> denied

Can you show us your database.php and your pg_hba.conf files?

Regards.

--
Jorge López Pérez
http://adobo.org

Sylvain Amado

unread,
Dec 10, 2014, 7:23:01 AM12/10/14
to agend...@googlegroups.com
Thanks pour your quick answer
pg_hba.conf
-------------------------------------------------------------------------------
# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL listen
# on a non-local interface via the listen_addresses configuration parameter,
# or via the -i or -h command line switches.
#



# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local davical davical_app trust
local davical davical_dba trust
local agendav agendav trust
#
# trust davical
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
# IPv6 local connections:
host    all         all         ::1/128               ident
------------------------------------------------------------------------------
database;php
-----------------------------------------------------------------------------

| The $active_record variables lets you determine whether or not to load
| the active record class
*/

$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'agendav';
$db['default']['password'] = 'agendav';
$db['default']['database'] = 'agendav';
$db['default']['dbdriver'] = 'postgre';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = FALSE;
$db['default']['db_debug'] = FALSE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;


/* End of file database.php */
/* Location: ./application/config/database.php */

-----------------------------------------------------------------------------



Jorge López Pérez

unread,
Dec 12, 2014, 4:17:37 AM12/12/14
to agend...@googlegroups.com
Hi Sylvain,

I don't have much experience with PostgreSQL, but I hope I can give you
some clues to make it work.

What happens if you run "psql -U agendav"? In case it works, perhaps
setting an empty password in the database.php file does the trick.

If not, maybe the documentation is wrong about the pg_hba.conf required
line. Instead of 'trust' you should try a combination of 'md5' and/or
specifying a local IP address, and make sure your pgsql agendav user has
actually an 'agendav' password.

Please, keep us updated to correct the documentation in case it is
wrong.
Reply all
Reply to author
Forward
0 new messages