Re: script stopped working- no output from unserialize()
| From: | Richard Lynch | Date: | Thu, 10 Aug 2006 04:09:00 +0000 |
| Subject: | Re: script stopped working- no output from unserialize() | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-240431@lists.php.net to get a copy of this message | ||
On Wed, August 9, 2006 3:06 pm, Ross wrote:
> When I echo out the results from the db I get the serialized data but
> when I
> try and pass the serialized data to the function to unserialize the
> output
> it doesn't work - no output what-so-ever. Also when the serialized
> data is
> sent to the function and then echoed out before it is unserialized() I
> get
> the expected result .- eg
> a:4:{i:0;s:4:"pass";i:1;s:4:"pass";i:2;s:4:"pass";
This seems to be missing a closing } on the end, from this naive
reader's crude guess at what should be there...
Are you sure the DB text field length is "big enough"...?
> Which leads me to believe that the problem is with the php function
> unserialize().
>
> The same function works fine locally. I am working with php version 5
> locally and version 4.4.2 on the remote host Could that be the
> problem?
It's entirely possible that the serialize/unserialize functions
changed the internal data format from 4 to 5, I presume...
Compare the output from 4.4.2 of <?php echo serialize($foo);?> and the
same $foo on PHP 5.0 and then see if they are the same.
--
Like Music?
http://l-i-e.com/artists.htm