[Mapbender-users] Unable to login (function.pg-connect)
Christian Gadge
christian.gadge at ufz.de
Thu Jan 8 11:00:55 EST 2009
Ok. Undo the changes in mapbender.conf
Here it is:
<?php
# $Id: mapbender.conf-dist 2603 2008-07-08 12:57:06Z christoph $
# http://www.mapbender.org/index.php/Mapbender.conf
# Copyright (C) 2002 CCGIS
# --------------------------------------------
# type of mapbender database
# --------------------------------------------
#define("SYS_DBTYPE", "mysql");
define("SYS_DBTYPE", "pgsql");
# --------------------------------------------
# database information
# --------------------------------------------
if(SYS_DBTYPE=="mysql")
{
define("DBSERVER", "<HOST>");
define("PORT", "3306");
define("DB", "<database>");
define("OWNER", "<owner>");
define("PW", "<password>");
# --------------------------------------------
# database with geos functions
# --------------------------------------------
define("GEOS_DBSERVER", "<HOST>");
define("GEOS_PORT", "5432");
define("GEOS_DB", "<database with geos functions>");
define("GEOS_OWNER", "<owner>");
define("GEOS_PW", "<password>");
}
else {
define("DBSERVER", "127.0.0.1");
define("PORT", "5432");
define("DB", "mapbender");
define("OWNER", "postgres");
define("PW", "postgres");
define("MD5","true");
include_once("/var/www/mapbender_2.5/http/php/database-pgsql.php");
}
# --------------------------------------------
# prepared statements (PHP > 5.1.x, PostgreSQL > 7.4)
# --------------------------------------------
define("PREPAREDSTATEMENTS",true);
# --------------------------------------------
# encoding - default characterset UTF-8 / ISO-8859-1
# --------------------------------------------
define("CHARSET","UTF-8");
# --------------------------------------------
# error_reporting
# --------------------------------------------
//ini_set('error_reporting', 'E_ALL & ~ E_NOTICE');
# --------------------------------------------
# directory for temporary files
# --------------------------------------------
define("TMPDIR", "../tmp");
# --------------------------------------------
# URL to login
# --------------------------------------------
define("LOGIN", "http://141.65.7.61/mapbender_2.5/http/frames/login.php");
define("MAXLOGIN", 3);
$login = LOGIN;
# --------------------------------------------
# URL to owsproxy
# (no terminating slash)
# --------------------------------------------
define("OWSPROXY", "http://<ip or name>/owsproxy");
# --------------------------------------------
# type of server-connection
# curl, socket, http
# --------------------------------------------
#define("CONNECTION", "curl");
define("CONNECTION", "http");
#define("CONNECTION", "socket");
define("CONNECTION_PROXY", "127.0.0.1");
define("CONNECTION_PORT", "<port>");
define("CONNECTION_USER", "<user>");
define("CONNECTION_PASSWORD", "<password>");
# --------------------------------------------
# security: path to modules
# --------------------------------------------
define("CHECK", false);
# --------------------------------------------
# enable/disable portal
# --------------------------------------------
define("PORTAL", false);
# --------------------------------------------
# mail settings for internal mapbender mails
# smtp mailing
# for further settings check 'class_administration.php'
# please check phpmailer for more information
# --------------------------------------------
define("USE_PHP_MAILING", "false");
define("MAILHOST", "<host>");
define("MAILUSERNAME", "<user>");
define("MAILPASSWORD", "<password>");
define("MAILADMIN", "<mailaddress of the mailadmin>");
define("MAILADMINNAME", "<mailadminname>");
$mailHost = MAILHOST;
$mailUsername = MAILUSERNAME;
$mailPassword = MAILPASSWORD;
# --------------------------------------------
# wms monitoring
# --------------------------------------------
define("AUTO_UPDATE", "0");
define("TIME_LIMIT", "300");
define("PHP_PATH", "/usr/local/bin/");
# --------------------------------------------
# Mapbender error logging
# --------------------------------------------
define("LOG_LEVEL", "error"); //"off","error","warning","notice" or "all"
define("LOG_JS", "on"); // "on", "alert", "console" or "off"
# --------------------------------------------
# Internationalization
# --------------------------------------------
define("USE_I18N", false); // requires gettext for PHP.
// If "false", LANGUAGE is set to english
define("LANGUAGE", "en"); // only available if USE_I18N is "true".
// "en", "de", "bg", "gr", "nl", "it", es"
###HACK for GLOBALS
$DBSERVER=DBSERVER;
$DB=DB;
$OWNER=OWNER;
$PW=PW;
$GEOS_DBSERVER=GEOS_DBSERVER;
$GEOS_DB=GEOS_DB;
$GEOS_PORT =GEOS_PORT;
$GEOS_OWNER=GEOS_OWNER;
$GEOS_PW=GEOS_PW;
?>
And here the ERROR message from log-file:
2009.01.08, 16:52:45,ERROR: Error while executing prepared statement in /var/www/mapbender_2.5/http/frames/login.php: Sql: SELECT mb_user_login_count FROM mb_user WHERE mb_user_name = $1, Error: FEHLER: keine Berechtigung für Relation mb_user (...no authorization)
Greetings,
Christian
----- Ursprüngliche Nachricht -----
Von: Thomas Baschetti <Thomas.Baschetti at gmx.de>
Datum: Donnerstag, 8. Januar 2009, 16:49
Betreff: [Mapbender-users] Unable to login (function.pg-connect)
An: Mapbender User List <mapbender_users at lists.osgeo.org>
> Hi,
>
> > die entsprechenden Einträge in der mapbender.conf habe ich gemacht,
> > allerdings hatte sich dort wohl ein Denkfehler eingeschlichen.
> Hatte unter host
> > = 127.0.0.1 angegeben, da ja alle Anwendungen und Datenbanken
> auf dem
> > selben Server laufen.
>
> 127.0.0.1 should work.
>
> > Nun habe ich das mal in die korrekte IP-Adresse geändert.
>
> which gives the problem below.
>
> > Warning: pg_connect() [function.pg-connect]: Unable to
> connect to
> > PostgreSQL server: FATAL: fehlende oder fehlerhafter
> pg_hba.conf-Datei
>
> yes, because your connect now comes from the "correct" Ip-
> Adress,but your pg_hba.conf only allows 127...
> nothing won like this ;-)
>
> Please post your mapbender.conf.
> What did mapbender_setup.php say?
>
> Ciao
> Thomas
>
> --
> Thomas Baschetti
> --
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapbender_users/attachments/20090108/94409d8b/attachment.html
More information about the Mapbender_users
mailing list