[PHP INI ISSUE]Unable to Log In After Upgrade 1.9.3 to 1.9.5

Ask community to help.

Moderators: Amaradana, TurboPT, TL Developers

Post Reply
babaluis
TestLink user
Posts: 13
Joined: Thu Oct 04, 2012 7:57 pm

[PHP INI ISSUE]Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by babaluis »

I am running Ubuntu 11.04, MySQL 5.1.54.

Before I did the upgrade I backed up my database. It works fine with TestLink 1.9.3.
The database conversion went OK, no errors.

When I try to log in using TestLink 1.9.5, the following error screen flashes for about 1 second (from index.php), then I am taken back to the login page:
==============================================================================

DB Access Error - debug_print_backtrace() OUTPUT START

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

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

Contents of audits.log:
[13/Feb/19 16:36:12][AUDIT][ra993io6m2q30q84kati2p0oi1][GUI]
Login for 'albert.pion' from '10.166.253.137' succeeded
Contents of userlog2.log:
[13/Feb/19 16:36:12][AUDIT][ra993io6m2q30q84kati2p0oi1][GUI]
Login for 'albert.pion' from '10.166.253.137' succeeded
[13/Feb/19 16:36:12][ERROR][<nosession>][DATABASE]
ERROR ON exec_query() - database.class.php <br />1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 - SELECT id,login,password,cookie_string,first,last,email,role_id,locale, login AS fullname, active,default_testproject_id, script_key FROM users WHERE id = <br />THE MESSAGE : SELECT id,login,password,cookie_string,first,last,email,role_id,locale, login AS fullname, active,default_testproject_id, script_key FROM users WHERE id =
Query failed: errorcode[1064]
errormsg:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
[13/Feb/19 16:36:12][WARNING][<nosession>][GUI]
E_NOTICE
Use of undefined constant DEBUG_BACKTRACE_IGNORE_ARGS - assumed 'DEBUG_BACKTRACE_IGNORE_ARGS' - in /usr/local/share/testlink-1.9.5/lib/functions/database.class.php - Line 212
[13/Feb/19 16:36:12][WARNING][<nosession>][GUI]
E_WARNING
debug_print_backtrace() expects exactly 0 parameters, 1 given - in /usr/local/share/testlink-1.9.5/lib/functions/database.class.php - Line 212
Does anyone have any ideas about how to fix this?
TurboPT
Member of TestLink Community
Posts: 343
Joined: Sun Dec 10, 2006 4:51 am

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by TurboPT »

babaluis wrote:...Does anyone have any ideas about how to fix this?
Yes, see this other post.
babaluis
TestLink user
Posts: 13
Joined: Thu Oct 04, 2012 7:57 pm

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by babaluis »

The issue in the Mantis database is not the same. The issue in the Mantis database appears to be a difficulty in setting a new password after logging in.

I am unable to log in no matter what user name / password I try to use. I get the error message I indicated in my initial post, and I'm redirected immediately back to the login page.
I've tried my old account/password, tried creating a new user and password, still no luck.
babaluis
TestLink user
Posts: 13
Joined: Thu Oct 04, 2012 7:57 pm

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by babaluis »

Is there a work-around for this problem?
TurboPT
Member of TestLink Community
Posts: 343
Joined: Sun Dec 10, 2006 4:51 am

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by TurboPT »

At the other post, the OP claimed to have the same problem, but there was never a reply whether there was success, or not...

Strangely, there is no value for the ID at the end of the query string. Can you manually check the users table and see if the data appears to be correct? If so, and if the email address happens to be blank, try adding one [anything temporary, like blah@blah.com] to see if that makes any difference.
babaluis
TestLink user
Posts: 13
Joined: Thu Oct 04, 2012 7:57 pm

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by babaluis »

I looked at the user table and the only difference between the V1.9.3 table and the V1.9.5 table is the cookie_string column. All of the columns are filled in, including e-mail, with what appears to be valid data, however the default_testproject_id and script_key fields are NULL for all users.
babaluis
TestLink user
Posts: 13
Joined: Thu Oct 04, 2012 7:57 pm

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by babaluis »

Looking at the data base with phpmyadmin, there are two new tables that look strange: tcases_active and tcversions_last_active both have a type of 'View' whereas all other tables have a type of MyISAM. Don't know if this is significant.
TurboPT
Member of TestLink Community
Posts: 343
Joined: Sun Dec 10, 2006 4:51 am

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by TurboPT »

I see the same views, so that is not a problem.

The audits.log shows that your login succeeded, so I'm not 100% sure at this point. Maybe fman, if he crosses this post, can offer some other things to check/try.

Some other things I can think of for the user's table:
1. does the id column for your user entry have a value?
2. Is the active column set to 1 for your user?
3. Try deleting the cookie value [copy it first, to keep the original] to see if that makes any difference.

Also, check the server logs to see if anything strange might appear with testlink-related entries.
babaluis
TestLink user
Posts: 13
Joined: Thu Oct 04, 2012 7:57 pm

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by babaluis »

Is it possible to export all of the old data and import it into a new installation (that is, without copying the database itself)?
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by fman »

export import is not an option
babaluis
TestLink user
Posts: 13
Joined: Thu Oct 04, 2012 7:57 pm

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by babaluis »

It is failing in login.php, line 244, in function authorizePostProcessing(), in which it redirects back to index.php in this code:
// ... or show main page
redirect($_SESSION['basehref'] . "index.php" .
($argsObj->preqURI ? "?reqURI=".urlencode($argsObj->preqURI) :""));
Does that give you a clue? (I'm no PHP programmer, but I was able to trace it that far).
fman
Member of TestLink Community
Posts: 3123
Joined: Tue Nov 15, 2005 7:19 am

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by fman »

IMHO only option is that you send me a backup of your 1.9.3 db and I will try to migrate it
if things will go well, then will be up to you to provide some donation
before creating the 1.9.3 dump please truncate transactions and events table
francisco.mancardi@gmail.com (testlink team leader)
pitufo2013
TestLink user
Posts: 1
Joined: Sun Jul 07, 2013 8:24 pm

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by pitufo2013 »

This week I upgrade 1.9.3 to 1.9.5 then met the same problem.
Then I found the README has a issue:
"Copy your old config_db.inc.php and custom_config.inc.php to NEW DIRECTORY"
At first you need copy these two files into NEW DIRECTORY.
but when you finished installation, you need restore 1.9.5 original files, if you don't do that you will meet login failed problem.
At last you have to reprepared your "config_db.inc.php" file the same as 1.9.3 version you did.

Finially, I need to take your attention that your PHP version should be 5.3, or else your issue traker management function will invalid.
babaluis
TestLink user
Posts: 13
Joined: Thu Oct 04, 2012 7:57 pm

Re: Unable to Log In After Upgrade 1.9.3 to 1.9.5

Post by babaluis »

I found the problem. I needed to have 'session.auto_start = 0' in php.ini. Now it seems to work OK.
Thanks for the help.
Post Reply