From base_64_decode manual comments
php <= 5.0.5's base64_decode( $string ) will assume that a space is meant to be a + sign where php >= 5.1.0's base64_decode( $string ) will no longer make that assumption
To fix this behavior try this code
$encodedData = str_replace(' ','+',$encodedData);
$decocedData = base64_decode($encodedData);
As this is no't your case then you have to check this answer
Because every thing work fine for me here on (WAMP)
EDIT: As in our below conversation
There are a lot of things that may corrupt header for example , if your file encoding is UTF-8 then you should save it as UTF-8 Without bom you can do this using notepad ++ , also make sure if you use FTP that your client didn't any chars to your file , rather than that every thing should work fine