Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #13221 > unrolled thread

totally WEIRD bug? Firefox caching?

Started byThe Natural Philosopher <tnp@invalid.invalid>
First post2014-03-19 17:25 +0000
Last post2014-03-22 18:08 +0000
Articles 20 on this page of 22 — 9 participants

Back to article view | Back to comp.lang.php


Contents

  totally WEIRD bug? Firefox caching? The Natural Philosopher <tnp@invalid.invalid> - 2014-03-19 17:25 +0000
    Re: totally WEIRD bug? Firefox caching? "J.O. Aho" <user@example.net> - 2014-03-19 20:06 +0100
      Re: totally WEIRD bug? Firefox caching? Robert Heller <heller@deepsoft.com> - 2014-03-19 14:32 -0500
        Re: totally WEIRD bug? Firefox caching? The Natural Philosopher <tnp@invalid.invalid> - 2014-03-19 23:42 +0000
      Re: totally WEIRD bug? Firefox caching? The Natural Philosopher <tnp@invalid.invalid> - 2014-03-19 23:42 +0000
    Re: totally WEIRD bug? Firefox caching? Gabe <usenet@moojuice.net> - 2014-03-19 21:39 +0000
      Re: totally WEIRD bug? Firefox caching? The Natural Philosopher <tnp@invalid.invalid> - 2014-03-19 23:43 +0000
        Re: totally WEIRD bug? Firefox caching? Gabe <usenet@moojuice.net> - 2014-03-20 08:29 +0000
    Re: totally WEIRD bug? Firefox caching? Richard Yates <richard@yatesguitar.com> - 2014-03-19 18:34 -0700
      Re: totally WEIRD bug? Firefox caching? The Natural Philosopher <tnp@invalid.invalid> - 2014-03-20 03:10 +0000
        Re: totally WEIRD bug? Firefox caching? Richard Yates <richard@yatesguitar.com> - 2014-03-19 21:26 -0700
          Re: totally WEIRD bug? Firefox caching? The Natural Philosopher <tnp@invalid.invalid> - 2014-03-20 11:13 +0000
    Re: totally WEIRD bug? Firefox caching? Arno Welzel <usenet@arnowelzel.de> - 2014-03-20 10:13 +0100
      Re: totally WEIRD bug? Firefox caching? The Natural Philosopher <tnp@invalid.invalid> - 2014-03-20 11:26 +0000
        Re: totally WEIRD bug? Firefox caching? Jerry Stuckle <jstucklex@attglobal.net> - 2014-03-20 08:43 -0400
        Re: totally WEIRD bug? Firefox caching? Arno Welzel <usenet@arnowelzel.de> - 2014-03-20 15:53 +0100
          Re: totally WEIRD bug? Firefox caching? The Natural Philosopher <tnp@invalid.invalid> - 2014-03-20 18:39 +0000
            Re: totally WEIRD bug? Firefox caching? Arno Welzel <usenet@arnowelzel.de> - 2014-03-21 08:33 +0100
            Re: totally WEIRD bug? Firefox caching? Nisse Engström <news.NOSPAM.uvex6@luden.se> - 2014-03-22 07:24 +0100
              Re: totally WEIRD bug? Firefox caching? The Natural Philosopher <tnp@invalid.invalid> - 2014-03-22 12:10 +0000
                Re: totally WEIRD bug? Firefox caching? Robert Heller <heller@deepsoft.com> - 2014-03-22 10:48 -0500
                  Re: totally WEIRD bug? Firefox caching? Doug Miller <doug_at_milmac_dot_com@example.com> - 2014-03-22 18:08 +0000

Page 1 of 2  [1] 2  Next page →


#13221 — totally WEIRD bug? Firefox caching?

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2014-03-19 17:25 +0000
Subjecttotally WEIRD bug? Firefox caching?
Message-ID<lgcjv5$16v$1@news.albasani.net>
I have TWO IDENTICAL PHP  FILES.

They are supposed to display an image got from a database.

One does. The other does not.

It persistently tells me the image is corrupted.

I have even copied one file that works directly over the other. It still 
doesn't work.


I have debugged it, got it to output the image to a file and read the 
file successfully.

Something on firefox now just assumes its corrupted and won't clear its 
cache. I've shut down firefox, Ive changed its name I've clearded its cache.

WTF is going on??



-- 
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to 
lead are elected by the least capable of producing, and where the 
members of society least likely to sustain themselves or succeed, are 
rewarded with goods and services paid for by the confiscated wealth of a 
diminishing number of producers.

