View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033173 | mantisbt | api rest | public | 2023-11-10 16:42 | 2023-11-14 04:56 |
Reporter | obmsch | Assigned To | dregad | ||
Priority | normal | Severity | block | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 2.26.0 | ||||
Target Version | 2.26.1 | ||||
Summary | 0033173: No endpoints working on Windows server with PHP 8.1+ | ||||
Description | I just opened 0033172, which I solved commenting out the startup code in my App. | ||||
Tags | No tags attached. | ||||
All endpoints working for my App on 2.25.8. |
|
See my note 0033172:0068307 |
|
Looks like the 'deprecated_errors_handler' is not working correctly. At least on Windows. From the PHP error log:
Problem with path separator? On windows its '\'. $p_file = "M:\www.root\MantisBT\vendor\slim\slim\Slim\Collection.php" |
|
I patched my MantisBT version and changed 'deprecated_errors_handler' from
to
And the REST API is working again. Changing the regex itself makes no sense, as the case-tags also expect '/' as well. I think doing the replacement on Windows |
|
Thanks for the analysis @obmsch, I'll have a look. |
|
Confirmed - I fired up a windows server and an API call that works just fine on LAMP, fails on WAMP with the error message reported in 0033173:0068312. This is a regression introduced by 0032866 (MantisBT master 795ff02e) |
|
@dregad thanks, can confirm this works. |
|
MantisBT: master-2.26 032000c6 2023-11-13 11:15 Details Diff |
Fix REST API endpoints failing on Windows When running on PHP >= 8.1, REST API calls throw errors on Windows, due to deprecated_errors_handler() function incorrectly expecting Unix-style path on offending file name. Converting `\` to `/` in $p_file variable before processing fixes the problem. Fixes 0033173 |
Affected Issues 0033173 |
|
mod - api/rest/index.php | Diff File |