Page 1 of 1

Issue with API Key generation

Posted: Mon Jan 10, 2011 4:59 pm
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.

Re: Issue with API Key generation

Posted: Wed Jan 12, 2011 10:28 am
by zak
Can anyone suggest a fix?

Should I try a different testlink release than the latest stable one?

Re: Issue with API Key generation

Posted: Tue Jan 18, 2011 9:52 pm
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?

Re: Issue with API Key generation

Posted: Tue Jan 18, 2011 10:16 pm
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).