[TriLUG] Odd website behaviour

Brian McCullough bdmc at buadh-brath.com
Wed Apr 10 21:56:07 EDT 2013


On Tue, Apr 09, 2013 at 03:14:30PM -0400, Igor Partola wrote:
> Brian,
> 
> What I would suspect is that while the image is being retrieved and
> echo'ed, PHP prints some kind of a warning. 

Yes, I'm well aware of issues with pages that have an error printed to
the page at the bottom, just where PHP decided to stop.


Unfortunately, I am working inside a corporate environment here, and the
only browser is IE.  My right-click menu doesn't even have "view
source."


> Try doing everything by
> actually echo'ing the image data, and view the page as text (fetch it into
> a file) and see if there is any extraneous data in there. Your PHP and
> apache executables might not have changed, but some underlying library
> might have.

OK.  I found a more up-to-date AIX version of wget, I couldn't get curl
to install properly, too may library conflicts between the ones that I
needed to install and the ones that are native to AIX.

The reason that I needed the newer wget was because of the Session
variables, which the older one didn't understand.

I finally worked my way through the login page to the page that contains
the image, and finally fired the actual "SRC" value from the IMG tag.

I definitely get data back.

However, after installing a hex viewer ( hexedit ), I was able to see
the problem, one of the ones that had already been proposed.

The very first byte of the picture data ( JPEG-format file ) is a
linefeed, which is pushing all of the data to the right by one byte,
completely corrupting things, and, of course, the image does not
display!


Now I have to find out where that linefeed is coming from.


Thank you all,
Brian




More information about the TriLUG mailing list