MarkyA Posted November 2, 2015 Share Posted November 2, 2015 Hi All, Hope somebody can help me here. Don't know which board to post so I'll just put it here. I have been stumped on how this is happening. Every time I download an image there is a 0A prepended at the start of the file. Now images such as a JPEG, which usually starts with FF D8 FF E1 or FF D8 FF E0 is not readable by image viwers/apps because it gets confused on the image type. Here is an example in hex and human-redable text below it. 0A FF D8 FF E1 00 24 45 78 69 66 00 00 49 49 2A 00 08 00 00 00 01 00 98 82 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 FF EC 00 11 44 75 63 6B 79 00 01 00 04 00 00 00 44 00 00 FF E1 03 1D 68 74 74 70 3A 2F 2F 6E 73 2E 61 64 6F 62 65 2E 63 6F 6D 2F 78 61 70 2F 31 2E 30 2F 00 3C 3F 78 70 61 63 6B 65 74 20 62 65 67 69 6E 3D 22 EF BB BF 22 20 69 64 3D 22 57 35 4D 30 4D 70 43 65 68 69 48 7A 72 65 53 7A 4E 54 63 7A 6B 63 39 64 22 3F 3E 20 3C 78 3A 78 6D 70 6D 65 74 61 20 78 6D 6C 6E 73 3A 78 3D 22 61 64 6F 62 65 3A 6E 73 3A 6D 65 74 61 2F 22 20 78 3A 78 6D 70 74 6B 3D 22 41 64 6F 62 65 20 58 4D 50 20 43 6F 72 65 20 35 2E 36 2D 63 30 31 34 20 37 39 2E 31 35 36 37 39 37 2C 20 32 30 31 34 2F 30 38 2F 32 30 2D 30 39 3A 35 33 3A 30 32 20 20 20 20 20 20 20 20 22 3E 20 Note that I have a testing site and this does not happen there. The downloaded files are fine. Ducky K ÿá vhttp://ns.adobe.com/xap/1.0/ <?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?> <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.0-c060 61.134777, 2010/02/12-17:32:00 "> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> Has anyone encountered this before? What did you do to fix it? Thanks and Regards, Marky Quote Link to comment Share on other sites More sharing options...
mac_gyver Posted November 2, 2015 Share Posted November 2, 2015 (edited) some code you have, that's either part of the original uploading or downloading of the file, probably contains a new-line character in it, outside of any <?php ?> tags, and this character is getting prepended to the file data. Edited November 2, 2015 by mac_gyver Quote Link to comment Share on other sites More sharing options...
MarkyA Posted November 3, 2015 Author Share Posted November 3, 2015 Exactly! In one of the include files there was a newline character after the ending PHP tag that was getting included in the output. It is fixed now. Quote Link to comment Share on other sites More sharing options...
Barand Posted November 3, 2015 Share Posted November 3, 2015 Don't put the closing ?> at the end of included files. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.