Announcement

Collapse
No announcement yet.

PHP warnings after upgrade to 5.6.0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP warnings after upgrade to 5.6.0

    My error_log has been filling up quite rapidly (around 10Mb/day) since upgrading to 5.6.0. I upgraded to PHP 7.4 at the same time.

    All lines are of the type "PHP Notice", "PHP Warning" or "PHP Deprecated".

    Some typical lines:
    PHP Notice: unserialize(): Error at offset 0 of 16 bytes in /home/***/public_html/core/vb/library/user.php on line 526
    PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/***/public_html/core/includes/functions_wysiwyg.php on line 745
    PHP Warning: A non-numeric value encountered in /home/***/public_html/core/vb/api/user.php on line 1799



    Is this a known issue?

  • #2
    1. Go to User Profile Fields -> User Profile Field Manager. Edit and save one of your profile fields.

    2. This line needs to be brought up to new coding standards.

    3. Seems to be related to issue 1. Make sure your custom profile fields that use checkboxes are set up correctly.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API - Full / Mobile
    Vote for your favorite feature requests and the bugs you want to see fixed.

    Comment


    • #3
      I tried 1) and 3) without any visible result. For 2) I'm not really sure what to do. I'd think functions_wysiwyg.php is part of the installation package?

      Anyway, the by far most common error message is this:
      [10-Mar-2020 11:44:20 Europe/Berlin] PHP Notice: unserialize(): Error at offset 0 of 22 bytes in /home/***/public_html/core/vb/library/user.php on line 526
      closely followed by this:
      [10-Mar-2020 10:48:33 Europe/Berlin] PHP Warning: A non-numeric value encountered in /home/***/public_html/core/vb/api/user.php on line 1799

      Looking at the code, I see that the first one is about getting user info from the database, and the latter is similar, but concerning avatars.

      Does this mean that there is something wrong with my database, and is there a simple fix? Otherwise I guess a support ticket is called for.

      Comment


      • #4
        1) and 3) would simply be rebuilding the datastore. There should be no visible benefit. Do the notices continue? What are the contents of this query:

        select * from datastore where title='profilefield';

        2) This requires updates to the code. It has been fixed for 5.6.1. This issue shouldn't cause problems with the operation of the website until PHP 8.0 (or whatever the next version ends up being called) is used on the server. https://tracker.vbulletin.com/vbulle...sues/VBV-20094
        Translations provided by Google.

        Wayne Luke
        The Rabid Badger - a vBulletin Cloud demonstration site.
        vBulletin 5 API - Full / Mobile
        Vote for your favorite feature requests and the bugs you want to see fixed.

        Comment


        • #5
          I'm afraid I'm not very skilled in this.
          1) How do I rebuild the datastore?
          2) Where exactly do I enter the string: select * from datastore where title='profilefield';?

          Comment


          • #6
            1) Editing and saving a profile field under Custom Profile Fields will rebuild that portion of the datastore.

            2) Most people use phpMyAdmin that is provided by their hosting provider. There is a tool in the AdminCP under Maintenance -> Execute SQL Query but it is basic and won't provide information in an easy to read format like phpMyAdmin. If you don't have access to run Queries in the AdminCP, then the software will tell you how to give yourself access. When you are done with the tool, you should remove access.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API - Full / Mobile
            Vote for your favorite feature requests and the bugs you want to see fixed.

            Comment


            • #7
              Thanks, it seems I could use phpMyAdmin. I ran the query, but I'm not sure whether the result makes sense:
              select * from datastore where title='profilefield';

              a:3:{s:6:"hidden";s:0:"";s:8:"required";a:0:{}s:3:"all";a:4:{i:0;a:21:{s:22:"profilefieldc ategoryid";s:1:"0";s:8:"location";N;s:14:"profilefieldid";s:1:"1";s:8:"required";s:1:"2";s :6:"hidden";s:1:"0";s:9:"maxlength";s:3:"200";s:4:"size";s:2:"50";s:12:"displayorder";s:1 : "1";s:8:"editable";s:1:"1";s:4:"type";s:8:"textarea";s:4:"data";s:22:"En helt vanlig person.";s:6:"height";s:1:"0";s:3:"def";s:1:"0";s:8:"optional";s:1:"0";s:10:"searchable";s :1:"1";s:10:"memberlist";s:1:"1";s:5:"regex";s:0:"";s:4:"form";s:1:"0";s:4:"html";s:1:"0" ; s:7:"perline";s:1:"0";s:10:"showonpost";s:1:"0";}i:1;a:21:{s:22:"profilefieldcategoryid";s :1:"0";s:8:"location";N;s:14:"profilefieldid";s:1:"2";s:8:"required";s:1:"2";s:6:"hidden" ; s:1:"0";s:9:"maxlength";s:3:"100";s:4:"size";s:2:"25";s:12:"displayorder";s:1:"2";s:8:"edi table";s:1:"1";s:4:"type";s:5:"input";s:4:"data";s:16:"Kongeriket Norge";s:6:"height";s:1:"0";s:3:"def";s:1:"0";s:8:"optional";s:1:"0";s:10:"searchable";s:1 :"1";s:10:"memberlist";s:1:"1";s:5:"regex";s:0:"";s:4:"form";s:1:"0";s:4:"html";s:1:"0" ;s: 7:"perline";s:1:"0";s:10:"showonpost";s:1:"0";}i:2;a:21:{s:22:"profilefieldcategoryid";s :1 :"0";s:8:"location";N;s:14:"profilefieldid";s:1:"6";s:8:"required";s:1:"2";s:6:"hidden" ;s: 1:"0";s:9:"maxlength";s:3:"100";s:4:"size";s:2:"25";s:12:"displayorder";s:1:"4";s:8:"edi ta ble";s:1:"1";s:4:"type";s:5:"radio";s:4:"data";s:105:"a:5:{i:0;s:14:"16 eller under";i:1;s:5:"17-19";i:2;s:5:"20-25";i:3;s:5:"26-35";i:4;s:13:"36 eller over";}";s:6:"height";s:1:"0";s:3:"def";s:1:"0";s:8:"optional";s:1:"0";s:10:"searchable";s :1:"1";s:10:"memberlist";s:1:"1";s:5:"regex";s:0:"";s:4:"form";s:1:"0";s:4:"html";s:1:"0" ; s:7:"perline";s:1:"0";s:10:"showonpost";s:1:"0";}i:3;a:21:{s:22:"profilefieldcategoryid";s :1:"0";s:8:"location";N;s:14:"profilefieldid";s:1:"7";s:8:"required";s:1:"2";s:6:"hidden" ; s:1:"0";s:9:"maxlength";s:3:"250";s:4:"size";s:1:"0";s:12:"displayorder";s:2:"11";s:8:"edi table";s:1:"1";s:4:"type";s:8:"checkbox";s:4:"data";s:356:"a:16:{i:0;s:22:"Har ikke tjenestegjort";i:1;s:5:"Hæren";i:2;s:12:"Sjøforsvaret";i:3;s:13:"Luftforsvaret";i:4;s:2:"H V";i:5;s:5:"CYFOR";i:6;s:3:"FLO";i:7;s:2:"FS";i:8;s:4:"FSAN";i:9;s:16:"Forsvaret ellers";i:10;s:23:"Forsvarssektoren ellers";i:11;s:6:"Politi";i:12;s:5:"Brann";i:13;s:5:"Helse";i:14;s:12:"Sivilforsvar";i:15; s:25:"Frivillige organisasjoner";}";s:6:"height";s:1:"0";s:3:"def";s:1:"0";s:8:"optional";s:1:"0";s:10:"sea rchable";s:1:"1";s:10:"memberlist";s:1:"1";s:5:"regex";s:0:"";s:4:"form";s:1:"0";s:4:"html ";s:1:"0";s:7:"perline";s:1:"0";s:10:"showonpost";s:1:"1";}}}

              EDIT: Maybe I should add - two of the profile fields are free text, one is radio-buttons and the last is multi-select. Could any of these cause problems?

              Comment


              • #8
                Did you go to Custom Profile Fields, edit a custom profile field and save that profile field? You don't actually have to change anything. Saving it rebuilds this data.

                The type of fields has nothing to do with the error. The error is because you have malformed data in the field (the information you copied above) the only way to change this is to edit and re-save a custom profile field.

                However, if you're not using UTF8MB4, just having non-English UTF8 characters in your field names and descriptions can cause errors.
                Translations provided by Google.

                Wayne Luke
                The Rabid Badger - a vBulletin Cloud demonstration site.
                vBulletin 5 API - Full / Mobile
                Vote for your favorite feature requests and the bugs you want to see fixed.

                Comment


                • #9
                  To really track the issue down, we need a copy of the database.

                  Turning Display Errors off will cause these Notices to disappear. They shouldn't effect the overall operation of the software.
                  Translations provided by Google.

                  Wayne Luke
                  The Rabid Badger - a vBulletin Cloud demonstration site.
                  vBulletin 5 API - Full / Mobile
                  Vote for your favorite feature requests and the bugs you want to see fixed.

                  Comment


                  • #10
                    Ah, yes, I think that's it. We do have non-English characters in field names. I'll try to change them and see.

                    Comment

                    Related Topics

                    Collapse

                    • 720
                      Error 508
                      by 720
                      When pressing "Mark channels read" in the main page of my forum, myself and other users get the error message 508.

                      Running vB5.5.5, only third-party plugin is Tapatalk.
                      ...
                      Thu 14th Nov '19, 11:34pm
                    • 720
                      Additional usergroups disappear
                      by 720
                      Not sure if this is a bug or a feature, but I've lately had issues with some users losing their additional usergroup(s).

                      I tested more thoroughly now, adding an additional usergroup to a...
                      Wed 4th Dec '19, 2:14am
                    • bollie
                      PHP Warning
                      by bollie
                      [Thu Mar 01 14:08:56.052710 2018] [:error] [pid 26055] [client 81.11.134.242:62458] PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/pctuts/domains/pctuts.be/public_html/core/vb/api/user.php...
                      Thu 1st Mar '18, 4:21am
                    • bollie
                      PHP Notice: Undefined offset:
                      by bollie
                      [Sat Mar 03 18:25:45.984044 2018] [:error] [pid 3817] [client 81.243.162.202:56240] PHP Notice: Undefined offset: 9 in /home/pctuts/domains/pctuts.be/public_html/core/vb/user.php on line 572, referer:...
                      Sat 3rd Mar '18, 9:24am
                    • Zico Ekel
                      Cannot save or make new
                      by Zico Ekel
                      Hi i have an Error when try to edit,save or make a new one notice, this is start when i was update to the new version

                      Code:
                      Database error in vBulletin 5.5.6:
                      
                      Invalid SQL:
                      UPDATE
                      ...
                      Mon 20th Jan '20, 5:34am
                    Working...
                    X