Re: Problem When Serializing Array With Multiline Text



On Apr 30, 6:20 am, dawnerd <dawn...@xxxxxxxxx> wrote:
Hello everyone.

I have a question, or problem if you will, that I'm sure someone knows
the answer to. I have a database that stores information on a given
user. The information is stored in a serialized array. This works
flawlessly when using only single line text. When I tried to store
multiline text, the problem arose.

When the serialized data is deserialized, the array breaks. Any
suggestions?

I test (on windows using CLI):

$a[] = "username";
$a[] = 15;
$a[] = "Not Found Street\n12345\nNowhere City";
$a[] = "Not Found Street\r\n12345\r\nNowhere City";
$k = serialize($a);
$u = unserialize($k);
var_dump($a);
var_dump($k);
var_dump($u);

Seems fine for me.

Please show us:
1. The content of the serialized variable before it stored to
database?
2. The content of the deserialized variable picked from database?
3. Field type you use to store serialized data?

.



Relevant Pages

  • Re: Problem When Serializing Array With Multiline Text
    ... I have a database that stores information on a given ... When the serialized data is deserialized, ... I don't even try to to store serialized data in a database. ...
    (comp.lang.php)
  • Re: public and private mailboxes randomly dismounting
    ... When posting logs an important piece is the Event ID and Source. ... Information Store First Storage Group: An attempt to move the file ... An error occurred while writing to the database log file of storage group ...
    (microsoft.public.windows.server.sbs)
  • Re: cant mount information store
    ... I then reinstalled exchange and then installed exchange 2003 ... Information Store First Storage Group: Database recovery failed ... Microsoft Exchange Information Store. ...
    (microsoft.public.windows.server.sbs)
  • Re: Many Exchange errors!
    ... Event Source: ESE ... Information Store First Storage Group: An attempt to move the file ... An error occurred while writing to the database log file of storage group ...
    (microsoft.public.windows.server.sbs)
  • Re: Many Exchange errors!
    ... Event Source: ESE ... Information Store First Storage Group: An attempt to move the file ... An error occurred while writing to the database log file of storage group ...
    (microsoft.public.windows.server.sbs)