Announcement

Collapse
No announcement yet.

Fatal error: Unsupported operand types in usercp and PM

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

  • #16
    Originally posted by BBF View Post
    first of all, i am sorry for bumping this thread.
    i had the same problem that you described here and i found a better solution - so i want the share this solution with you

    let say that we have the line:
    PHP Code:
    a:1:{i:1;s:13:"הודעות חשובות";} 
    (these are hebrew characters).

    as you can see there are 13 characters.
    but the right s parameter is 25 and not 13.
    why? because in UTF-8 every non-english character is 2 byte long and no 1 byte.

    so we have to double this number (13*2 = 26) and subtract by 1 for each space.
    so the final line will be:
    PHP Code:
    a:1:{i:1;s:25:"הודעות חשובות";} 
    i hope you understand me, and sorry for my lame english

    edit:
    i forgot to say that i have vBulletin 4.0.5 and this solution tested in it.


    I have too many members they have this problem, so do I have to edit every one ?

    if so , where do I go in my phpmyadmin to fix that?
    http://www.shmmr.net/vb/images/image...ar_add2007.gif

    Comment


    • #17
      yes, where we go in phpmyadmin to fix it?

      i really need help here ..

      thanks.
      בגרות במתמטיקה | פתרונות לספרי לימוד

      Comment


      • #18
        anyone?
        בגרות במתמטיקה | פתרונות לספרי לימוד

        Comment


        • #19
          Originally posted by David Grove View Post
          You can have folders with the same name, so I would just do this:

          For every instance of
          Code:
          s:NUMBER:"TEXT";
          replace it with
          Code:
          s:14:"Renamed folder"
          Where 14 is the number of characters in the name you are going to use.

          So if you have a user with the following data:
          Code:
          a:2:{i:1;s:6:"[FONT=&quot]الوارد[/FONT]";i:2;s:6:"[FONT=&quot]الصادر[/FONT]";}
          Change it to:

          Code:
          a:2:{i:1;s:14:"Renamed folder";i:2;s:14:"Renamed folder";}
          Then the users should be able to rename their folders themselves.

          Be sure to back up your database before trying this, and/or try it on a test installation first.
          this worked for me. tested on vb3.8.6

          the table that the data is stored in is vb_usertextfield

          thanks all.
          בגרות במתמטיקה | פתרונות לספרי לימוד

          Comment


          • #20
            Solution for User panel problem

            Got the same problem yesterday. Length of string containing native symbols in UTF-8 doesn't equal to its length in original encoding. Users having such PM folders or subfolders names can't use usercp. So you need to fix it.
            Wrote little script which convert all wrong serialized arrays and update pmfolders and subfolders fields at usertextfield table if it needed.

            How to use:

            1. Make a copy of your usertextfield table
            2. Change $old_encoding in the script to your original encoding
            3. Put the script to the forum server
            4. Run it
            5. If it needed, change encoding to UTF-8 in your browser
            6. Examine the output. Red lines are the strings to be changed. 's' value in original and new strings differs.
            7. Press 'Repair!'
            8. If it is OK, there will be green status 'OK' in each line
            9. Press 'Refresh' link at the bottom. There shouldn't be any red lines anymore.

            fyi, there are some other places where you should update serialized arrays. For example, I had several own created profile fields in profilefield table which didn't work too. Fixed it manually.
            Attached Files
            Drom.ru - Cars in Russia

            Comment


            • #21
              Originally posted by fraggle View Post
              Got the same problem yesterday. Length of string containing native symbols in UTF-8 doesn't equal to its length in original encoding. Users having such PM folders or subfolders names can't use usercp. So you need to fix it.
              Wrote little script which convert all wrong serialized arrays and update pmfolders and subfolders fields at usertextfield table if it needed.

              How to use:

              1. Make a copy of your usertextfield table
              2. Change $old_encoding in the script to your original encoding
              3. Put the script to the forum server
              4. Run it
              5. If it needed, change encoding to UTF-8 in your browser
              6. Examine the output. Red lines are the strings to be changed. 's' value in original and new strings differs.
              7. Press 'Repair!'
              8. If it is OK, there will be green status 'OK' in each line
              9. Press 'Refresh' link at the bottom. There shouldn't be any red lines anymore.

              fyi, there are some other places where you should update serialized arrays. For example, I had several own created profile fields in profilefield table which didn't work too. Fixed it manually.
              Thank you very much

              Comment


              • #22
                Originally posted by fraggle View Post
                Got the same problem yesterday. Length of string containing native symbols in UTF-8 doesn't equal to its length in original encoding. Users having such PM folders or subfolders names can't use usercp. So you need to fix it.
                Wrote little script which convert all wrong serialized arrays and update pmfolders and subfolders fields at usertextfield table if it needed.

                How to use:

                1. Make a copy of your usertextfield table
                2. Change $old_encoding in the script to your original encoding
                3. Put the script to the forum server
                4. Run it
                5. If it needed, change encoding to UTF-8 in your browser
                6. Examine the output. Red lines are the strings to be changed. 's' value in original and new strings differs.
                7. Press 'Repair!'
                8. If it is OK, there will be green status 'OK' in each line
                9. Press 'Refresh' link at the bottom. There shouldn't be any red lines anymore.

                fyi, there are some other places where you should update serialized arrays. For example, I had several own created profile fields in profilefield table which didn't work too. Fixed it manually.
                Thank you very much, bro!
                Спасибо брат за отличное решение!

                Comment


                • #23
                  Originally posted by fraggle View Post
                  Got the same problem yesterday. Length of string containing native symbols in UTF-8 doesn't equal to its length in original encoding. Users having such PM folders or subfolders names can't use usercp. So you need to fix it.
                  Wrote little script which convert all wrong serialized arrays and update pmfolders and subfolders fields at usertextfield table if it needed.

                  How to use:

                  1. Make a copy of your usertextfield table
                  2. Change $old_encoding in the script to your original encoding
                  3. Put the script to the forum server
                  4. Run it
                  5. If it needed, change encoding to UTF-8 in your browser
                  6. Examine the output. Red lines are the strings to be changed. 's' value in original and new strings differs.
                  7. Press 'Repair!'
                  8. If it is OK, there will be green status 'OK' in each line
                  9. Press 'Refresh' link at the bottom. There shouldn't be any red lines anymore.

                  fyi, there are some other places where you should update serialized arrays. For example, I had several own created profile fields in profilefield table which didn't work too. Fixed it manually.
                  do you think this can fix password table also.
                  after I change encoding to UTF-8 some users have trouble login.

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X