Unserialize working on Windows but not Linux


I have a problem with the unserialize() function. On windows it is working fine but on linux it dosen't seem to work.

The string is just a series of timezones. This is the data:

a:27:{i:-11;s:40:"(GMT - 11:00 hours) Midway Island, Samoa";i:-12;s:40:"(GMT - 12:00 hours) Enitwetok, Kwajalien";i:-10;s:26:"(GMT - 10:00 hours) Hawaii";i:-9;s:25:"(GMT - 9:00 hours) Alaska";i:-8;s:45:"(GMT - 8:00 hours) Pacific Time (US & Canada)";i:-7;s:46:"(GMT - 7:00 hours) Mountain Time (US & Canada)";i:-6;s:45:"(GMT - 6:00 hours) Central Time (US & Canada)";i:-5;s:66:"(GMT - 5:00 hours) Eastern Time (US & Canada), Bogota, Lima, Quito";i:-4;s:58:"(GMT - 4:00 hours) Atlantic Time (Canada), Caracas, La Paz";s:4:"-3.5";s:37:"(GMT - 3:30 hours) Newfoundland (NST)";i:-3;s:65:"(GMT - 3:00 hours) Brazil, Buenos Aires, Georgetown, Falkland Is.";i:-2;s:57:"(GMT - 2:00 hours) Mid-Atlantic, Ascention Is., St Helena";i:-1;s:45:"(GMT - 1:00 hours) Azores, Cape Verde Islands";i:0;s:61:"(GMT) Casablanca, Dublin, Edinburgh, London, Lisbon, Monrovia";i:1;s:68:"(GMT + 1:00 hours) Berlin, Brussels, Copenhagen, Madrid, Paris, Rome";i:2;s:52:"(GMT + 2:00 hours) Kaliningrad, South Africa, Warsaw";i:3;s:51:"(GMT + 3:00 hours)Baghdad, Riyadh, Moscow, Nairobi";i:4;s:51:"(GMT + 4:00 hours) Adu Dhabi, Baku, Muscat, Tbilisi";i:5;s:61:"(GMT + 5:00 hours) Ekaterinburg, Islamabad, Karachi, Tashkent";i:6;s:42:"(GMT + 6:00 hours) Almaty, Colomba, Dhakra";i:7;s:42:"(GMT + 7:00 hours) Bangkok, Hanoi, Jakarta";i:8;s:63:"(GMT + 8:00 hours) Beijing, Hong Kong, Perth, Singapore, Taipei";i:9;s:56:"(GMT + 9:00 hours) Osaka, Sapporo, Seoul, Tokyo, Yakutsk";s:3:"9.5";s:26:"(GMT +9:30 hours) Adelaide";i:10;s:68:"(GMT + 10:00 hours) Melbourne, Papua New Guinea, Sydney, Vladivostok";i:11;s:59:"(GMT + 11:00 hours) Magadan, New Caledonia, Solomon Islands";i:12;s:63:"(GMT + 12:00 hours) Auckland, Wellington, Fiji, Marshall Island";}

Any ideas? On linux I get no array formed at all.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

thepaddersAuthor Commented:
Just to add, this data is stored in the database - it comes out as a result set that I then try to unserialize but it does not work.

I am wondering if there is something wrong with the above or if there is a bug in unserialize().
Are the two servers using the same version of PHP?  What version is that?
thepaddersAuthor Commented:

The windows version is using PHP 5.1.1
The linux server is using PHP 4.4.2

But in the past people have mentioned the same problem on linux servers, but I am not sure with which other versions.
Starting with Angular 5

Learn the essential features and functions of the popular JavaScript framework for building mobile, desktop and web applications.

I'd try serializing the data on windows, then serializing the same data on linux, and compare the resulting strings.  Are they identical?
thepaddersAuthor Commented:
Seems the problem istn't with unserialize. The data is in XML and when I import it into a database on linux, for some reason the space after the closing bracket, ), just before Baghdad is lost. No idea why, very odd but that is what is breaking it.

I had looked before to try and see a difference, but hadn't noticed that one bit of whitespace that was missing.
PAQed with points refunded (500)

Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.