installation problem : MDB2 Error: unknown error

Discussion forum about Anuko Time Tracker
Post Reply
doddy
Posts: 2
Joined: Wed Nov 30, 2016 3:18 pm

installation problem : MDB2 Error: unknown error

Post by doddy » Wed Nov 30, 2016 3:22 pm

Unable to get this to work. This is what I see on screen when I go to http://localhost/timetracker/dbinstall.php

Environment Checks
WEB-INF/templates_c/ directory is writable.
WEB-INF/config.php file exists.
DSN is defined.
PHP version: 5.5.38, good enough.
mysqli PHP extension is loaded.
mbstring PHP extension is loaded.
gd PHP extension is loaded.
Error: connection to database failed. MDB2 Error: unknown error

I have validated the DB name and ID and password.

Any clues?

Thanks

peter
Posts: 75
Joined: Sat May 29, 2010 2:06 pm

Re: installation problem : MDB2 Error: unknown error

Post by peter » Thu Dec 01, 2016 12:59 pm

Mostly likely the problem is with your DSN or database access permissions - something is wrong there, either login, password, or database name, or user account is not given rights to access the database.

doddy
Posts: 2
Joined: Wed Nov 30, 2016 3:18 pm

Re: installation problem : MDB2 Error: unknown error

Post by doddy » Sat Dec 03, 2016 3:03 am

Found the solution. instead of @localhost I needed to add the host name/shared server name in CONFIG.PHP

Instead of
define('DSN', 'mysqli://DB_USER:DB_PASSWORD!@localhost/DB_NAME?charset=utf8');

This worked
define('DSN', 'mysqli://DB_USER:DB_PASSWORD!@SPECIFIC_HOSTNAME/DB_NAME?charset=utf8');

All seems fine now..

BitGid

Re: installation problem : MDB2 Error: unknown error

Post by BitGid » Sun Feb 25, 2018 5:34 pm

Hello.

I get the similar error. I'm trying to install the latest version of TT on a xamp server with apache 2.4.29, PHP 5.6.32 and Maria db 10.1.28
I've followed step by step the instructions, but when I try to launch the dbinstall.php, I get this :

Environment Checks
WEB-INF/templates_c/ directory is writable.
WEB-INF/config.php file exists.
Error: WEB-INF/config.php file does not start with PHP opening tag.
DSN is defined.
PHP version: 5.6.32, good enough.
mysqli PHP extension is loaded.
mbstring PHP extension is loaded.
gd PHP extension is loaded.
Last edited by BitGid on Wed Feb 28, 2018 1:48 pm, edited 1 time in total.

Nik
Posts: 426
Joined: Wed May 26, 2010 5:55 pm

Re: installation problem : MDB2 Error: unknown error

Post by Nik » Sun Feb 25, 2018 5:51 pm

BitGid wrote:I'm trying to install the latest version of TT on a xamp server
How latest is your latest? As this below does not sound right.
BitGid wrote:Error: WEB-INF/config.php file does not start with PHP opening tag.
The above was adressed a while ago for Windows systems, together with timestamp issues, which you probably have...

Try to get an updated (most recent) version of Time Tracker code to see if it helps.

Nik
Posts: 426
Joined: Wed May 26, 2010 5:55 pm

Re: installation problem : MDB2 Error: unknown error

Post by Nik » Sun Feb 25, 2018 10:40 pm

Here is some more details:

Version 1.17.26.4004: Fixed environment check for PHP opening tag in config.php for Windows systems.
Version 1.17.24.4002: Fixed a timestamp problem related to WampServer.

I think you may be having the timestamp problem addressed in 1.17.24.4002. Try to use anything newer than 1.17.26.4004 (or better yet the latest, which is currently 1.17.32.4030) and see if it solves the issue.

The root cause of the timestamp issue that there was no default value for some timestamp fields in a few tables, and MySQL version in a current WampServer was picky about it. The problem was solved by introducing default values:

Code: Select all

`timestamp` timestamp default CURRENT_TIMESTAMP, # modification timestamp

instead of

`timestamp` timestamp NOT NULL,                # modification timestamp
I hope it helps.

Post Reply