Community Support for OpenDocMan (Deprecated)
Check out results in damanged / corrupt file - Printable Version

+- Community Support for OpenDocMan (Deprecated) (
+-- Forum: OpenDocMan Community Discussion (
+--- Forum: OpenDocMan Bug Reports (
+--- Thread: Check out results in damanged / corrupt file (/thread-978.html)

Check out results in damanged / corrupt file - arjandevries - 01-07-2017


My brother in law had a problem with checking out files. When he did that and downloaded the file he could not open it. The file was corrupted. He already discovered that there was a single byte (space) added to file file at the first position.

After some investigation i discovered the problem. The php code just returns the file that fine. The only problem is that the buffer was not empty and that is contained a single space. So a space is returned with the file content attached. So maybe it's a good idea to clear the buffers just before the php code returns the file, so it will works always. But were is the space coming from? In this case it was inside the dutch php language file. The first spot in the file, outside the php tags there is a space. Removing the space character solved the issue in this case.

Arjan de Vries