APPLICATION ERROR #401, database error#1064

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
krell66
Posts: 2
Joined: 13 Jun 2019, 14:30

APPLICATION ERROR #401, database error#1064

Post by krell66 »

Hi,
after an automatic upgrade (current Mantisbt revision is now 2.9.0) when I try to:
- "Manage Projects", "Global Categories" and "Edit" one of Global Categories
the following screen appears:

APPLICATION ERROR #401
Database query failed. Error received from database was #1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 4 for the query: SELECT id, username, realname, access_level
FROM mantis_user_table
WHERE enabled = ?
AND access_level >= .
Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.


The same happens when I try to view an issue, selecting related ID.

Is anybody who can help me?

Thanks

More information about Mantisbt I am using are the following:
Synology Diskstation
MantisBT Version 2.9.0
Schema Version 183
PHP Version 5.6.40
Database Driver mysqli
Database Version, Description 10.3.11, 10.3.11-MariaDB
Site Path /volume1/web/mantisbt/
Core Path /volume1/web/mantisbt/core/
Plugin Path /volume1/web/mantisbt/plugins/

mmorag
Posts: 1
Joined: 14 Jun 2019, 15:59

Re: APPLICATION ERROR #401, database error#1064

Post by mmorag »

Same error when I try to view an issue or selecting related ID, as well as trying to accesing to Admin-config / transition or email-not.

I migrated old mysql (with lots of issues) and mantis version:

Old mysql ver.: 5.1.73 -> Migrated to: 5.7.26 MySQL Community Server (restoring db to the new one - bck-using mysqldump)
Old Mantis ver.: 1.2.19 -> Migrated to: 2.21

Addly, when I try to filter with "Assigned to", it shows "error: Internal Server Error".

Restoring database was successfully, and using install.php, I updated db manually using sql sentences given by installer.

Somebody has any idea how to solve it?. thks.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: APPLICATION ERROR #401, database error#1064

Post by atrol »

Go back to your 1.2.19 dump and try the following steps
- clear browser cookies
- run install script to upgrade the database (don't do it manually)
- try if it works
- in any case run admin/check/index.php after the upgrade and check for errors and warnings
Please use Search before posting and read the Manual
krell66
Posts: 2
Joined: 13 Jun 2019, 14:30

Re: APPLICATION ERROR #401, database error#1064

Post by krell66 »

Hi,
any directions to solve the problem on 2.9.0 revision?

Thanks,
cas
Posts: 1586
Joined: 11 Mar 2006, 16:08
Contact:

Re: APPLICATION ERROR #401, database error#1064

Post by cas »

@krell66, does your issue come from the same activity mmorag is reporting? Then follow advice from atrol.
Alip
Posts: 2
Joined: 18 Jun 2019, 08:50

Re: APPLICATION ERROR #401, database error#1064

Post by Alip »

Hello everyone,
I met the same error of krell66, after an automatic update from a Synology NAS.
MantisBT - 2.9.0.0074
MariaDB - 10.3.11-0054
I am not an expert of DBs nor of Mantis. Could you please explain in detail what am I supposed to do to try to fix the error? Am I supposed to fix MariaDB or MantisBT? Have I to reinstall through command line rather than through Synology Workstation GUI? (Most important) - will the reinstallation process delete all data in my current db?
Thank you and excuse me for the many questions, but I am really a newbie about Mantis and MariaDB.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: APPLICATION ERROR #401, database error#1064

Post by atrol »

Alip wrote: 18 Jun 2019, 09:52after an automatic update from a Synology NAS.
I don't know that much about Synology in general and how they install / upgrade Mantis
Alip wrote: 18 Jun 2019, 09:52 MantisBT - 2.9.0.0074
Quite outdated with known major security issues. It seems that Synology is not that much interested in keeping the application up to date.
Version 2.9.0 can't be recommended for production purposes.
Alip wrote: 18 Jun 2019, 09:52 please explain in detail what am I supposed to do to try to fix the error?
Hard to say, as I don't known how to install. Maybe just replacing the current Mantis installation folder by latest official Mantis download (2.21.1 at the moment) + copying current config_inc.php to config folder is enough for it.
But again: I don't know how Synology installs Mantis, if they change any files, folders, ...
Alip wrote: 18 Jun 2019, 09:52will the reinstallation process delete all data in my current db?
The Mantis installer/upgrader does not destroy anything. But I don't know what the Synology installer does.

I would
- do a database backup
- install lasted Mantis the way it's described in Mantis Admin Guide
- provide the credentials of currently used database in Mantis installer UI
Please use Search before posting and read the Manual
Alip
Posts: 2
Joined: 18 Jun 2019, 08:50

Re: APPLICATION ERROR #401, database error#1064

Post by Alip »

Hello Atrol,
I followed your advices and did the following:
1. Backed up current Mantis DB
2. Uninstalled Synology's packaged Mantis app (2.9)
3. Downloaded latest stable release from Mantis website (2.21)
4. Deployed Mantis package in the same folder where Mantis 2.9 was located on NAS webserver
Doing so, though, I wasn't able to browse Mantis install.php page; probably some configuration for it to properly being seen by the webserver was missing.
So, I reverted step 4 and installed Synology's Mantis 2.9 again. At that point (after successful installation and launch from NAS control panel) I manually deleted Mantis folder content and replaced it with Mantis 2.21. This time, I was able to browse Mantis install.php page, and run the "regular" installation, making it to point to our DB. One error was reported at the end of installation (one null field in tokens table record), I manually fixed it by accessing DB. After that, installation was completed successfully.
I logged in and, wow!, problem looks fixed. The error message is gone, and all functions and settings seem to be on their place.
I have a weird status on NAS now, as system thinks "its" Mantis package is installed (it's still visible in the package center, I can start and stop service from there, and 2.9 is reported to be current version); I disabled automatic update to avoid further interference, and hope this mismatch won't cause troubles in future. What's important for me now is that Mantis is back to operative, and no data was lost in the process.
Thank you for support, I wouldn't have been able to get out of that without your help.
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: APPLICATION ERROR #401, database error#1064

Post by atrol »

Thanks for coming back and telling the solution.

Did you contatc also Synology support to get this fixed?
Please use Search before posting and read the Manual
Post Reply