• Resolved labarbiche

    (@labarbiche)


    Hello,
    I upgraded a site from WP 5.9 to WP 6.5, and I’m now facing the following issue (using BackWPUP Version 4.1.3): I receive tons of “Trying to access array offset on value of type bool” warnings during the archive creation.
    I’m on a docker setup (using image wordpress:6.5), and WordPress is running as www-data.www-data (uid 33 gid 33). I’ve debugged, and found that in class-create-archive.php, the function posix_getpwuid($uid, $gid) triggers this warning when trying to access the $info array, on both lines 905 and 907:

        private function posix_getpwuid($uid, $gid)
    {
    // Set file user/group name if linux.
    $owner = esc_html__('Unknown', 'backwpup');
    $group = esc_html__('Unknown', 'backwpup');

    if (function_exists('posix_getpwuid')) {
    $info = posix_getpwuid($uid);
    $owner = $info['name']; <-- WARNING HERE
    $info = posix_getgrgid($gid);
    $group = $info['name']; <-- WARNING HERE
    }

    return [
    $owner,
    $group,
    ];
    }

    The lines that triggers the error is:

    $owner = $info['name'];

    I’ve made this naive check that removes the warning:

    if (is_array($info) && isset($info['name'])) {
    $owner = $info['name'];
    }

    (I did the same for the second call that also triggers the warning: $info = posix_getgrgid($gid);)

    Now the backup is going smoothly.
    Can you please investigate, and maybe add my fix (or something similar) to prevent the warning ?

    If you want to reproduce the issue, here is how I launch backwpup (I’ve only 1 backup task)

    docker run --rm --user 33:33 --volumes-from mysite --env-file config/mysite.env wordpress:cli wp backwpup start 1

    config/mysite.env contains the WORDPRESS_DB_… variables.
    Thank you very much,

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter labarbiche

    (@labarbiche)

    I’ve the same issue on WordPress 5.9, when updating backWpUp to 4.1.3 (latest as of today)

    Plugin Support BWU Support

    (@saranshwpm)

    Hi,

    Thank you for reaching out and bringing this to our attention.

    Can you please also share the debug information from BackWPup > Settings > Information to pass it on to our developer?

    Best regards,

    Thread Starter labarbiche

    (@labarbiche)

    Hello,
    Here are the informations:

                                    Version WordPress : 6.5.5

    Version BackWPup: 4.1.3
    Version PHP: 8.2.21 (64bit)
    Version MySQL: 11.4.2-MariaDB-ubu2404
    Version cURL: 7.88.1
    Version SSL cURL: OpenSSL/3.0.13
    URL WP-Cron: https://—mysite—/wp-cron.php
    Connexion au serveur: Réponse au test positive
    Document root: /var/www/html
    Dossier temporaire: /var/www/html/wp-content/uploads/backwpup/0bea90/temp/
    Dossier des fichiers journaux: /var/www/html/wp-content/backwpup-0bea90-logs/
    Serveur: Apache/2.4.59 (Debian)
    Système d’exploitation: Linux
    PHP SAPI: apache2handler
    Utilisateur PHP actuel: www-data
    Temps maximum d’exécution: 30 secondes
    Temps maximum d’exécution d’un script de BackWPup: 0 secondes
    WP Cron alternatif: Off
    WP Cron désactivé: Off
    CHMOD Dir: 493
    Heure du serveur: 8:9
    Heure du site web: 08:09
    Fuseau horaire du site web:
    Décalage temps avec le site web: 0 heures
    Langue du site: fr-FR
    Type d’encodage du client MySql: utf8
    Limite mémoire de PHP: 256M
    Limite mémoire de WP: 40M
    Limite mémoire maximum de WP: 256M
    Mémoire utilisée: 12,00 Mo
    Extension PHP chargées?:: Core, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, bcmath, ctype, curl, date, dom, exif, fileinfo, filter, gd, hash, iconv, imagick, intl, json, libxml, mbstring, mysqli, mysqlnd, openssl, pcre, pdo_sqlite, posix, random, session, sodium, sqlite3, standard, tokenizer, xml, xmlreader, xmlwriter, zip, zlib

    Thank you,

    Plugin Support BWU Support

    (@saranshwpm)

    Hello,

    Thank you for your reply.

    The warnings seem to be due to PHP version 8.2 and not the latest WordPress update.

    You can safely ignore the warnings or check with PHP 8 or 7.4 to see if warnings persists.

    Best Regards,

    Thread Starter labarbiche

    (@labarbiche)

    Hello,
    Thank you for your answer.
    But I opened this thread to report that these warning are flooding the reports, filling the disks. You should remove them, as they happen in the official docker image of latest WordPress and the latest version of BackWPUp. Not a high priority task, of course ??
    Thank you,

    Plugin Support BWU Support

    (@saranshwpm)

    Hello,

    Thank you for your reply.

    I’ve made our developers aware of this.

    Best Regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.