I've got a project that is being migrated from an older SLES 10 server to a vm running CentOS 6.4. On the older server and in test environments everything works as it should. On the vm base64_encode seems to not be working but does not give any errors. I have a session var where I take an array, serialize it and base64_encode it. When that var is read in another script it is base64_decoded and un-serialized. Like I said this works everywhere but the vm. On the vm I examined the session file and the var is serialized only.
I've checked php.ini and the output of phpinfo, comparing them with my dev environment and I don't see anything that would indicate why this isn't working. If the base64_encode function was disabled in php.ini (it isn't) there'd be a warning message when my script tries to use it. When testing there are no errors of any kind until base64_decode is run on the un-serialized var. Then the error "PHP Warning: base64_decode() expects parameter 1 to be a string, array given". This of course is because the var was only serialized despite being assigned as:
$_SESSION['whatever'] = base64_encode(serialize($somearray));
The vm setup is CentOS 6.4 with PHP 5.3.3 on Apache 2.2.15. I'm banging my head against the wall right now so any suggestions would be much appreciated.