[toc] | [next] | [standalone]


#13222

From"J.O. Aho" <user@example.net>
Date2014-03-19 20:06 +0100
Message-ID<bou85sFms3gU1@mid.individual.net>
In reply to#13221
On 19/03/14 18:25, The Natural Philosopher wrote:
> I have TWO IDENTICAL PHP  FILES.
>
> They are supposed to display an image got from a database.
>
> One does. The other does not.
>
> It persistently tells me the image is corrupted.
>
> I have even copied one file that works directly over the other. It still
> doesn't work.
>
>
> I have debugged it, got it to output the image to a file and read the
> file successfully.
>
> Something on firefox now just assumes its corrupted and won't clear its
> cache. I've shut down firefox, Ive changed its name I've clearded its
> cache.
>
> WTF is going on??

Could it be charset issues?

-- 

  //Aho

[toc] | [prev] | [next] | [standalone]


#13223

FromRobert Heller <heller@deepsoft.com>
Date2014-03-19 14:32 -0500
Message-ID<DrGdnZKxnc8nbbTOnZ2dnUVZ_radnZ2d@giganews.com>
In reply to#13222
At Wed, 19 Mar 2014 20:06:36 +0100 "J.O. Aho" <user@example.net> wrote:

> 
> On 19/03/14 18:25, The Natural Philosopher wrote:
> > I have TWO IDENTICAL PHP  FILES.
> >
> > They are supposed to display an image got from a database.
> >
> > One does. The other does not.
> >
> > It persistently tells me the image is corrupted.
> >
> > I have even copied one file that works directly over the other. It still
> > doesn't work.
> >
> >
> > I have debugged it, got it to output the image to a file and read the
> > file successfully.
> >
> > Something on firefox now just assumes its corrupted and won't clear its
> > cache. I've shut down firefox, Ive changed its name I've clearded its
> > cache.
> >
> > WTF is going on??
> 
> Could it be charset issues?

Same or different servers? If different servers, it could be a Apache or PHP
config issue (the 'bad' server would have an incorrect setting somewhere),
probably causing an incorrect content-type: heading or something like that. 
(By 'different' servers I am including different *virtual* servers -- eg 
something could be wrong in a <VirtualHost>...</VirtualHost> container.)

> 

-- 
Robert Heller             -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software        -- http://www.deepsoft.com/
()  ascii ribbon campaign -- against html e-mail
/\  www.asciiribbon.org   -- against proprietary attachments


                                                                                                     

[toc] | [prev] | [next] | [standalone]


#13229

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2014-03-19 23:42 +0000
Message-ID<lgda1m$d7g$2@news.albasani.net>
In reply to#13223
On 19/03/14 19:32, Robert Heller wrote:
> At Wed, 19 Mar 2014 20:06:36 +0100 "J.O. Aho" <user@example.net> wrote:
>
>>
>> On 19/03/14 18:25, The Natural Philosopher wrote:
>>> I have TWO IDENTICAL PHP  FILES.
>>>
>>> They are supposed to display an image got from a database.
>>>
>>> One does. The other does not.
>>>
>>> It persistently tells me the image is corrupted.
>>>
>>> I have even copied one file that works directly over the other. It still
>>> doesn't work.
>>>
>>>
>>> I have debugged it, got it to output the image to a file and read the
>>> file successfully.
>>>
>>> Something on firefox now just assumes its corrupted and won't clear its
>>> cache. I've shut down firefox, Ive changed its name I've clearded its
>>> cache.
>>>
>>> WTF is going on??
>>
>> Could it be charset issues?
>
> Same or different servers? If different servers, it could be a Apache or PHP
> config issue (the 'bad' server would have an incorrect setting somewhere),
> probably causing an incorrect content-type: heading or something like that.
> (By 'different' servers I am including different *virtual* servers -- eg
> something could be wrong in a <VirtualHost>...</VirtualHost> container.)
>
same server, same code, same data

>>
>


-- 
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to 
lead are elected by the least capable of producing, and where the 
members of society least likely to sustain themselves or succeed, are 
rewarded with goods and services paid for by the confiscated wealth of a 
diminishing number of producers.

[toc] | [prev] | [next] | [standalone]


