• Resolved Quique5

    (@quique5)


    Hi everyone,

    I opened this ticket some time ago: https://wordpress.org/support/topic/plugins-problem-in-multisite-installation/

    The problem was never resolved, and I am still running version 6.14.2 because I cannot upgrade to any newer version.

    I keep getting the following error:

    [16-Sep-2026 07:23:00 UTC] PHP Fatal error:  Cannot redeclare check_upload_size() (previously declared in /home/www/multisite/htdocs/wp-admin/includes/ms.php:18) in /home/www/multisite/htdocs/wp-admin/includes/ms.php on line 18
    [16-Sep-2026 07:23:26 UTC] PHP Fatal error:  Cannot redeclare check_upload_size() (previously declared in /home/www/multisite/htdocs/wp-admin/includes/ms.php:18) in /home/www/multisite/htdocs/wp-admin/includes/ms.php on line 18

    With other plugins, I have been able to work around similar issues by commenting out a line such as this one:

    // Load WP user management functions
    if ( is_multisite() ) {
        // require_once( ABSPATH . 'wp-admin/includes/ms.php' );  <---- this one!
    }

    However, in this case I cannot find any reference to anything similar.

    I am particularly concerned because of the latest security vulnerability reported by Wordfence, as I am unable to update to a newer version.

    Does anyone have any idea what could be causing this Cannot redeclare check_upload_size() error or how I could fix it so that I can update?

    The error occurs when logging in. If I do not log in, there are no errors and the website looks fine. However, as soon as I enter a username and password and log in, the FATAL ERROR appears.

    Thanks in advance for any help.

    • This topic was modified 2 weeks ago by Quique5.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Quique5

    (@quique5)

    important: The error occurs when logging in. If I do not log in, there are no errors and the website looks fine. However, as soon as I enter a username and password and log in, the FATAL ERROR appears.

    Plugin Support Darian

    (@d0153)

    Hi @quique5,

    Thanks for reaching out. I’ll be happy to assist you with this.

    I investigated the issue further, but unfortunately, I wasn’t able to reproduce it on my end. Could you please try adding the following snippet to see whether it resolves the issue?

    add_filter( 'shepherd_tec_should_log', '__return_false' );

    You can add it using the Code Snippets plugin. As always, please test this first on a staging site before applying it to your live site.

    Please let me know how it goes.

    Thread Starter Quique5

    (@quique5)

    I tried but it failed again I am using: Divi plugin, AuthLDAP and WPS Hide Login.

    This is the content in debug.log:

    [16-Sep-2026 14:06:29 UTC] PHP Warning: require_once(/home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/action-scheduler.php): failed to open stream: No such file or directory in /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/src/Tribe/Main.php on line 527
    [16-Sep-2026 14:06:29 UTC] PHP Fatal error: require_once(): Failed opening required '/home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/action-scheduler.php' (include_path='.:/opt/remi/php74/root/usr/share/pear:/opt/remi/php74/root/usr/share/php:/usr/share/pear:/usr/share/php') in /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/src/Tribe/Main.php on line 527
    [16-Sep-2026 14:06:29 UTC] PHP Warning: require_once(/home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/action-scheduler.php): failed to open stream: No such file or directory in /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/src/Tribe/Main.php on line 527
    [16-Sep-2026 14:06:29 UTC] PHP Fatal error: require_once(): Failed opening required '/home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/action-scheduler.php' (include_path='.:/opt/remi/php74/root/usr/share/pear:/opt/remi/php74/root/usr/share/php:/usr/share/pear:/usr/share/php') in /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/src/Tribe/Main.php on line 527
    [16-Sep-2026 14:06:32 UTC] PHP Warning: require_once(/home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php): failed to open stream: No such file or directory in /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/action-scheduler.php on line 35
    [16-Sep-2026 14:06:32 UTC] PHP Fatal error: require_once(): Failed opening required '/home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php' (include_path='.:/opt/remi/php74/root/usr/share/pear:/opt/remi/php74/root/usr/share/php:/usr/share/pear:/usr/share/php') in /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/vendor/woocommerce/action-scheduler/action-scheduler.php on line 35
    [16-Sep-2026 14:06:43 UTC] PHP Fatal error: Uncaught TEC\Common\Exceptions\Not_Bound_Exception: Error while making TEC\Events\Integrations\Plugins\WordPress_SEO\Provider: nothing is bound to the 'TEC\Events\Integrations\Plugins\WordPress_SEO\Provider' id and it's not an existing or instantiable class. in /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/src/Common/Contracts/Container.php:35
    Stack trace: 0 /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/lucatume/di52/src/Container.php(457): TEC\Common\Contracts\Container->get() 1 /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/src/Common/Contracts/Container.php(63): TEC\Common\lucatume\DI52\Container->register() 2 /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/src/Events/Integrations/Provider.php(32): TEC\Common\Contracts\Container->register() 3 /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/lucatume/di52/src/Container.php(459): TEC\Event in /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/src/Common/Contracts/Container.php on line 35

    [16-Sep-2026 14:06:50 UTC] PHP Fatal error: Uncaught Error: Interface 'Tribe\Events\Views\V2\View_Interface' not found in /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/View.php:43
    Stack trace: 0 /home/www/multisite/htdocs/wp-content/plugins/code-snippets/vendor/composer/ClassLoader.php(576): include() 1 /home/www/multisite/htdocs/wp-content/plugins/code-snippets/vendor/composer/ClassLoader.php(427): Composer\Autoload{closure}() 2 [internal function]: Composer\Autoload\ClassLoader->loadClass() 3 /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Service_Provider.php(63): spl_autoload_call() 4 /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/vendor/vendor-prefixed/lucatume/di52/src/Container.php(459): Tribe\Events\Views\V2\Service_Provider->register() 5 /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/common/src/Common/Contracts/Container.php(63): TEC\Common\lucatume\DI52\Container->register() 6 /home/www/multisite/htdocs/wp-content/p in /home/www/multisite/htdocs/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/View.php on line 43
    Plugin Support Darian

    (@d0153)

    Hi @quique5 ,

    Thanks for sending the log. These errors are different from the original one. They show that The Events Calendar’s folder contains files from two versions at once (6.14.2 and a newer one). This usually happens when an update gets interrupted, or when a new version is uploaded on top of the old folder.

    To clean this up, could you try the following?

    1. Take a full backup of your site’s files and database.
    2. Replace the plugin folder. Using FTP or your host’s file manager, delete the the-events-calendar folder from wp-content/plugins/ (or move it outside that directory). Then upload a fresh copy of version 6.17.4.1. Please don’t upload it over the existing folder, since that can leave old files behind. Your events and settings are stored in the database, so they won’t be lost. If the plugin shows as deactivated afterward, network-activate it again.
    3. Restart PHP-FPM, or ask your host to do it. This clears any old code still cached in memory.
    4. Add the previous snippet that I provided to a fix file (e.g. shepherd_fix.php) to wp-content/mu-plugins/. If that folder doesn’t exist, you can create it. The file won’t work as a Code Snippet because snippets load too late to apply the fix.
    5. Log in and test. If it still fails, please send the new debug.log entries from after these steps.

    Let me know how it goes.

    Thread Starter Quique5

    (@quique5)

    same behavior, this is the error

    add_filter( ‘shepherd_tec_should_log’, ‘__return_false’ );
    Fatal error: Cannot redeclare check_upload_size() (previously declared in /home/www/multisite/htdocs/wp-admin/includes/ms.php:18) in /home/www/multisite/htdocs/wp-admin/includes/ms.php on line 18
    Ha habido un error crítico en esta web.

    Aprende más sobre el diagnóstico de WordPress.

    and same in debug.log:

    [18-Sep-2026 10:28:06 UTC] PHP Fatal error: Cannot redeclare check_upload_size() (previously declared in /home/www/multisite/htdocs/wp-admin/includes/ms.php:18) in /home/www/multisite/htdocs/wp-admin/includes/ms.php on line 18
    [18-Sep-2026 10:28:43 UTC] PHP Fatal error: Cannot redeclare check_upload_size() (previously declared in /home/www/multisite/htdocs/wp-admin/includes/ms.php:18) in /home/www/multisite/htdocs/wp-admin/includes/ms.php on line 18

    Plugin Support Darian

    (@d0153)

    Hi @quique5,

    Thanks for your response.

    It looks like the snippet isn’t taking effect, most likely because it runs too late in the load process or it was implemented incorrectly. Let’s try it as a must-use plugin instead, which loads before everything else.

    1. Remove the snippet you added earlier.
    2. Using FTP or your host’s file manager, create this file:
      wp-content/mu-plugins/tec-shepherd-no-early-admin-includes.php
      If the mu-plugins folder doesn’t exist yet, you can create it.
    3. Add the following to the file and save it:
    <?php
    add_filter( 'shepherd_tec_should_log', '__return_false' );

    Files in mu-plugins activate automatically, so there’s nothing to enable in the dashboard.

    Let me know how it goes.

    Thread Starter Quique5

    (@quique5)

    Hi @d0153 !!!
    It worked. Thank you very much!. I made a typo the other day (I forgot <? line, my bad)

    Plugin Support Darian

    (@d0153)

    Hi @quique5,

    Thanks for confirming, and I’m glad it’s working now!

    I’ll mark this thread as resolved for now, but I’ll still post an update here once the permanent fix is released. Until then, please keep the file in mu-plugins in place. Once the fix is out, you can safely delete it.

    —
    Internal Bug Ticket Reference: SMTNC-2788

    Thread Starter Quique5

    (@quique5)

    so glad!

    Plugin Support Darian

    (@d0153)

    If anything else comes up, feel free to reach out anytime. We’re always happy to help.

Viewing 10 replies - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.