View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0035549 | mantisbt | plug-ins | public | 2025-03-07 08:21 | 2025-03-13 06:49 |
Reporter | raspopov | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 2.27.1 | ||||
Summary | 0035549: MantisGraph APPLICATION ERROR 401 with SQLite | ||||
Description | When the
All other pages of MantisGraph work fine. This only happens on PHP 7.4, everything displays fine on PHP 8.3. | ||||
Additional Information | Debug Log has the one additional event in the PHP 8.4 that is missing in the PHP 7.4 case:
Empty database, one project (id=1), no issues. Branch: master. | ||||
Tags | No tags attached. | ||||
related to | 0010573 | acknowledged | support SQLite |
I'm not able to reproduce this on my dev box. Maybe it's caused by specific database settings ? What happens when you run the query against the database directly ? |
|
It does not actually say '0', but that FLOOR is an unknown identifier. PHP 7.4 comes with SQLite 3.31, which does not have the FLOOR function. By the way, is it mandatory to use this function in the MantisGraph plugin, or can we somehow get by without it? |
|
Well it would have been worth mentioning somewhere that you were using SQLite, which is not (yet at least - see 0010573) supported - I was assuming you were on MySQL...
It is not, really. The requirement is to get an integer value without rounding, so floor was the most logical choice when I refactored graph_api.php last year. I'm fine with using an alternative as long as we get the same results. And we're dealing with unix timestamps here, so only positive values.
I'm a bit surprised by this statement, because to my knowledge libsqlite3 is no longer bundled since 7.4, so PHP should use whatever version is installed on the system. According to the SQLite change log, built-in math functions should be available since 3.35.0, assuming it has been compiled with the appropriate flag as you pointed out (which is the case on Ubuntu and Windows). So we could also decide to require this minimum version (and make sure. |
|
Yes, indeed. I almost always use SQLite and I don't even notice it anymore.
I am using PHP For Windows which is available here: https://windows.php.net/download/ |
|