View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0015880 | mantisbt | db mssql | public | 2013-05-18 13:22 | 2014-05-16 15:00 |
| Reporter | mbakaimani | Assigned To | dregad | ||
| Priority | normal | Severity | block | Reproducibility | N/A |
| Status | closed | Resolution | unable to reproduce | ||
| Summary | 0015880: Am Failing to Login After Installation | ||||
| Description | APPLICATION ERROR 0000401 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. | ||||
| Tags | No tags attached. | ||||
| Attached Files | MantisBT.htm (6,197 bytes)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://localhost/nicolifemantis/css/default.css" />
<script type="text/javascript"><!--
if(document.layers) {document.write("<style>td{padding:0px;}<\/style>")}
// --></script>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma-directive" content="no-cache" />
<meta http-equiv="Cache-Directive" content="no-cache" />
<meta http-equiv="Expires" content="Mon, 20 May 2013 16:19:06 GMT" />
<link rel="shortcut icon" href="/nicolifemantis/images/favicon.ico" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Text Search" href="http://localhost/nicolifemantis/browser_search_plugin.php?type=text" /> <link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Issue Id" href="http://localhost/nicolifemantis/browser_search_plugin.php?type=id" /> <title>MantisBT</title>
<script type="text/javascript" src="/nicolifemantis/javascript/min/common.js"></script>
<script type="text/javascript">var loading_lang = "Loading...";</script><script type="text/javascript" src="/nicolifemantis/javascript/min/ajax.js"></script>
</head>
<body>
<div align="left"><a href="my_view_page.php"><img border="0" alt="MantisBT" src="/nicolifemantis/images/mantis_logo.png" /></a></div><br /><div align="center"><table class="width50" cellspacing="1"><tr><td class="form-title">APPLICATION ERROR #401</td></tr><tr><td><p class="center" style="color:red">Database query failed. Error received from database was #22005: [Microsoft][ODBC SQL Server Driver]Invalid character value for cast specification for the query: DELETE FROM mantis_tokens_table WHERE ? > expiry.</p></td></tr><tr><td><p class="center">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.</p></td></tr><tr><td> <center>
<table class="width75">
<tr>
<td>Full path: C:\inetpub\wwwroot\nicolifemantis\core\database_api.php</td>
</tr>
<tr>
<td>Line: 405</td>
</tr>
<tr>
<td>
<table class="width100"><tr><th>Variable</th><th>Value</th><th>Type</th></tr><tr><td>p_query</td><td>DELETE FROM mantis_tokens_table WHERE ? > expiry</td><td>string</td></tr>
<tr><td>p_limit</td><td>-1</td><td>integer</td></tr>
<tr><td>p_offset</td><td>-1</td><td>integer</td></tr>
<tr><td>g_db_log_queries</td><td></td><td>boolean</td></tr>
<tr><td>g_db_param_count</td><td>7</td><td>integer</td></tr>
<tr><td>t_db_type</td><td>odbc_mssql</td><td>string</td></tr>
<tr><td>s_check_params</td><td>1</td><td>boolean</td></tr>
<tr><td>params</td><td>1</td><td>integer</td></tr>
<tr><td>i</td><td>1</td><td>integer</td></tr>
<tr><td>t_result</td><td></td><td>boolean</td></tr>
<tr><td colspan="3" align="left"><br /><strong>arr_parms</strong></td></tr><tr><td colspan="3"><table class="width100"><tr><th>Variable</th><th>Value</th><th>Type</th></tr><tr><td>0</td><td>1369066746</td><td>integer</td></tr>
</table></td></tr><tr><td colspan="3" align="left"><br /><strong>g_queries_array</strong></td></tr><tr><td colspan="3"><table class="width100"><tr><th>Variable</th><th>Value</th><th>Type</th></tr><tr><td>0</td><td>1</td><td>integer</td></tr>
<tr><td>1</td><td>1</td><td>integer</td></tr>
<tr><td>2</td><td>1</td><td>integer</td></tr>
<tr><td>3</td><td>1</td><td>integer</td></tr>
<tr><td>4</td><td>1</td><td>integer</td></tr>
<tr><td>5</td><td>1</td><td>integer</td></tr>
<tr><td>6</td><td>1</td><td>integer</td></tr>
<tr><td>7</td><td>1</td><td>integer</td></tr>
</table></td></tr></table> </td>
</tr>
</table>
</center>
</td></tr><tr><td><center><table class="width75"><tr><th>Filename</th><th>Line</th><th></th><th></th><th>Function</th><th>Args</th></tr><tr class="row-1"><td>C:\inetpub\wwwroot\nicolifemantis\core\database_api.php</td><td>405</td><td>-</td><td>-</td><td>trigger_error</td><td>( <string>'401', <integer>256 )</td></tr><tr class="row-2"><td>C:\inetpub\wwwroot\nicolifemantis\core\tokens_api.php</td><td>263</td><td>-</td><td>-</td><td>db_query_bound</td><td>( <string>'DELETE FROM mantis_tokens_table WHERE ? > expiry', <Array> { [0] => 1369066746 } )</td></tr><tr class="row-1"><td>C:\inetpub\wwwroot\nicolifemantis\core\tokens_api.php</td><td>277</td><td>-</td><td>-</td><td>token_purge_expired</td><td>-</td></tr><tr class="row-2"><td>C:\inetpub\wwwroot\nicolifemantis\core\tokens_api.php</td><td>69</td><td>-</td><td>-</td><td>token_purge_expired_once</td><td>-</td></tr><tr class="row-1"><td>C:\inetpub\wwwroot\nicolifemantis\core\authentication_api.php</td><td>623</td><td>-</td><td>-</td><td>token_get</td><td>( <integer>4, <string>'1' )</td></tr><tr class="row-2"><td>C:\inetpub\wwwroot\nicolifemantis\core\authentication_api.php</td><td>244</td><td>-</td><td>-</td><td>auth_set_tokens</td><td>( <string>'1' )</td></tr><tr class="row-1"><td>C:\inetpub\wwwroot\nicolifemantis\login.php</td><td>43</td><td>-</td><td>-</td><td>auth_attempt_login</td><td>( <string>'administrator', <string>'root', <boolean>false )</td></tr></table></center></td></tr></table></div><p>Previous non-fatal errors occurred. Page contents follow.</p><div style="border: solid 1px black;padding: 4px"><p style="color:red">SYSTEM WARNING: 'date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in 'C:\inetpub\wwwroot\nicolifemantis\core.php' line 254</p></div></body>
</html>
My View - MantisBT.htm (11,692 bytes)
<br /><div align="center"><table class="width50" cellspacing="1"><tr><td class="form-title">APPLICATION ERROR #401</td></tr><tr><td><p class="center" style="color:red">Database query failed. Error received from database was #0: [Microsoft][ODBC SQL Server Driver]Invalid parameter number for the query: <br />
SELECT DISTINCT cft.id<br />
FROM mantis_custom_field_table cft<br />
JOIN mantis_custom_field_project_table cfpt ON cfpt.field_id = cft.id<br />
JOIN mantis_project_table pt<br />
ON pt.id = cfpt.project_id AND pt.enabled = 1<br />
LEFT JOIN mantis_project_user_list_table pult<br />
ON pult.project_id = cfpt.project_id AND pult.user_id = ?<br />
, mantis_user_table ut<br />
WHERE ut.id = ?<br />
AND ( pt.view_state = 10<br />
OR pult.user_id = ut.id<br />
OR ( pult.user_id IS NULL AND ut.access_level >=? ) ).</p></td></tr><tr><td><p class="center">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.</p></td></tr><tr><td> <center>
<table class="width75">
<tr>
<td>Full path: C:\inetpub\wwwroot\nicolifemantis\core\database_api.php</td>
</tr>
<tr>
<td>Line: 405</td>
</tr>
<tr>
<td>
<table class="width100"><tr><th>Variable</th><th>Value</th><th>Type</th></tr><tr><td>p_query</td><td>
SELECT DISTINCT cft.id
FROM mantis_custom_field_table cft
JOIN mantis_custom_field_project_table cfpt ON cfpt.field_id = cft.id
JOIN mantis_project_table pt
ON pt.id = cfpt.project_id AND pt.enabled = 1
LEFT JOIN mantis_project_user_list_table pult
ON pult.project_id = cfpt.project_id AND pult.user_id = ?
, mantis_user_table ut
WHERE ut.id = ?
AND ( pt.view_state = 10
OR pult.user_id = ut.id
OR ( pult.user_id IS NULL AND ut.access_level >=? ) )</td><td>string</td></tr>
<tr><td>p_limit</td><td>-1</td><td>integer</td></tr>
<tr><td>p_offset</td><td>-1</td><td>integer</td></tr>
<tr><td>g_db_log_queries</td><td></td><td>boolean</td></tr>
<tr><td>g_db_param_count</td><td>15</td><td>integer</td></tr>
<tr><td>t_db_type</td><td>odbc_mssql</td><td>string</td></tr>
<tr><td>s_check_params</td><td>1</td><td>boolean</td></tr>
<tr><td>params</td><td>3</td><td>integer</td></tr>
<tr><td>i</td><td>3</td><td>integer</td></tr>
<tr><td>t_result</td><td></td><td>boolean</td></tr>
<tr><td colspan="3" align="left"><br /><strong>arr_parms</strong></td></tr><tr><td colspan="3"><table class="width100"><tr><th>Variable</th><th>Value</th><th>Type</th></tr><tr><td>0</td><td>1</td><td>integer</td></tr>
<tr><td>1</td><td>1</td><td>integer</td></tr>
<tr><td>2</td><td>90</td><td>integer</td></tr>
</table></td></tr><tr><td colspan="3" align="left"><br /><strong>g_queries_array</strong></td></tr><tr><td colspan="3"><table class="width100"><tr><th>Variable</th><th>Value</th><th>Type</th></tr><tr><td>0</td><td>1</td><td>integer</td></tr>
<tr><td>1</td><td>1</td><td>integer</td></tr>
<tr><td>2</td><td>1</td><td>integer</td></tr>
<tr><td>3</td><td>1</td><td>integer</td></tr>
<tr><td>4</td><td>1</td><td>integer</td></tr>
<tr><td>5</td><td>1</td><td>integer</td></tr>
<tr><td>6</td><td>1</td><td>integer</td></tr>
<tr><td>7</td><td>1</td><td>integer</td></tr>
<tr><td>8</td><td>1</td><td>integer</td></tr>
<tr><td>9</td><td>1</td><td>integer</td></tr>
<tr><td>10</td><td>1</td><td>integer</td></tr>
<tr><td>11</td><td>1</td><td>integer</td></tr>
<tr><td>12</td><td>1</td><td>integer</td></tr>
</table></td></tr></table> </td>
</tr>
</table>
</center>
</td></tr><tr><td><center><table class="width75"><tr><th>Filename</th><th>Line</th><th></th><th></th><th>Function</th><th>Args</th></tr><tr class="row-1"><td>C:\inetpub\wwwroot\nicolifemantis\core\database_api.php</td><td>405</td><td>-</td><td>-</td><td>trigger_error</td><td>( <string>'401', <integer>256 )</td></tr><tr class="row-2"><td>C:\inetpub\wwwroot\nicolifemantis\core\custom_field_api.php</td><td>749</td><td>-</td><td>-</td><td>db_query_bound</td><td>( <string>'
SELECT DISTINCT cft.id
FROM mantis_custom_field_table cft
JOIN mantis_custom_field_project_table cfpt ON cfpt.field_id = cft.id
JOIN mantis_project_table pt
ON pt.id = cfpt.project_id AND pt.enabled = 1
LEFT JOIN mantis_project_user_list_table pult
ON pult.project_id = cfpt.project_id AND pult.user_id = ?
, mantis_user_table ut
WHERE ut.id = ?
AND ( pt.view_state = 10
OR pult.user_id = ut.id
OR ( pult.user_id IS NULL AND ut.access_level >=? ) )', <Array> { [0] => 1, [1] => 1, [2] => 90 } )</td></tr><tr class="row-1"><td>C:\inetpub\wwwroot\nicolifemantis\core\columns_api.php</td><td>188</td><td>-</td><td>-</td><td>custom_field_get_linked_ids</td><td>( <integer>0 )</td></tr><tr class="row-2"><td>C:\inetpub\wwwroot\nicolifemantis\core\custom_function_api.php</td><td>230</td><td>-</td><td>-</td><td>columns_get_all</td><td>( <integer>0 )</td></tr><tr class="row-1"><td>-</td><td>-</td><td>-</td><td>-</td><td>custom_function_default_get_columns_to_view</td><td>( <integer>1, <NULL>NULL )</td></tr><tr class="row-2"><td>C:\inetpub\wwwroot\nicolifemantis\core\helper_api.php</td><td>344</td><td>-</td><td>-</td><td>call_user_func_array</td><td>( <string>'custom_function_default_get_columns_to_view', <Array> { [0] => 1, [1] => NULL } )</td></tr><tr class="row-1"><td>C:\inetpub\wwwroot\nicolifemantis\core\helper_api.php</td><td>379</td><td>-</td><td>-</td><td>helper_call_custom_function</td><td>( <string>'get_columns_to_view', <Array> { [0] => 1, [1] => NULL } )</td></tr><tr class="row-2"><td>C:\inetpub\wwwroot\nicolifemantis\core\filter_api.php</td><td>602</td><td>-</td><td>-</td><td>helper_get_columns_to_view</td><td>-</td></tr><tr class="row-1"><td>C:\inetpub\wwwroot\nicolifemantis\core\filter_api.php</td><td>784</td><td>-</td><td>-</td><td>filter_ensure_valid_filter</td><td>( <Array> { ['show_category'] => <Array> { [0] => 0 }, ['show_severity'] => <Array> { [0] => 0 }, ['show_status'] => <Array> { [0] => 0 }, ['highlight_changed'] => 6, ['reporter_id'] => <Array> { [0] => 0 }, ['handler_id'] => <Array> { [0] => 0 }, ['project_id'] => <Array> { [0] => -3 }, ['show_resolution'] => <Array> { [0] => 0 }, ['show_build'] => <Array> { [0] => 0 }, ['show_version'] => <Array> { [0] => 0 }, ['hide_status'] => <Array> { [0] => 90 }, ['user_monitor'] => <Array> { [0] => 0 }, ['sort'] => 'last_updated', ['dir'] => 'DESC', ['per_page'] => 50, ['match_type'] => 0 } )</td></tr><tr class="row-2"><td>C:\inetpub\wwwroot\nicolifemantis\my_view_inc.php</td><td>47</td><td>-</td><td>-</td><td>filter_get_default</td><td>-</td></tr><tr class="row-1"><td>C:\inetpub\wwwroot\nicolifemantis\my_view_page.php</td><td>115</td><td>-</td><td>-</td><td>include</td><td>( <string>'C:\\inetpub\\wwwroot\\nicolifemantis\\my_view_inc.php' )</td></tr></table></center></td></tr></table></div><p>Previous non-fatal errors occurred. Page contents follow.</p><div style="border: solid 1px black;padding: 4px"><p style="color:red">SYSTEM WARNING: 'date_default_timezone_get(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone.' in 'C:\inetpub\wwwroot\nicolifemantis\core.php' line 254</p><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="http://localhost/nicolifemantis/css/default.css" />
<script type="text/javascript"><!--
if(document.layers) {document.write("<style>td{padding:0px;}<\/style>")}
// --></script>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma-directive" content="no-cache" />
<meta http-equiv="Cache-Directive" content="no-cache" />
<meta http-equiv="Expires" content="Tue, 21 May 2013 15:09:17 GMT" />
<meta name="robots" content="noindex,follow" />
<link rel="shortcut icon" href="/nicolifemantis/images/favicon.ico" type="image/x-icon" />
<link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Text Search" href="http://localhost/nicolifemantis/browser_search_plugin.php?type=text" /> <link rel="search" type="application/opensearchdescription+xml" title="MantisBT: Issue Id" href="http://localhost/nicolifemantis/browser_search_plugin.php?type=id" /> <title>My View - MantisBT</title>
<script type="text/javascript" src="/nicolifemantis/javascript/min/common.js"></script>
<script type="text/javascript">var loading_lang = "Loading...";</script><script type="text/javascript" src="/nicolifemantis/javascript/min/ajax.js"></script>
<meta http-equiv="Refresh" content="1800;URL=http://localhost/nicolifemantis/my_view_page.php" />
</head>
<body>
<div align="left"><a href="my_view_page.php"><img border="0" alt="MantisBT" src="/nicolifemantis/images/mantis_logo.png" /></a></div><table class="hide"><tr><td class="login-info-left">Logged in as: <span class="italic">administrator</span> <span class="small">(administrator)</span></td><td class="login-info-middle"><span class="italic">2013-05-21 15:09 UTC</span></td><td class="login-info-right"><form method="post" name="form_set_project" action="/nicolifemantis/set_project.php">Project: <select name="project_id" class="small" onchange="document.forms.form_set_project.submit();"><option value="0" selected="selected" >All Projects</option>
</select> <input type="submit" class="button-small" value="Switch" /></form><a href="http://localhost/nicolifemantis/issues_rss.php?username=administrator&key=c78bce7eb956fc7d6f40a5b0389656f6"><img src="/nicolifemantis/images/rss.png" alt="RSS" style="border-style: none; margin: 5px; vertical-align: middle;" /></a></td></tr></table><table class="width100" cellspacing="0"><tr><td class="menu"><a href="/nicolifemantis/main_page.php">Main</a> | <a href="/nicolifemantis/my_view_page.php">My View</a> | <a href="/nicolifemantis/view_all_bug_page.php">View Issues</a> | <a href="/nicolifemantis/bug_report_page.php">Report Issue</a> | <a href="/nicolifemantis/changelog_page.php">Change Log</a> | <a href="/nicolifemantis/roadmap_page.php">Roadmap</a> | <a href="/nicolifemantis/summary_page.php">Summary</a> | <a href="/nicolifemantis/manage_overview_page.php">Manage</a> | <a href="/nicolifemantis/account_page.php">My Account</a> | <a href="/nicolifemantis/logout_page.php">Logout</a></td><td class="menu right nowrap"><form method="post" action="/nicolifemantis/jump_to_bug.php"><input type="text" name="bug_id" size="10" class="small" value="Issue #" onfocus="if (this.value == 'Issue #') this.value = ''" onblur="if (this.value == '') this.value = 'Issue #'" /> <input type="submit" class="button-small" value="Jump" /> </form></td></tr></table>
<div align="center">
<table class="hide" border="0" cellspacing="3" cellpadding="0">
<tr><td valign="top" width="50%"></div></body>
</html>
| ||||
|
mbakaimani, The provided information is not sufficient to provide any help in resolving the issue. A complete and detailed description is required for the support team to get a clear understanding of the problem. Please explain what you do, what are the results you expect to get and what you actually get. Also provide detailed, step-by-step instructions to reproduce the issue; the additional information listed below may also be useful:
|
|
|
Thanks dregad, am trying to login after installing Mantis. I hope this Informations is helpful |
|
|
The query being executed is deleting expired tokens from the database, based on a php timestamp (seconds since unix epoch); the 'expiry' column type should be unsigned int. Q1: Please confirm actual type in your DB). Q2: Identify the exact SQL being sent to MSSQL. Please follow these steps:
$g_show_detailed_errors = ON; WARNING - SECURITY RISK: the 'show_detailed_errors' config can cause MantisBT to display sensitive information about your system. We recommend to restrict its activation to a Test environment, only for as long as necessary. If possible, do not turn it ON globally, instead limit it for specific user(s) using the Manage Configuration page.
Q3: What happens if you run that query manually against the DB ? Note that I have no access to MSSQL, so further help might become difficult as I can't reproduce this issue here. |
|
|
I have reproduced, please find the attached HTML file as output |
|
|
What about the answers to my other 2 questions |
|
|
Q1: Please confirm actual type in your DB). Q3: What happens if you run that query manually against the DB ? the question mark after the WHERE seems not to be valid column in the table |
|
|
what is the meaning of the question mark (WHERE ? > expiry) in the query |
|
Check the actual data type in your db for column 'expiry' in mantis_tokens_table
The '?' Indicates a query parameter. Replace it with the actual value (e.g. 1369066746 in your case) |
|
|
Ans 1: The Data type is Datetime After replacing the ? with the Value(1369066746) there is overflow error (Arithmetic overflow error converting expression to data type datetime) |
|
|
As mentioned previously the colum should be unsigned int. Did the install complete successfully? Was it a fresh install or an upgrade? Can you check what is your current schema version (from Manage page) |
|
|
i will just try to start fresh installation and keep track of all events, will update you once completed |
|
|
i have successfully installed |
|
|
Dregad this is can be closed now am able to login |
|
|
ok thanks for feedback |
|
|
MantisBT currently supports Mysql and has support for other database engines. The support for other databases is known to be problematic. Having implemented the current database layer into Mantis 10 years ago, I'm currently working on replacing the current layer. If you are interested in using Mantis with non-mysql databases - for example, Oracle, PGSQL or MSSQL, and would be willing to help out testing the new database layer, please drop me an email at paul@mantisforge.org In the meantime, I'd advise running Mantis with Mysql Only to avoid issues. Thanks |
|