#13228

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2014-03-19 23:42 +0000
Message-ID<lgda0r$d7g$1@news.albasani.net>
In reply to#13222
On 19/03/14 19:06, J.O. Aho wrote:
> On 19/03/14 18:25, The Natural Philosopher wrote:
>> I have TWO IDENTICAL PHP  FILES.
>>
>> They are supposed to display an image got from a database.
>>
>> One does. The other does not.
>>
>> It persistently tells me the image is corrupted.
>>
>> I have even copied one file that works directly over the other. It still
>> doesn't work.
>>
>>
>> I have debugged it, got it to output the image to a file and read the
>> file successfully.
>>
>> Something on firefox now just assumes its corrupted and won't clear its
>> cache. I've shut down firefox, Ive changed its name I've clearded its
>> cache.
>>
>> WTF is going on??
>
> Could it be charset issues?
>
nope. same data, same code.

-- 
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to 
lead are elected by the least capable of producing, and where the 
members of society least likely to sustain themselves or succeed, are 
rewarded with goods and services paid for by the confiscated wealth of a 
diminishing number of producers.

[toc] | [prev] | [next] | [standalone]


#13226

FromGabe <usenet@moojuice.net>
Date2014-03-19 21:39 +0000
Message-ID<i8oWu.51847$204.359@fx17.am4>
In reply to#13221
On 19/03/2014 17:25, The Natural Philosopher wrote:
> I have TWO IDENTICAL PHP  FILES.
>
> They are supposed to display an image got from a database.
>
> One does. The other does not.
>
> It persistently tells me the image is corrupted.
>
> I have even copied one file that works directly over the other. It still
> doesn't work.
>
>
> I have debugged it, got it to output the image to a file and read the
> file successfully.
>
> Something on firefox now just assumes its corrupted and won't clear its
> cache. I've shut down firefox, Ive changed its name I've clearded its
> cache.
>
> WTF is going on??
>
>
>

Check the response headers sent for each request, are they both set to 
image/jpg or at least the same?

Cheers

Gabe

[toc] | [prev] | [next] | [standalone]


#13230

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2014-03-19 23:43 +0000
Message-ID<lgda3f$d7g$3@news.albasani.net>
In reply to#13226
On 19/03/14 21:39, Gabe wrote:
> On 19/03/2014 17:25, The Natural Philosopher wrote:
>> I have TWO IDENTICAL PHP  FILES.
>>
>> They are supposed to display an image got from a database.
>>
>> One does. The other does not.
>>
>> It persistently tells me the image is corrupted.
>>
>> I have even copied one file that works directly over the other. It still
>> doesn't work.
>>
>>
>> I have debugged it, got it to output the image to a file and read the
>> file successfully.
>>
>> Something on firefox now just assumes its corrupted and won't clear its
>> cache. I've shut down firefox, Ive changed its name I've clearded its
>> cache.
>>
>> WTF is going on??
>>
>>
>>
>
> Check the response headers sent for each request, are they both set to
> image/jpg or at least the same?
>
they are. Image/png
same headers, same code, same data, same website, same server.

> Cheers
>
> Gabe


-- 
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to 
lead are elected by the least capable of producing, and where the 
members of society least likely to sustain themselves or succeed, are 
rewarded with goods and services paid for by the confiscated wealth of a 
diminishing number of producers.

[toc] | [prev] | [next] | [standalone]


#13238

FromGabe <usenet@moojuice.net>
Date2014-03-20 08:29 +0000
Message-ID<iFxWu.22083$Dj1.16007@fx06.am4>
In reply to#13230
On 19/03/2014 23:43, The Natural Philosopher wrote:
> On 19/03/14 21:39, Gabe wrote:
>> On 19/03/2014 17:25, The Natural Philosopher wrote:
>>> I have TWO IDENTICAL PHP  FILES.
>>>
>>> They are supposed to display an image got from a database.
>>>
>>> One does. The other does not.
>>>
>>> It persistently tells me the image is corrupted.
>>>
>>> I have even copied one file that works directly over the other. It still
>>> doesn't work.
>>>
>>>
>>> I have debugged it, got it to output the image to a file and read the
>>> file successfully.
>>>
>>> Something on firefox now just assumes its corrupted and won't clear its
>>> cache. I've shut down firefox, Ive changed its name I've clearded its
>>> cache.
>>>
>>> WTF is going on??
>>>
>>>
>>>
>>
>> Check the response headers sent for each request, are they both set to
>> image/jpg or at least the same?
>>
> they are. Image/png
> same headers, same code, same data, same website, same server.
>
>> Cheers
>>
>> Gabe
>

You seem pretty certain it is firefox's issue. Did you try another 
browser or completely deleting your user profile from Firefox?

How about outputting cache control headres like the following that I 
ripped off the PHP site?
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past

