MantisBT - TestLink
View Issue Details
0008863TestLinkTest Executepublic2020-02-11 12:122020-02-20 11:00
Kaa 
 
normalminorrandom
newopen 
1.9.19 (2019 Q1) 
 
MySQL
0008863: DB Access Error - debug_print_backtrace() OUTPUT START - after setting testcase result
When trying to execute a testcase and set the result, there's an error occuring sometimes (the result is always saved though):

 ==============================================================================

 DB Access Error - debug_print_backtrace() OUTPUT START

 ATTENTION: Enabling more debug info will produce path disclosure weakness (CWE-200)

            Having this additional Information could be useful for reporting

            issue to development TEAM.

 ==============================================================================

#0 database->exec_query() called at [/var/www/html/lib/functions/testcase.class.php:8456]

THE ANALYSIS:
In the closeOpenReqLinks function, in the DB_TYPE switch, there's no option for 'mysqli', just 'mysql' (the database type is 'mysqli' in my db_config file).

THE FIX:
Changing or adding the switch option (case) for 'mysqli' fixes the problem.

In Testlink version 1.9.20, the code looks like it has the same issue.
No tags attached.
Issue History
2020-02-11 12:12KaaNew Issue
2020-02-11 15:31fmanNote Added: 0029475
2020-02-11 15:35fmanNote Added: 0029476
2020-02-12 13:02KaaNote Added: 0029477
2020-02-12 15:59fmanNote Added: 0029478
2020-02-20 07:55KaaNote Added: 0029493
2020-02-20 11:00KaaNote Added: 0029498
2020-02-21 07:48KaaNote Deleted: 0029498

Notes
(0029475)
fman   
2020-02-11 15:31   
Thanks I'm going to check
(0029476)
fman   
2020-02-11 15:35   
theoretically, the installer does not write mysqli in the config_db.inc.php but mysql
can you confirm that the file was created by installer?
would you mind to provide your MySQL version, PHP Version?


thanks
(0029477)
Kaa   
2020-02-12 13:02   
You may be right, I think I had to change 'mysql' to 'mysqli' in the db_config, because the database connection didn't work right after the installation (PHP 7 doesn't support mysql, just mysqli commands).
PHP: 7.3.11
MySQL: 8.0.19
(0029478)
fman   
2020-02-12 15:59   
Ok, now is clear. DB_TYPE in config has to be always mysql.
There is a logic that instruct TestLink regarding usage of correct PHP ADODB Driver
(0029493)
Kaa   
2020-02-20 07:55   
You're right, but there was some problem which was solved by changing the driver to 'mysqli' in config_db. After going back to mysql in condig_db everything seems to be fine, so the problem is solved now.

But regarding the 'mysqli' driver, I checked the installation scripts and there are case switches which take 'mysql' or 'mysqli' as the DB_TYPE, so something is already done in the scripts about the 'mysqli'.