开发者

PHP unserialize error

开发者 https://www.devze.com 2023-04-01 06:46 出处:网络
I am getting the following error :- Message: unserialize() 开发者_StackOverflow社区function.unserialize: Error at offset 65517 of 65535 bytes

I am getting the following error :-

Message: unserialize() 开发者_StackOverflow社区function.unserialize: Error at offset 65517 of 65535 bytes

Does the unserialize have a maximum size?

Here is the line in question within my PHP:

$array = unserialize($emails);

// this is the output of $emails (not all of it as it is huge)
string(65535) "a:12134:{i:0;s:29:"12someemail@addr.com ";i:1;s:31:"5myname@email.com "


The database field (presumably) that you're storing your serialized data into has a size limit which is exceeded by the length of that string - basically, your data is corrupted.


You probably store this in a TEXT field in the mysql database. It's maximum size is 65,535 bytes, as in your error.

You can use MEDIUMTEXT, which is the next available.

PHP unserialize error

0

精彩评论

暂无评论...
验证码 换一张
取 消