[toc] | [prev] | [next] | [standalone]


#13231

FromRichard Yates <richard@yatesguitar.com>
Date2014-03-19 18:34 -0700
Message-ID<vahki9l1edp6ds310uadmnk39anor0cp1d@4ax.com>
In reply to#13221
On Wed, 19 Mar 2014 17:25:56 +0000, The Natural Philosopher
<tnp@invalid.invalid> wrote:

>I have TWO IDENTICAL PHP  FILES.
>
>They are supposed to display an image got from a database.
>
>One does. The other does not.
>
>It persistently tells me the image is corrupted.
>
>I have even copied one file that works directly over the other. It still 
>doesn't work.
>
>
>I have debugged it, got it to output the image to a file and read the 
>file successfully.
>
>Something on firefox now just assumes its corrupted and won't clear its 
>cache. I've shut down firefox, Ive changed its name I've clearded its cache.
>
>WTF is going on??

Have you directly compared them with something like CSDiff? 

[ http://www.componentsoftware.com/products/CSDiff/ ]

[toc] | [prev] | [next] | [standalone]


#13233

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2014-03-20 03:10 +0000
Message-ID<lgdm78$e36$1@news.albasani.net>
In reply to#13231
On 20/03/14 01:34, Richard Yates wrote:
> On Wed, 19 Mar 2014 17:25:56 +0000, The Natural Philosopher
> <tnp@invalid.invalid> wrote:
>
>> I have TWO IDENTICAL PHP  FILES.
>>
>> They are supposed to display an image got from a database.
>>
>> One does. The other does not.
>>
>> It persistently tells me the image is corrupted.
>>
>> I have even copied one file that works directly over the other. It still
>> doesn't work.
>>
>>
>> I have debugged it, got it to output the image to a file and read the
>> file successfully.
>>
>> Something on firefox now just assumes its corrupted and won't clear its
>> cache. I've shut down firefox, Ive changed its name I've clearded its cache.
>>
>> WTF is going on??
>
> Have you directly compared them with something like CSDiff?
>
> [ http://www.componentsoftware.com/products/CSDiff/ ]
>
I dont run windoes

-- 
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to 
lead are elected by the least capable of producing, and where the 
members of society least likely to sustain themselves or succeed, are 
rewarded with goods and services paid for by the confiscated wealth of a 
diminishing number of producers.

[toc] | [prev] | [next] | [standalone]


#13236

FromRichard Yates <richard@yatesguitar.com>
Date2014-03-19 21:26 -0700
Message-ID<kfrki9tgqqs5pcv0qssca445ocfp3fhh9l@4ax.com>
In reply to#13233
On Thu, 20 Mar 2014 03:10:32 +0000, The Natural Philosopher
<tnp@invalid.invalid> wrote:

>On 20/03/14 01:34, Richard Yates wrote:
>> On Wed, 19 Mar 2014 17:25:56 +0000, The Natural Philosopher
>> <tnp@invalid.invalid> wrote:
>>
>>> I have TWO IDENTICAL PHP  FILES.
>>>
>>> They are supposed to display an image got from a database.
>>>
>>> One does. The other does not.
>>>
>>> It persistently tells me the image is corrupted.
>>>
>>> I have even copied one file that works directly over the other. It still
>>> doesn't work.
>>>
>>>
>>> I have debugged it, got it to output the image to a file and read the
>>> file successfully.
>>>
>>> Something on firefox now just assumes its corrupted and won't clear its
>>> cache. I've shut down firefox, Ive changed its name I've clearded its cache.
>>>
>>> WTF is going on??
>>
>> Have you directly compared them with something like CSDiff?
>>
>> [ http://www.componentsoftware.com/products/CSDiff/ ]
>>
>I dont run windoes

Is there nothing like it for your OS?

[toc] | [prev] | [next] | [standalone]


#13244

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2014-03-20 11:13 +0000
Message-ID<lgeihl$kbb$1@news.albasani.net>
In reply to#13236
On 20/03/14 04:26, Richard Yates wrote:
> On Thu, 20 Mar 2014 03:10:32 +0000, The Natural Philosopher
> <tnp@invalid.invalid> wrote:
>
>> On 20/03/14 01:34, Richard Yates wrote:
>>> On Wed, 19 Mar 2014 17:25:56 +0000, The Natural Philosopher
>>> <tnp@invalid.invalid> wrote:
>>>
>>>> I have TWO IDENTICAL PHP  FILES.
>>>>
>>>> They are supposed to display an image got from a database.
>>>>
>>>> One does. The other does not.
>>>>
>>>> It persistently tells me the image is corrupted.
>>>>
>>>> I have even copied one file that works directly over the other. It still
>>>> doesn't work.
>>>>
>>>>
>>>> I have debugged it, got it to output the image to a file and read the
>>>> file successfully.
>>>>
>>>> Something on firefox now just assumes its corrupted and won't clear its
>>>> cache. I've shut down firefox, Ive changed its name I've clearded its cache.
>>>>
>>>> WTF is going on??
>>>
>>> Have you directly compared them with something like CSDiff?
>>>
>>> [ http://www.componentsoftware.com/products/CSDiff/ ]
>>>
>> I dont run windoes
>
> Is there nothing like it for your OS?
>
diff



-- 
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to 
lead are elected by the least capable of producing, and where the 
members of society least likely to sustain themselves or succeed, are 
rewarded with goods and services paid for by the confiscated wealth of a 
diminishing number of producers.

[toc] | [prev] | [next] | [standalone]


#13240

FromArno Welzel <usenet@arnowelzel.de>
Date2014-03-20 10:13 +0100
Message-ID<532AB145.8080504@arnowelzel.de>
In reply to#13221
Am 19.03.2014 18:25, schrieb The Natural Philosopher:

> I have TWO IDENTICAL PHP  FILES.
> 
> They are supposed to display an image got from a database.
> 
> One does. The other does not.
> 
> It persistently tells me the image is corrupted.
> 
> I have even copied one file that works directly over the other. It still 
> doesn't work.
> 
> 
> I have debugged it, got it to output the image to a file and read the 
> file successfully.

What means "read successfully"? Is it a valid image? Is the response
from the server valid?

> Something on firefox now just assumes its corrupted and won't clear its 
> cache. I've shut down firefox, Ive changed its name I've clearded its cache.

Firefox offers to option to clear the cache - no need to shut it down or
to rename the file.

> WTF is going on??

Either Firefox once got an invalid image and cached the response or the
server does not respond the way you think. Maybe a BOM in the PHP file?
This may not be visible in your editor, but it can cause all sort of
problems.


-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de

[toc] | [prev] | [next] | [standalone]


#13245

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2014-03-20 11:26 +0000
Message-ID<lgej8o$lsi$1@news.albasani.net>
In reply to#13240
On 20/03/14 09:13, Arno Welzel wrote:
> Am 19.03.2014 18:25, schrieb The Natural Philosopher:
>
>> I have TWO IDENTICAL PHP  FILES.
>>
>> They are supposed to display an image got from a database.
>>
>> One does. The other does not.
>>
>> It persistently tells me the image is corrupted.
>>
>> I have even copied one file that works directly over the other. It still
>> doesn't work.
>>
>>
>> I have debugged it, got it to output the image to a file and read the
>> file successfully.
>
> What means "read successfully"? Is it a valid image? Is the response
> from the server valid?

Thanks for all the replies because finally I found a permissions 
difference and although I dont completely understand why it is 
happening, I know WHAT is happening.

What is happning - and oddly running it against a test version of IE6 in 
my XP VM showed it up, was that it was outputting a '404 file not found' 
text BEFORE outputting perfectly valid PNG.

Why this is happening is a bug somewhere else completely.

IE 6 simply showed the text and the binary gobbledygook which was the 
clue I needed.

How this has happened will take me some time to understand because the 
line that says '404 not found' is followed  - or I thought it was - by 
an exit(); statement.

> Either Firefox once got an invalid image and cached the response or the
> server does not respond the way you think. Maybe a BOM in the PHP file?
> This may not be visible in your editor, but it can cause all sort of
> problems.
>
>
Firefox makes it hard to debug because it DOES cache bad results: I 
usually fix that by sending random nonsensical GET parameters which are 
ignored to ensure it thinks its a different URL each time.

It a huge minus against firefox that it didn't - even using the 
debugging console - show me what was really going on, whereas IE6 did.


-- 
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to 
lead are elected by the least capable of producing, and where the 
members of society least likely to sustain themselves or succeed, are 
rewarded with goods and services paid for by the confiscated wealth of a 
diminishing number of producers.

[toc] | [prev] | [next] | [standalone]


#13247

FromJerry Stuckle <jstucklex@attglobal.net>
Date2014-03-20 08:43 -0400
Message-ID<lgenpu$nm$1@dont-email.me>
In reply to#13245
On 3/20/2014 7:26 AM, The Natural Philosopher wrote:
> On 20/03/14 09:13, Arno Welzel wrote:
>> Am 19.03.2014 18:25, schrieb The Natural Philosopher:
>>
>>> I have TWO IDENTICAL PHP  FILES.
>>>
>>> They are supposed to display an image got from a database.
>>>
>>> One does. The other does not.
>>>
>>> It persistently tells me the image is corrupted.
>>>
>>> I have even copied one file that works directly over the other. It still
>>> doesn't work.
>>>
>>>
>>> I have debugged it, got it to output the image to a file and read the
>>> file successfully.
>>
>> What means "read successfully"? Is it a valid image? Is the response
>> from the server valid?
>
> Thanks for all the replies because finally I found a permissions
> difference and although I dont completely understand why it is
> happening, I know WHAT is happening.
>
> What is happning - and oddly running it against a test version of IE6 in
> my XP VM showed it up, was that it was outputting a '404 file not found'
> text BEFORE outputting perfectly valid PNG.
>
> Why this is happening is a bug somewhere else completely.
>
> IE 6 simply showed the text and the binary gobbledygook which was the
> clue I needed.
>
> How this has happened will take me some time to understand because the
> line that says '404 not found' is followed  - or I thought it was - by
> an exit(); statement.
>
>> Either Firefox once got an invalid image and cached the response or the
>> server does not respond the way you think. Maybe a BOM in the PHP file?
>> This may not be visible in your editor, but it can cause all sort of
>> problems.
>>
>>
> Firefox makes it hard to debug because it DOES cache bad results: I
> usually fix that by sending random nonsensical GET parameters which are
> ignored to ensure it thinks its a different URL each time.
>
> It a huge minus against firefox that it didn't - even using the
> debugging console - show me what was really going on, whereas IE6 did.
>
>

Firefox with the web developer extensions will show you EXACTLY what's 
going on.  But you have to know enough to understand the request and 
response headers.

Additionally, you can just clear the cache in Firefox.  It's quite easy 
to do.


-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#13250

FromArno Welzel <usenet@arnowelzel.de>
Date2014-03-20 15:53 +0100
Message-ID<532B00FC.8@arnowelzel.de>
In reply to#13245
Am 20.03.2014 12:26, schrieb The Natural Philosopher:

> On 20/03/14 09:13, Arno Welzel wrote:
>> Am 19.03.2014 18:25, schrieb The Natural Philosopher:
>>
>>> I have TWO IDENTICAL PHP  FILES.
>>>
>>> They are supposed to display an image got from a database.
>>>
>>> One does. The other does not.
>>>
>>> It persistently tells me the image is corrupted.
>>>
>>> I have even copied one file that works directly over the other. It still
>>> doesn't work.
[...]
> What is happning - and oddly running it against a test version of IE6 in 
> my XP VM showed it up, was that it was outputting a '404 file not found' 
> text BEFORE outputting perfectly valid PNG.
> 
> Why this is happening is a bug somewhere else completely.
> 
> IE 6 simply showed the text and the binary gobbledygook which was the 
> clue I needed.

Yes, because IE 6 assumes the user may not understand a server generated
error message and shows its own message as long as the reponse is below
a certain size limit (AFAIR less than 4000 bytes, but i may not remember
correctly). This is even more annoying - sometimes you see the message
from IE itself and sometimes

> How this has happened will take me some time to understand because the 
> line that says '404 not found' is followed  - or I thought it was - by 
> an exit(); statement.
> 
>> Either Firefox once got an invalid image and cached the response or the
>> server does not respond the way you think. Maybe a BOM in the PHP file?
>> This may not be visible in your editor, but it can cause all sort of
>> problems.
>>
>>
> Firefox makes it hard to debug because it DOES cache bad results: I 
> usually fix that by sending random nonsensical GET parameters which are 
> ignored to ensure it thinks its a different URL each time.
> 
> It a huge minus against firefox that it didn't - even using the 
> debugging console - show me what was really going on, whereas IE6 did.

You should learn to read HTTP response headers in the developer console
of Firefox. When I open <http://arnowelzel.de/wiki/en/tools/rwinfo>
there the developer console of Firefox tells me EXACTLY what is going on:

1) The server responded with a status code 404 (not found)

2) The response contains a number of headers which are also displayed




-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de

[toc] | [prev] | [next] | [standalone]


#13251

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2014-03-20 18:39 +0000
Message-ID<lgfcke$9p0$1@news.albasani.net>
In reply to#13250
On 20/03/14 14:53, Arno Welzel wrote:
> Am 20.03.2014 12:26, schrieb The Natural Philosopher:
>
>> On 20/03/14 09:13, Arno Welzel wrote:
>>> Am 19.03.2014 18:25, schrieb The Natural Philosopher:
>>>
>>>> I have TWO IDENTICAL PHP  FILES.
>>>>
>>>> They are supposed to display an image got from a database.
>>>>
>>>> One does. The other does not.
>>>>
>>>> It persistently tells me the image is corrupted.
>>>>
>>>> I have even copied one file that works directly over the other. It still
>>>> doesn't work.
> [...]
>> What is happning - and oddly running it against a test version of IE6 in
>> my XP VM showed it up, was that it was outputting a '404 file not found'
>> text BEFORE outputting perfectly valid PNG.
>>
>> Why this is happening is a bug somewhere else completely.
>>
>> IE 6 simply showed the text and the binary gobbledygook which was the
>> clue I needed.
>
> Yes, because IE 6 assumes the user may not understand a server generated
> error message and shows its own message as long as the reponse is below
> a certain size limit (AFAIR less than 4000 bytes, but i may not remember
> correctly). This is even more annoying - sometimes you see the message
> from IE itself and sometimes
>
>> How this has happened will take me some time to understand because the
>> line that says '404 not found' is followed  - or I thought it was - by
>> an exit(); statement.
>>
>>> Either Firefox once got an invalid image and cached the response or the
>>> server does not respond the way you think. Maybe a BOM in the PHP file?
>>> This may not be visible in your editor, but it can cause all sort of
>>> problems.
>>>
>>>
>> Firefox makes it hard to debug because it DOES cache bad results: I
>> usually fix that by sending random nonsensical GET parameters which are
>> ignored to ensure it thinks its a different URL each time.
>>
>> It a huge minus against firefox that it didn't - even using the
>> debugging console - show me what was really going on, whereas IE6 did.
>
> You should learn to read HTTP response headers in the developer console
> of Firefox. When I open <http://arnowelzel.de/wiki/en/tools/rwinfo>
> there the developer console of Firefox tells me EXACTLY what is going on:
>
> 1) The server responded with a status code 404 (not found)
>

The problem is that it didn't send an error code in the header

It sent a valid header, the some error text, and then the PNG

I generate all my own headers so there's a strange bug somewhere, but at 
least I know where to look.


> 2) The response contains a number of headers which are also displayed
>
>
>
>


