Issue Bug Closed

#95720PHP Warning: memcache_close() expects exactly 1 parameter, 0 given in \typo3\sysext\reports\Classes\Report\Status\ConfigurationStatus.php

Sabine Behrendt 10/20/21, 15:05 updated 12/02/25, 14:33

Description

Hallo, it’s my fist report.

I’m updating in old instanz of typo3. Now i’m on version 9.5.31, php 7.3.23 and memchache 4..

If i try using the reports modul, i’m getting this error in backend:
PHP Warning: memcache_close() expects exactly 1 parameter, 0 given in \typo3\sysext\reports\Classes\Report\Status\ConfigurationStatus.php line 155

The code:
memcache_close($memcachedConnection);
is the solution on getting all to work.

Probably the same bug is in Typo3 10.4.21.

Reviews 2

History 1016

  1. Oliver Hader commented and changed status New Accepted <span data-processor="relativetime" data-value="2021-10-21T07:27:09+00:00" > 10/21/21, 07:27 </span>

    Same code in TYPO3 v11.5.1. Could not try to reproduce yet…

  2. Georg Ringer commented and changed status Accepted Closed <span data-processor="relativetime" data-value="2024-06-23T19:22:35+00:00" > 06/23/24, 19:22 </span>

    due to cleanup forge and because it can’t reproduced I am closing this issue.

    if you don’t agree, feel free to contact me via slack!

  3. Simon Dürr commented <span data-processor="relativetime" data-value="2025-04-07T09:19:43+00:00" > 04/07/25, 09:19 </span>

    Any news on this issue?
    Still occurring in TYPO3 12.4.28 when opening the backend module System > Reports:
    > memcache_close() expects exactly 1 argument, 0 given

    The missing argument should be $memcachedConnection.
    > vendor/typo3/cms-reports/Classes/Report/Status/ConfigurationStatus.php line 167

  4. Georg Ringer commented and changed status Closed Accepted <span data-processor="relativetime" data-value="2025-04-07T09:27:56+00:00" > 04/07/25, 09:27 </span>

    Will check it

  5. Georg Ringer commented and changed status Accepted Needs Feedback <span data-processor="relativetime" data-value="2025-04-07T18:50:04+00:00" > 04/07/25, 18:50 </span>

    simon how does your configuration $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'] look like?

  6. Simon Dürr commented <span data-processor="relativetime" data-value="2025-04-08T06:49:56+00:00" > 04/08/25, 06:49 </span>

    nailed it down to this part:

                    'extbase' => [
                        'backend' => \TYPO3\CMS\Core\Cache\Backend\MemcachedBackend::class,
                        'options' => [
                            'compression' => true,
                            'peclModule' => 'memcached',
                            'servers' => [
                                'localhost:11211',
                            ],
                        ],
                    ],

    Reports module works fine without it, but breaks after inserting it.
    memcache and memcached are both loaded:

    extension_loaded('memcache') && extension_loaded('memcached') === true
  7. Gerrit Code Review pushed patch set 1 for main to change 88989 status Needs Feedback Under Review <span data-processor="relativetime" data-value="2025-04-08T19:17:49+00:00" > 04/08/25, 19:17 </span>

  8. Markus Klein commented <span data-processor="relativetime" data-value="2025-04-08T20:53:37+00:00" > 04/08/25, 20:53 </span>

    https://www.php.net/manual/de/memcache.close.php documents the procedural style in an example, where a function argument is used.

  9. Georg Ringer commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2025-04-09T09:20:07+00:00" > 04/09/25, 09:20 </span>

    Applied in changeset commit:ed24daefb39ecfb1d48997fb310e78999ecaa1e8.