Issue with API Key generation

LATEST Official version.
Questions and discussions - NO ISSUES
FOR ISSUES => http://mantis.testlink.org

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
zak
TestLink user
Posts: 2
Joined: Mon Jan 10, 2011 4:55 pm

Issue with API Key generation

Post by zak »

Using testlink 1.9 latest stable release

Under personal, with the options

$tlCfg->api->enabled = TRUE;

$tlCfg->exec_cfg->enable_test_automation = ENABLED;

The generate button "generate a new key" is present. When clicked I get:
==============================================================================
DB Access Error - debug_print_backtrace() OUTPUT START
==============================================================================
#0 database->exec_query(UPDATE users SET script_key='995ea579787b7489867930b5b0d37e36' WHERE id='1') called at [C:\Program Files\EasyPHP-5.3.2i\www\testlink-1.9.0\lib\api\APIKey.php:41]
#1 APIKey->addKeyForUser(1) called at [C:\Program Files\EasyPHP-5.3.2i\www\testlink-1.9.0\lib\usermanagement\userInfo.php:164]
...

tl19user_testproject_roles,[users] => tl19users),[loginRegExp] => /^[\w \- .]+$/)) called at [C:\Program Files\EasyPHP-5.3.2i\www\testlink-1.9.0\lib\usermanagement\userInfo.php:59]
==============================================================================

If anyone has an idea on how to solve this, I would really appreciate it.
zak
TestLink user
Posts: 2
Joined: Mon Jan 10, 2011 4:55 pm

Re: Issue with API Key generation

Post by zak »

Can anyone suggest a fix?

Should I try a different testlink release than the latest stable one?
jack090
Advanced user
Posts: 39
Joined: Tue Dec 21, 2010 4:16 pm

Re: Issue with API Key generation

Post by jack090 »

Hrm.. looks like your on a windows box. If your using Microsoft SQL Server you need to go to database.class.php add:
' case "mssql": ' on the function fetch_array( &$p_result )

Otherwise can you give more details on your environment?
jack090
Advanced user
Posts: 39
Joined: Tue Dec 21, 2010 4:16 pm

Re: Issue with API Key generation

Post by jack090 »

Also the key to this is: ( UPDATE users SET script_key='995ea579787b7489867930b5b0d37e36' WHERE id='1' ) try running that in your sql server manually. If it works then it's something wrong w/ TestLink talking to SQL if it doesn't work then it's probably missing something like update dbo.jiradb.users set script_key='blahblahblah'.... I had to hard code a few places in my settings files to be specific on the full path (not use shortcuts).
Post Reply