Database connection problems

Database connection problems

by Michelle Murrain -
Number of replies: 1
Hi All,

Trying to install moodle. I'm a heavy administrator of web apps (mostly perl based, however), as a way of introduction.

I installed moodle in a directory on the web server, and edited the config.php

I'm using postgresql 7.4.2-4, on Debian sarge. I created a database called "moodle" and a db user called "moodle".

When I fire up the moodle page I get:

Error: Moodle could not connect to the database.
It's possible the database itself is just not working at the moment.

etc.

There is nothing written in the error logs, nor the postgres logs. Also, when I run,on the command line;
psql -u moodle moodle
the database comes up just fine. Other web applications on this same server that use postgres work fine (although they aren't PHP based).

php4 and php4-pgsql is installed.

I'm getting the same problem with mysql - and php4-mysql is also installed.

Any clues? Since there are no logged errors, I have nothing to go by to begin to figure out what might be wrong. I figured I tried here before I started noodling around the code.
Average of ratings: -
In reply to Michelle Murrain

Re: Database connection problems

by Oliver Grimm -
Hi,

maybe the problem is that you have to edit your postgresql client authentication configuration file, the pg_hba.conf file.

This file controls which hosts are allowed to connect, how clients
are authenticated, which PostgreSQL user names they can use and which databases they can access.

olly