View Issue Details

IDProjectCategoryView StatusLast Update
0032027mantisbtbugtrackerpublic2023-10-31 16:32
Reporterdregad Assigned Todregad  
PriorityhighSeveritymajorReproducibilityN/A
Status closedResolutionfixed 
Target Version2.26.0Fixed in Version2.26.0 
Summary0032027: PHP 8.2 support
Description

This is a generic issue to track PHP 8.2 compatibility. See related child issues for details.

MantisBT 2.25 cannot support PHP 8.2. This is due to the cross-dependency between the ADOdb library version 5.20 we're using, and our minimum supported PHP version (5.6).

ADOdb supports PHP 8.2 as of release 5.22.5, which has not yet been released as of this writing.

TagsPHP 8.2

Relationships

related to 0032866 closeddregad Allow REST API to run on PHP 8.1 without squelching E_DEPRECATED notices 
parent of 0031928 closeddregad Error on installation MantisBT 2.25.5 
parent of 0031943 closeddregad Creation of dynamic properies is deprecated in PHP 8.2 
parent of 0030429 closeddregad Upcoming incompatibility with PHP 8.2, "Deprecate ${} string interpolation" RFC 
parent of 0032028 closeddregad Update ADOdb to 5.22.6 
parent of 0031699 confirmed Upgrade Slim Framework to 4.x 
parent of 0032612 closeddregad DEPRECATED: 'Creation of dynamic property BugData::$bug_text_id 
parent of 0032807 closeddregad Update Guzzle to 7.8.0 
parent of 0032734 closeddregad Saving a filter triggers deprecated warning on PHP 8.2 
Not all the children of this issue are yet resolved or closed.

Activities

marc.kraemer

marc.kraemer

2023-02-17 10:12

reporter   ~0067398

PHP 8.2 is released 3 months ago, some updates to this version are comming.
Currently mantis does not even run. Warnings are one thing, but fatal errors or uncaught exceptions should be avoided.

marc.kraemer

marc.kraemer

2023-02-17 10:30

reporter   ~0067403

Last edited: 2023-02-17 10:49

patch added, to make mantis at least "work"

EDIT (dregad): for the record, the patch was added to 0031928

dregad

dregad

2023-02-17 10:48

developer   ~0067405

As stated, we are only supporting PHP up to 8.1 in the 2.25 branch, and we will not patch an upstream library for this. PHP 8.2 will be supported in version 2.26, when it is released (hopefully soon, as time allows).

In the meanwhile you're welcome to modify the source code of local instance, at your own risk of course.

vboctor

vboctor

2023-04-29 01:37

manager   ~0067717

Updating this issue since it seems that @dregad released 5.22.5 ADODB release - https://github.com/ADOdb/ADOdb/releases/tag/v5.22.5

seem

seem

2023-07-30 14:30

reporter   ~0067945

Last edited: 2023-07-30 14:32

Hello everyone.

I am using Fedora Rawhide with setup:

  • Nginx proxy and SSL teremination,
  • Apache web server,
  • PHP 8.2.9RC1 with php-fpm
  • MariaDB 10.5

It seems fairly complex and it kind of is, but it is also a popular solution with hosters.

First install page loads fine, but after typing database credentials I have this in Apache's error log:

Sun Jul 30 20:07:14.675852 2023] [proxy_fcgi:error] [pid 2132:tid 2132] [client 127.0.0.1:37698] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught mysqli_sql_exception: 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 'schema()schema()' at line 5 in /var/www/fedoratestpinglocal/public_html/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php:808\nStack trace:\n#0 /var/www/fedoratestpinglocal/public_html/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php(808): mysqli_query()\n#1 /var/www/fedoratestpinglocal/public_html/vendor/adodb/adodb-php/adodb.inc.php(1282): ADODB_mysqli->_query()\n#2 /var/www/fedoratestpinglocal/public_html/vendor/adodb/adodb-php/adodb.inc.php(1260): ADOConnection->_Execute()\n#3 /var/www/fedoratestpinglocal/public_html/vendor/adodb/adodb-php/adodb.inc.php(2599): ADOConnection->Execute()\n#4 /var/www/fedoratestpinglocal/public_html/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php(569): ADOConnection->MetaTables()\n#5 /var/www/fedoratestpinglocal/public_html/core/database_api.php(868): ADODB_mysqli->M...', referer: https://fedoratest.ping.local/

it has something to do with a file /var/www/fedoratestpinglocal/public_html/vendor/adodb/adodb-php/drivers/adodb-mysqli.inc.php and line 562:

$this->metaTablesSQL .= "schema()";

I think schema() is interpreted literally and not as a column name, as it should.

So yes, it is exacly like in 0031928 , which I just found.

dregad

dregad

2023-07-31 02:36

developer   ~0067947

Last edited: 2023-08-07 04:02

PHP 8.2.9RC1 with php-fpm

@seem As you surely realize since you posted in this issue and also found 0031928, PHP 8.2 is not yet supported. Please try the same with PHP 8.1, it should work.

dregad

dregad

2023-08-07 12:31

developer   ~0067971

GuzzleHttp needs to be upgraded to 7.5 or later for PHP 8.2 support. See 0032807

dregad

dregad

2023-09-02 06:57

developer   ~0068058

Last edited: 2023-09-02 06:59

It appears that the temporary workaround allowing REST API to run on PHP 8.1 (see 0032866) also fixes things for 8.2, so we should be able to resolve this without having to upgrade Slim framework to 4.x.

See PR https://github.com/mantisbt/mantisbt/pull/1911 and related Travis-CI builds (https://app.travis-ci.com/github/mantisbt/mantisbt/pull_requests).

Related Changesets

MantisBT: master e5ec5410

2023-08-01 12:37

dregad


Details Diff
Update ADOdb minimum version to 5.22

Fixes 0032028, 0032027
Affected Issues
0032027, 0032028
mod - composer.json Diff File

MantisBT: master 6e9fc6cc

2023-09-02 07:20

dregad


Details Diff
Travis: Enable PHP 8.2 builds

Issue 0032027
Affected Issues
0032027
mod - .travis.yml Diff File

MantisBT: master 1e12bdba

2023-09-02 07:21

dregad


Details Diff
Bump adodb/adodb-php from 5.21.4 to 5.22.6

Fixes 0032028, 0032027
Closes https://github.com/mantisbt/mantisbt/pull/1895
Affected Issues
0032027, 0032028
mod - composer.lock Diff File