We simply switched our website to a brand new server. There's part of my PHP software that pulls out a serialized data value in the MySQL table, and puts it right into a variable, after which it's designed to unserialize().

I didn't have this problem on every other servers (which exact code can be used on a variety of servers..), but I am getting an problem in which the value does not unserialize - it returns false (blank).

HOWEVER, basically copy the precise value, place it into another $var, after which unserialize($var) it, it really works perfectly fine into an assortment... those are the identical values. One works, another does not.

Browse the link that follows to visualise what i'm saying..


And also the PHP code in this article is:

include 'start.php';

$var = 'a:8:{i:0;s:0:"";i:1;s:11:"New Listing";i:2;s:11:"Just Listed";i:3;s:9:"New Price";i:4;s:17:"Exclusive Listing";i:5;s:12:"Just Reduced";i:6;s:31:"Great Price!;Showroom Condition";i:7;s:42:"Featured In;Dream Homes of Canada Magazine";}';

echo 'Echoing $var:<br />';
echo $var;
echo '<br />';

echo 'Echoing $settings[\'remarksdisplay\'] retrieved from mysql database field:<br />';
echo $settings['remarksdisplay'];
echo '<br />';

echo '<br />';

echo 'When you run print_r(unserialize($var)):<br />';
echo '<br />';

echo 'When you run print_r(unserialize($settings[\'remarksdisplay\'])):<br />';

echo '<br />';
echo '<br />';

echo 'When you run IF statement to see if $settings[\'remarksdisplay\']==$var:<br />';
if($settings['remarksdisplay']==$var) {echo "EQUAL";} else {echo 'not equal';}

I have also checked the server configurations concerning the serialize() and unserialize() functions...

Take a look at both of these configurations: http://www.paulmasoumi.com/admin/phpinfo.php http://demo.brixwork.com/admin/phpinfo.php

Configurations including serialization of strings, miracle quotes etc. are identical.

What shall we be held missing???