-- 
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to 
lead are elected by the least capable of producing, and where the 
members of society least likely to sustain themselves or succeed, are 
rewarded with goods and services paid for by the confiscated wealth of a 
diminishing number of producers.

[toc] | [prev] | [next] | [standalone]


#13259

FromArno Welzel <usenet@arnowelzel.de>
Date2014-03-21 08:33 +0100
Message-ID<532BEB3F.4090300@arnowelzel.de>
In reply to#13251
The Natural Philosopher, 2014-03-20 19:39:

> On 20/03/14 14:53, Arno Welzel wrote:
>> Am 20.03.2014 12:26, schrieb The Natural Philosopher:
>>
>>> On 20/03/14 09:13, Arno Welzel wrote:
>>>> Am 19.03.2014 18:25, schrieb The Natural Philosopher:
>>>>
>>>>> I have TWO IDENTICAL PHP  FILES.
>>>>>
>>>>> They are supposed to display an image got from a database.
>>>>>
>>>>> One does. The other does not.
>>>>>
>>>>> It persistently tells me the image is corrupted.
>>>>>
>>>>> I have even copied one file that works directly over the other. It still
>>>>> doesn't work.
>> [...]
>>> What is happning - and oddly running it against a test version of IE6 in
>>> my XP VM showed it up, was that it was outputting a '404 file not found'
>>> text BEFORE outputting perfectly valid PNG.
>>>
>>> Why this is happening is a bug somewhere else completely.
>>>
>>> IE 6 simply showed the text and the binary gobbledygook which was the
>>> clue I needed.
>>
>> Yes, because IE 6 assumes the user may not understand a server generated
>> error message and shows its own message as long as the reponse is below
>> a certain size limit (AFAIR less than 4000 bytes, but i may not remember
>> correctly). This is even more annoying - sometimes you see the message
>> from IE itself and sometimes
>>
>>> How this has happened will take me some time to understand because the
>>> line that says '404 not found' is followed  - or I thought it was - by
>>> an exit(); statement.
>>>
>>>> Either Firefox once got an invalid image and cached the response or the
>>>> server does not respond the way you think. Maybe a BOM in the PHP file?
>>>> This may not be visible in your editor, but it can cause all sort of
>>>> problems.
>>>>
>>>>
>>> Firefox makes it hard to debug because it DOES cache bad results: I
>>> usually fix that by sending random nonsensical GET parameters which are
>>> ignored to ensure it thinks its a different URL each time.
>>>
>>> It a huge minus against firefox that it didn't - even using the
>>> debugging console - show me what was really going on, whereas IE6 did.
>>
>> You should learn to read HTTP response headers in the developer console
>> of Firefox. When I open <http://arnowelzel.de/wiki/en/tools/rwinfo>
>> there the developer console of Firefox tells me EXACTLY what is going on:
>>
>> 1) The server responded with a status code 404 (not found)
>>
> 
> The problem is that it didn't send an error code in the header
> It sent a valid header, the some error text, and then the PNG

