Application error #401 ?

Get help from other users here.

Moderators: Developer, Contributor

Application error #401 ?

Postby khali91 » Oct 04, 2010 5:49 am

Hi,

Today, I upgrade Mantis from 1.2.2 to 1.2.3. But I have a problem with my database. In fact, I imported my database, but when I logged, I have this error message :

APPLICATION ERROR #401

Database query failed. Error received from database was #1054 : Unknown column 'obsolete' in 'where clause' for the query : SELECT *
FROM mantis_project_version_table
WHERE project_id=0 AND obsolete = ? ORDER BY date_order DESC.


It's a problem with my MySQL database but I don't know what is the problem. When I upgrade to 1.2.2, I hadn't this problem, all worked find.

I tried to use the function REPAIR TABLE mantis_project_version_table, but it don't worked. Any idea about this problem ?

Thank you for your help.
khali91
 
Posts: 28
Joined: Aug 12, 2010 9:04 am

Re: Application error #401 ?

Postby atrol » Oct 04, 2010 7:02 am

Maybe you are connected to an older version. (maybe an upgrade from 1.1.x ?)
Check config_inc.php for your database connect.
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3632
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Application error #401 ?

Postby khali91 » Oct 04, 2010 7:18 am

Hi,

No, I am connected on Mantis 1.2.3. I imported an other database (it's my test database) and Mantis works. But when I import my true database, I have this error.

I modified my config_inc.php (line $g_database_name). It's the good name of my database. When I upgraded to 1.2.2, I hadn't problem. I use the same method to upgrade on 1.2.3. I don't know why I have this problem.

It's not about e problem with column on one of my table of my database (Unknown column 'obsolete' in 'where clause' for the query) ?
khali91
 
Posts: 28
Joined: Aug 12, 2010 9:04 am

Re: Application error #401 ?

Postby atrol » Oct 04, 2010 7:45 am

connect to the database with mysql command line tool (or phpMyAdmin)
Enter the following statement
Code: Select all
select * from mantis_version_table;

Is there a column "obsolete" or not?
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3632
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Application error #401 ?

Postby khali91 » Oct 04, 2010 8:13 am

When I enter select * from mantis_project_version_table;

Empty set (0.00 sec)


When I enter "desc mantis_project_version_table;"


+-------------+------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+------------------+------+-----+---------------------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| project_id | int(10) unsigned | NO | MUL | 0 | |
| version | varchar(64) | NO | | | |
| date_order | datetime | NO | | 1970-01-01 00:00:01 | |
| description | longtext | NO | | NULL | |
| released | tinyint(4) | NO | | 1 | |
+-------------+------------------+------+-----+---------------------+----------------+



The column obsolete don't exist. I create it ?
khali91
 
Posts: 28
Joined: Aug 12, 2010 9:04 am

Re: Application error #401 ?

Postby atrol » Oct 04, 2010 9:30 am

I still think that you are working on another database which has not been updated to 1.2.x

Run tthis statement
Code: Select all
select value from mantis_config_table where config_id = 'database_version';

If value is lesser than 183 , your database has not been updated to 1.2.3
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3632
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Application error #401 ?

Postby khali91 » Oct 04, 2010 9:36 am

I have add the column "obsolete". All work but when I click on a bug, I have a new error :

APPLICATION ERROR #401

Database query failed. Error received from database was t #1054 : Unknown column 'p.inherit_global' in 'field list' pour la requête : SELECT DISTINCT p.id, ph.parent_id, p.name, p.inherit_global, ph.inherit_parent
FROM mantis_project_table p
LEFT JOIN mantis_project_hierarchy_table ph
ON ph.child_id = p.id
WHERE p.enabled = ?
ORDER BY p.name.


I tried to create the column p.inherit_global, but don't work.

I enter select value from mantis_config_table where config_id = 'database_version';

and I have 63...
khali91
 
Posts: 28
Joined: Aug 12, 2010 9:04 am

Re: Application error #401 ?

Postby atrol » Oct 04, 2010 9:50 am

khali91 wrote:I have add the column "obsolete". All work but when I click on a bug, I have a new error :
Just my 2 Cents: You should stop with trying such changes.
Believe me: You are working on a database which has not been upgraded to latest version!

khali91 wrote:I enter select value from mantis_config_table where config_id = 'database_version';
and I have 63...
Just what I am saying: You are working on a 1.1.x database schema
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3632
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Application error #401 ?

Postby khali91 » Oct 04, 2010 10:05 am

Ok so I go to Mantis 1.1.x, I install my database and I upgrade to 1.2.3 ? May be should be work it ?
khali91
 
Posts: 28
Joined: Aug 12, 2010 9:04 am

Re: Application error #401 ?

Postby atrol » Oct 04, 2010 10:15 am

It's very confusing for me what you have written until now:
I can't imagine that you ever worked with 1.2.2 without any problem.
If it's true, there must be somewhere a database with version 183 which should work also with 1.2.3 without any problems.

If you don't have this database available any more, you should undo your manually database changes (the database with version 63), or even better recover your backup (if there is one)
After that, follow the instructions given in file doc/INSTALL of MantisBT 1.2.3 to do the upgrade.
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3632
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Application error #401 ?

Postby khali91 » Oct 04, 2010 10:52 am

Sorry for my bad english.

So, I installed Mantis 1.1.8 and it's, my Mantis work very well. I followed the doc to upgrade to Mantis 1.2.3. When I go to http://myser/mantis/admin/install.php, I click on "Upgrade database". All it's "GOOD" except "Schema create Table SQL"; I have this error :
BAD
CREATE TABLE mantis_plugin_table ( basename VARCHAR(40) NOT NULL, enabled TINYINT NOT NULL DEFAULT '0', PRIMARY KEY (basename) )ENGINE=MyISAM DEFAULT CHARSET=utf8
Table 'mantis_plugin_table' already exists
khali91
 
Posts: 28
Joined: Aug 12, 2010 9:04 am

Re: Application error #401 ?

Postby atrol » Oct 05, 2010 2:05 am

I am wondering again: The table mantis_plugin_table should not exist before upgrading
The best way is to setup a fresh 1.1.8 and to compare this database schema with your database schema before upgrading
Please use Search before posting and read the Manual
Use Mantis2Go to try MantisBT on Windows or to reproduce issues
atrol
 
Posts: 3632
Joined: Mar 26, 2008 4:37 pm
Location: Germany

Re: Application error #401 ?

Postby khali91 » Oct 05, 2010 5:09 am

Hi,

In fact, I returned to 1.1.8 and I upgrade to Mantis 1.2.3. The upgrade of my database is now OK. Mantis works.
The problem was the bad upgrade of my database like you told.

Thank you for your help.
khali91
 
Posts: 28
Joined: Aug 12, 2010 9:04 am


Return to Help

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron