On Wed, 2006-08-09 at 21:06 +0100, 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";
> 
> 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?

There are incompatibilities between 4 and 5 with respect to unserialize,
though I thought it was forward incompatibility and not backward. For
instance PHP didn't mind unserializing integer keys that were denoted as
strings, whereas PHP 5 would choke unless the key was serialized
specifically as an integer when all it contained was integer digits. I
don't know what your exact problem is, but it could be an
incompatibility issue. Also PHP5 may have added extra datatypes or
"magic" to the serialization process that PHP4 may not recognize. Maybe
turn your error logging to max to see if you get an error message
indicating corruption.

Cheers,
Rob.
-- 
.------------------------------------------------------------.
| InterJinn Application Framework - http://www.interjinn.com |
:------------------------------------------------------------:
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for       |
| creating re-usable components quickly and easily.          |
`------------------------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to