In this case you can't blame Firefox - Firefox behaved correctly. It got
a response but WITHOUT status 404. So it cached the response and
displayed the result. Even though the result was not a valid image -
it's not the fault of Firefox when the server sends garbish and declares
that garbish to be a PNG image without any hint that something went
wrong (HTTP status 4xx or 5xx etc.).

On the other hand it looks like IE6 handled the response from the server
as HTML even though a MIME header was present that clearly states the
content is an image.

Well - in that particular case it may helped to find the problem. But
technically IE6 is broken anyway. I assume IE6 did not see a ".png" etc.
in the URL and since the response contained some text which *may* be
HTML (or text) it decided to treat the content as HTML (or text) and
just ignore the MIME-Type in the header.

And finally - neither Firefox nor IE6 are debugging tools - they are
browsers. But Firefox still offers many helpful tools to find errors,
where IE6 doesn't.


-- 
Arno Welzel
http://arnowelzel.de
http://de-rec-fahrrad.de
http://fahrradzukunft.de

[toc] | [prev] | [next] | [standalone]


#13263

FromNisse Engström <news.NOSPAM.uvex6@luden.se>
Date2014-03-22 07:24 +0100
Message-ID<zz5sd1s9w4zc.1g34r198ej95h$.dlg@40tude.net>
In reply to#13251
On Thu, 20 Mar 2014 18:39:10 +0000, The Natural Philosopher wrote:

