Ross wrote:
> So,
>
> 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";
php -r 'echo serialize(array("pass","pass","pass"));'
a:4:{i:0;s:4:"pass";i:1;s:4:"pass";i:2;s:4:"pass";}
php -r
'var_dump(unserialize("a:4:{i:0;s:4:\"pass\";i:1;s:4:\"pass\";i:2;s:4:\"pass\";"));'
false
what does your serialized value NOT have that mine does?
>
> Which leads me to believe that the problem is with the php function
> unserialize().
looks to me like you are giving unserialize() a borked string and it's giving
you boolean false in return - that's a fair swap in my book.
>
> 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?
you can rule it out until you can rule it out.
>
>
> R.
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php