Welcome Guest, Not a member yet? Register   Sign In
Very strange output issue (bug?)
#1

[eluser]Unknown[/eluser]
I'm seeing a very strange issue with script output. I'm sometimes getting a four digit hexadecimal code before the output begins, and a zero at the end of output - for example:

Code:
2fc3
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
&lt;html &gt;
......
&lt;/html&gt;
0

The hex number varies depending on requested uri and / or contents. I'm not using caching and output compression is off. I've seen this issue on a couple of projects, each very different and hosted on different servers.

An example of the issue can be seen here: http://www.holidayproperties.co.uk/notfound.html

You can substitute 'notfound' with any random text to see the hex code change to different values.

I use this template library - http://ellislab.com/forums/viewthread/95687 - although even when bypassing the library and outputting directly, using echo, I see the same issue.

I'd love to be able to solve this issue, so all assistance is greatly appreciated.

Thanks,

Bryn.
#2

[eluser]Ochetski[/eluser]
Are you using mac?
Something like that happened to me. Some unexpected characters at the beginning of some files, and i figured out that mac system put it there but it's only visible in some editors.
#3

[eluser]surfgatinho[/eluser]
I have this exact same issue. I haven't fixed it but I know more or less what is causing it.

Mine stems from a helper file. If I go to the autoload file in the config and stop the helper loading the characters disappear.
Now I just have to work out the problem with the helper.
#4

[eluser]Daniel Moore[/eluser]
I have to agree with Ochetski. I had this problem when working with an install that someone else had done using a Mac. I had to use my hex editor to go in and manually remove the characters.

It can also be an issue with some text editors placing a BOM at the beginning of the file. You'll need to strip those characters out. I'm not saying definitely your problem, but it is the most likely culprit.
#5

[eluser]surfgatinho[/eluser]
I had the exact same problem but haven't been near a Mac. Also the hex characters change.
#6

[eluser]WanWizard[/eluser]
You're saving files in UTF-8 with a BOM header. Tell your editor not to do that, or switch editors if you can't.




Theme © iAndrew 2016 - Forum software by © MyBB