I am attempting to write to an image file from a blob.
if($_POST[\'logoFilename\'] != \'undefined\'){ $logoFile = fopen($_POST[\'logoFilename\'], \'w\') o
If it's really a blob, you might want to trying using mode "wb" as the second parameter to your fopen() call.
EDIT: You might also consider just using file_put_contents(), which is binary-safe.