Closed
Bug 240244
Opened 22 years ago
Closed 22 years ago
Mozilla fails with an error, IE6 renders fine. [php?]
Categories
(SeaMonkey :: General, defect)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: coffeeaddict, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113
The script at: http://www.wearthearmor.tzo.com/image_resize/demo01.php that
generates the problem is using the GD image functions that come with PHP 4.3.3 .
When the page is requested in Moz 1.6, I receive the error: The image
"http://www.wearthearmor.tzo.com/image_resize/demo01.php" cannot be displayed,
because it contains errors. IE6 displays the results porperly, though I suspect
it is not honoring mime-types honestly. Demo01.php uses the GD library to output
resized images of a base image directly to the browser. When images are first
stored on the HDD there is no problem. The reason I bring this up is the fact
that the GD library is used quite a bit on the net, and it would seem prudent to
support such a widely used function set. You can see the full script at :
http://www.wearthearmor.tzo.com/image_resize/
Reproducible: Always
Steps to Reproduce:
1.simply load the page "demo01.php"
2.
3.
Actual Results:
The image "http://www.wearthearmor.tzo.com/image_resize/demo01.php" cannot be
displayed, because it contains errors.
Expected Results:
simply load the page in IE to see the expected output.
verified on Moz 1.7b on WinXP Pro.
I have no idea which Component though ...
Summary: Mozilla fails with an error, IE6 renders fine. → Mozilla fails with an error, IE6 renders fine. [php?]
Comment 2•22 years ago
|
||
confirming on Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040410
seems to be invalid html, as it is no html.
After seeing the error message, I looked at the HTTP headers, and the source.
Headers are ok, source is missing <html><head><body> tags.
LiveHTTPheaders gives:
http://www.wearthearmor.tzo.com/image_resize/demo01.php
GET /image_resize/demo01.php HTTP/1.1
Host: www.wearthearmor.tzo.com
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040410
Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,fr-fr;q=0.8,de-de;q=0.5,es;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://bugzilla.mozilla.org/show_bug.cgi?id=240244
Cache-Control: max-age=0
HTTP/1.x 200 OK
Date: Sun, 11 Apr 2004 18:45:54 GMT
Server: Apache
Transfer-Encoding: chunked
Content-Type: image/jpeg
view-source:http://www.wearthearmor.tzo.com/image_resize/demo01.php gives:
<b>Warning: your image files will exist on the server for 5 min. Then they will
be removed.
<br>I must do this to prevent server overflow.</b><hr>
Original image:<br><img src='img/picture.jpg' ><br>Width=167
Height=400<br>Stored as: img/picture.jpg<br><hr>Resized with resize(120, 120,
'-') <br><img src='img/1081709154minus_00.jpg' ><br>New width=50 New
height=120<br>Stored as: img/1081709154minus_00.jpg<hr>Resized with resize(120,
'*', '-') <br><img src='img/1081709156minus_01.jpg' ><br>New width=120 New
height=287<br>Stored as: img/1081709156minus_01.jpg<hr>Resized with resize('*',
120, '-') <br><img src='img/1081709156minus_02.jpg' ><br>New width=50 New
height=120<br>Stored as: img/1081709156minus_02.jpg<hr>Resized with resize(120,
120, '+') <br><img src='img/1081709157plus_00.jpg' ><br>New width=120 New
height=287<br>Stored as: img/1081709157plus_00.jpg<hr>Resized with resize(120,
120, '0') <br><img src='img/1081709158null_00.jpg' ><br>New width=120 New
height=120<br>Stored as: img/1081709158null_00.jpg<hr>Resized with resize(120,
'*', '0') <br><img src='img/1081709159null_01.jpg' ><br>New width=120 New
height=400<br>Stored as: img/1081709159null_01.jpg<hr>Resized with resize('*',
120, '0') <br><img src='img/1081709159null_02.jpg' ><br>New width=167 New
height=120<br>Stored as: img/1081709159null_02.jpg
Comment 3•22 years ago
|
||
I combined the image links from the source with the base URL and succeded to get
images. As the source told the images will be deleted after 5 minutes, I suppose
only the first link will work next time, the number in the second link will be
invalid after 5 minutes.
http://www.wearthearmor.tzo.com/image_resize/img/picture.jpg
http://www.wearthearmor.tzo.com/image_resize/img/1081709154minus_00.jpg
| Reporter | ||
Comment 4•22 years ago
|
||
I added html, head, /head, body, /body, and /html and still no go. I think the
problem is with the mime-type, myself, but there is no easy way of fixing this,
as the mime-type is not specified in the script, but rather set by GD (this is
deductive, since the mime-type is not specified anywhere in the code.) As an
added note, I run php scripts successfully off this server.
| Reporter | ||
Comment 5•22 years ago
|
||
I have resolved the problem. I thought that the GD function was defining the
header. It was in fact the script. I changed the image header to text/html (!)
and it outputted fine. Sorry to waste your time. It still seems strange that IE6
rendered it well. My guess is that IE6 does not respect the header, but does an
analysis of the content to determine if the headers are proper. You can find the
script at http://www.horobey.com/demos/imgresize/v5/article/index.html , and you
will notice that the reason it worked there is because PHP was not allowing the
script to modify the headers, since they had already been sent. I am running
Apache 2.0.4x w/PHP 4.3.3 on XP Pro, and it seems to allow the header to be
defined dynamically.
Sorry to waste your time. I have been working on this problem for over a day and
had gone through the script repeatedly, and missed the offending bits. I had
done everything from examine the server to comb through the script. Again, I am
sorry. I try not to waste your valuable time, and I had honestly thought I had
narrowed it down to Moz. I apologise.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 6•22 years ago
|
||
"Fixed" is for when the browser is patched to resolve a bug.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•22 years ago
|
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → INVALID
Updated•21 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•