Strange. I copied your config to my local script and it turns out just fine.
What version of PHP are you using? And what webserver?
Try finding this line:
$cbstorage = $TempStorage;
And add the following debug output after it:
echo $TempStorage;
I'm not really sure what could be wrong. Do you have access to the web servers error log? If you could take a look into it and see if it says something it would be great.
The script is saved in DOS format for some reason (probably is in the original customboxpals), maybe you could try and save it in unix format?