> The problem is that it didn't send an error code in the header
> 
> It sent a valid header, the some error text, and then the PNG
> 
> I generate all my own headers so there's a strange bug somewhere, but at 
> least I know where to look.

I don't know if it is relevant, but there's a long standing bug
in Apache where it sends its own HTTP response after the output
of an NPH-scipt. If I recall correctly.


/Nisse

[toc] | [prev] | [next] | [standalone]


#13265

FromThe Natural Philosopher <tnp@invalid.invalid>
Date2014-03-22 12:10 +0000
Message-ID<lgjuio$raq$1@news.albasani.net>
In reply to#13263
On 22/03/14 06:24, Nisse Engström wrote:
> On Thu, 20 Mar 2014 18:39:10 +0000, The Natural Philosopher wrote:
>
>> The problem is that it didn't send an error code in the header
>>
>> It sent a valid header, the some error text, and then the PNG
>>
>> I generate all my own headers so there's a strange bug somewhere, but at
>> least I know where to look.
>
> I don't know if it is relevant, but there's a long standing bug
> in Apache where it sends its own HTTP response after the output
> of an NPH-scipt. If I recall correctly.
>

Mmm.

I took a break from coding after tearing my hair out on this one. So I 
still haven't tracked it down to the bottom. I needed to step back and 
look at the authorisation mechanisms which were getting so complicated 
even I didn't entirely understand them, and write some documentation on 
them and construct some state machine charts so that I could look at 
them and construct the right conditional tests for a 2D matrix of 
authorisation possibilities.

Because the problem had two aspects - firstly it was failing 
authorisation when it shouldn't, and secondly it wasn't behaving 
correctly for refused authorisation.


But I will bear that in mind.

And thanks to all those who prompted things that were in fact the wrong 
answers, because in the end that led me to the right answer.




>
> /Nisse
>


-- 
Ineptocracy

(in-ep-toc’-ra-cy) – a system of government where the least capable to 
lead are elected by the least capable of producing, and where the 
members of society least likely to sustain themselves or succeed, are 
rewarded with goods and services paid for by the confiscated wealth of a 
diminishing number of producers.

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.php


csiph-web