View Issue Details

IDProjectCategoryView StatusLast Update
06223Bug reportsAuthenticationpublic2012-06-19 13:01
Reporteruser20453Assigned Toc_schmitz  
Status closedResolutionfixed 
Product Version1.92+ 
Fixed in Version1.92+ 
Summary06223: admin login dows not work with postgres
DescriptionI installed limesurvey using postgresql as database, and the install-tool finished successfully. But the admin-login always says "Incorrect username and/or password", even when I did not change the default admin / password combination.
I tried the password reset tool (reporting another bug seperately), no change.
TagsNo tags attached.
Complete LimeSurvey version number (& build)120613
I will donate to the project if issue is resolvedNo
Database & DB-VersionPostgreSQL 9.1.1
Server OS (if known)Debian
Webserver software & version (if known)nginx 1.2.0
PHP Version5.4.5



2012-06-16 17:00




2012-06-16 17:02

partner   ~19291

Can you please post the config.php section where username and password and DB details (no DB password!) are listed?


2012-06-16 17:06


// Basic Setup

$databasetype = 'postgres'; // ADOdb database driver - valid values are mysql, mysqli, odbc_mssql, mssql_n, odbtp or postgres

$databasename = 'umfragepiratenndsde'; // The name of the database that we will create
$databaseuser = 'umfragepiratenndsde'; // The name of a user with rights to create db (or if db already exists, then rights within that db)

$dbprefix = 'lime_'; // A global prefix that can be added to all LimeSurvey tables. Use this if you are sharing
// a database with other applications. Suggested prefix is 'lime_'

// File Locations
$rooturl = ""; // The root web url for your limesurvey installation (without a trailing slash).
// The double quotes (") are important.

$rootdir = dirname(__FILE__); // This is the physical disk location for your limesurvey installation. Normally you don't have to touch this

// Installation Setup
$defaultuser = 'admin'; // This is the username when LimeSurvey is installed and the administration user is created on installation
$defaultpass = 'password'; // This is the password for the administration user when LimeSurvey is installed

// Debug Settings
$debug = 1; // Set this to 1 if you are looking for errors. If you still get no errors after enabling this


2012-06-18 15:27

administrator   ~19311

ok, try the following:

delete all tables from the existing database, restore the /admin/install dir.
Edit createdb.php

Before line:
if($createdbtype=='postgres' && version_compare($connect->pgVersion, '9') >= 0)

insert the following line:

echo $connect->pgVersion; die();

When starting the installation now and it is trying to populate the data it should now show some kind of information.
Can you tell us what is shown?


2012-06-19 10:03

administrator   ~19334

Feedback please?


2012-06-19 10:23




2012-06-19 11:05

administrator   ~19338

Thank you. Now _move_ the inserted line right after the line.

$connect->execute("ALTER DATABASE {$dbname} SET bytea_output='escape';");

and run the install again.

Do you still get the same output?


2012-06-19 11:17


Yes, still the same output.


2012-06-19 11:33

administrator   ~19340

Last edited: 2012-06-19 11:34

View 3 revisions

OK, revert all changes and run the command on your Postgres LimeSurvey database manually.

ALTER DATABASE {$dbname} SET bytea_output='escape';

Replace {$dbname} with your actual limesurvey database name. Let us know if you get any errors if you run this.

If you get not error run the installation again (make sure the database exists and is empty) and check if you can login now.


2012-06-19 11:53


Ok, I got an error, because the user was not owner of the database.
After making the user owner, the installation and login works.

Maybe you could add an output for database errors, so the user is notified of these mishaps.


2012-06-19 13:01

administrator   ~19356

Fix committed to master branch:

Related Changesets

LimeSurvey: master e3012338

2012-06-19 03:20:20


Details Diff
Fixed issue 06223: Admin login does not work with postgres right after install Affected Issues
mod - admin/install/createdb.php Diff File

Issue History

Date Modified Username Field Change
2012-06-16 17:00 user20453 New Issue
2012-06-16 17:00 user20453 File Added: limesurvey_postgres.backup
2012-06-16 17:01 Mazi Assigned To => c_schmitz
2012-06-16 17:01 Mazi Status new => assigned
2012-06-16 17:02 Mazi Note Added: 19291
2012-06-16 17:02 Mazi Status assigned => feedback
2012-06-16 17:06 user20453 Note Added: 19292
2012-06-16 17:06 user20453 Status feedback => assigned
2012-06-18 15:27 c_schmitz Note Added: 19311
2012-06-18 15:27 c_schmitz Status assigned => feedback
2012-06-19 10:03 c_schmitz Note Added: 19334
2012-06-19 10:23 user20453 Note Added: 19336
2012-06-19 10:23 user20453 Status feedback => assigned
2012-06-19 11:05 c_schmitz Note Added: 19338
2012-06-19 11:17 user20453 Note Added: 19339
2012-06-19 11:33 c_schmitz Note Added: 19340
2012-06-19 11:34 c_schmitz Note Edited: 19340 View Revisions
2012-06-19 11:34 c_schmitz Note Edited: 19340 View Revisions
2012-06-19 11:53 user20453 Note Added: 19341
2012-06-19 12:20 c_schmitz Status assigned => closed
2012-06-19 12:20 c_schmitz Resolution open => fixed
2012-06-19 12:20 c_schmitz Fixed in Version => 1.92+
2012-06-19 13:01 c_schmitz Changeset attached => LimeSurvey master e3012338
2012-06-19 13:01 c_schmitz Note Added: 19356