Menu

Error in User Administration

Help
Nick Veit
2010-05-01
2013-05-30
  • Nick Veit

    Nick Veit - 2010-05-01

    On entering User Administration, in the Informational block I get:

    ERROR 8: unserialize(): Unexpected end of serialized data
    0 Error occurred on in function unserialize
    1 called from line 2734 of file functions_db.php in function get_user_gedcom_setting
    2 called from line 1154 of file useradmin.php
    Notice: unserialize(): Unexpected end of serialized data in C:\Inetpub\family\PhpGedView\includes\functions\functions_db.php on line 2734
    ERROR 8: unserialize(): Error at offset 37 of 38 bytes
    0 Error occurred on in function unserialize
    1 called from line 2734 of file functions_db.php in function get_user_gedcom_setting
    2 called from line 1154 of file useradmin.php
    Notice: unserialize(): Error at offset 37 of 38 bytes in C:\Inetpub\family\PhpGedView\includes\functions\functions_db.php on line 2734

     
  • Gerry Kroll

    Gerry Kroll - 2010-05-01

    What version of PGV are you running?

     
  • Stephen Arnold

    Stephen Arnold - 2010-05-01

    Nick
    Have you modified something with text edit? Is you DB all in the same collation? Which PHP are you using?

    Here are some reasons for similar errors  - not in the program, but usually something done by the user/admin:

    After almost 4 hours of debugging, i got it to work. The problem seems to be that I copied the serialized echoed string from the browser to a text-file, which confused the serialization: ä was recorded as 6 bytes but took only 1 byte in the text-file.

    The unserialize() could spot this though i reckoned, and i fixed the problems as they were spotted. After a while, the "Unexpected end" came up, and i understood nothing.

    After hours of trying different things, i started testing portions of the serialization until it worked. This took 2 hours, but it made i tpossible to find the byte-misstakes in the string, and now it is working again.

    For your information: whenever it says "s:##", the following text-data within the "" has to be of the length ##. This is the basics in debugging serialized data, or changing data in serialized form.

    -stephen

     
  • Nick Veit

    Nick Veit - 2010-05-03

    I am using the latest version - recently downloaded - says 4.2 in the readme.txt

    I have not modified any code at all.

    I have a simple MySQL database.

    I have no idea what a serialized echoed string is !

    In …/phpgedview/individual.php?pid=I95&ged=outfile.ged I just got a similar error:

    Eva C Dessau  ‎(I95)‎
    ERROR 8: unserialize(): Unexpected end of serialized data
    0 Error occurred on in function unserialize
    1 called from line 2790 of file functions_db.php in function get_user_from_gedcom_xref
    2 called from line 73 of file individual.php
    Notice: unserialize(): Unexpected end of serialized data in C:\Inetpub\family\PhpGedView\includes\functions\functions_db.php on line 2790
    ERROR 8: unserialize(): Error at offset 34 of 35 bytes
    0 Error occurred on in function unserialize
    1 called from line 2790 of file functions_db.php in function get_user_from_gedcom_xref
    2 called from line 73 of file individual.php
    Notice: unserialize(): Error at offset 34 of 35 bytes in C:\Inetpub\family\PhpGedView\includes\functions\functions_db.php on line 2790
    ERROR 2: array_key_exists() expects parameter 2 to be array, boolean given
    0 Error occurred on in function array_key_exists
    1 called from line 2791 of file functions_db.php in function get_user_from_gedcom_xref
    2 called from line 73 of file individual.php
    Warning: array_key_exists() expects parameter 2 to be array, boolean given in C:\Inetpub\family\PhpGedView\includes\functions\functions_db.php on line 2791

     
  • Nick Veit

    Nick Veit - 2010-05-03

    Interesting…in user management one of my users had something like that error message showing in two fields !!!

    In GEDCOM INDI record ID field and in Access level field (several times in a drop down).

    I corrected the first field and saved and it seemed to fix the issue…do I detect a data corruption ?

     
  • Stephen Arnold

    Stephen Arnold - 2010-05-03

    Nick
    Or mixed/bad collation and corrupted data as a result thereof. Did you change the collation, UTF-8 notation on setup or some other manipulation of the DB or gedcom?
    Stephen

     
  • Greg Roach

    Greg Roach - 2010-05-03

    Nick - you don't say whether this is an upgrade, a new install, whether you did anything noteworthy, etc.

    Can you access your database using something like phpMyAdmin?  My guess is that one of the entries in the u_gedcomid column of the pgv_users table contains invalid data.  This column records the user's gedcom-id in each gedcom.  The format is a "serialized PHP array".  Something like this:

    a:1:{s:11:"shemilt.ged";s:2:"I1";}

    If you don't have many users, you can set all the values in this column to null, then re-assign each user via the manage users page.

    Otherwise, look through these strings.  The numbers are the string lengths (in bytes, not characters).  Do they all add up?  Changing DB collation on-the-fly can cause this.

     
  • Nick Veit

    Nick Veit - 2010-05-03

    I converted FAMILY HISTORIAN data to UTF-8 on import - I've done the import many times…I even tried it again…it wasn't that.

    This was a recent install but has been running fine for some months…not sure what caused the issue but yes one serialized array in one field (access) in the user record was corrupt. I have never changed collation…but I've checked the other records which were ok and and now its working well…

    …sorry I can't identify why one user record went bad but at least we know what causes this type of error display!

    Thanks guys - sorry I was not more responsive sooner…spam blacklists been incorrectly blocking my incoming mail this week !

     

Log in to post a comment.