Community Support for OpenDocMan (Deprecated)

Full Version: Check out results in damanged / corrupt file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

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