Hi guys
i have filed in database (array type) and serilized
when unserilize show error :
Notice: unserialize() [function.unserialize]: Error at offset 255 of 255 bytes in file.php on line 431
help me, i need unserilize all data
7 replies to this topic
#1
Posted 11 May 2011 - 05:08 AM
|
|
|
#2
Posted 11 May 2011 - 06:20 AM
Can you verify what the serialized data is? You likely have stored it in a 255 length column.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#3
Posted 11 May 2011 - 10:11 AM
how to save max length array in mysql, and read ??
#4
Posted 11 May 2011 - 10:36 AM
You must make the column long enough to support the serialized text, i.e. VARCHAR(65535) or MEDIUMTEXT
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#5
Posted 11 May 2011 - 10:47 AM
my column is TEXT, this error for what?
#6
Posted 11 May 2011 - 10:50 AM
error fixed, error in record.
Thank you Alexander
how to verify serialize?
Thank you Alexander
how to verify serialize?
#7
Posted 11 May 2011 - 11:07 AM
You could run strlen on the serialized data before sending it to the database, and then running strlen again on the data after fetching it from the database. If the two lengths do not match then the data would be truncated and thus corrupt.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#8
Posted 11 May 2011 - 11:08 AM
A TEXT field also has a maximum length of 65535 characters if that is an issue.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









