HighDots Forums  

IE not showing PHP-generated images, but Firefox does.

alt.html alt.html


Discuss IE not showing PHP-generated images, but Firefox does. in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ur.solame@yahoo.com
 
Posts: n/a

Default IE not showing PHP-generated images, but Firefox does. - 03-21-2008 , 08:10 AM







I have an image being generated by a PHP script--
I didn't write the code-- and the image itself is in a
database.

I've discovered that there is a big discrepancy
between how the images appear in IE7 and FF2,
e.g. for <IMG SRC="image.php?param=foo">.

Namely, they appear just fine in Firefox but
in IE nothing appears at all.

Can anyone tell me know how to make this work
and whether this is a browser issue, a PHP issue,
or what?


Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: IE not showing PHP-generated images, but Firefox does. - 03-21-2008 , 08:46 AM






Scripsit ur.solame (AT) yahoo (DOT) com:

Quote:
I've discovered that there is a big discrepancy
between how the images appear in IE7 and FF2,
e.g. for <IMG SRC="image.php?param=foo">.
You could start from using valid markup.

After validating, post the URL.

Quote:
Namely, they appear just fine in Firefox but
in IE nothing appears at all.
There's something wrong in your markup or in your image data.

To get more specific help, give us more specific data.

Quote:
Can anyone tell me know how to make this work
and whether this is a browser issue, a PHP issue,
or what?
A browser does not know whether the data comes from a PHP script or from
a "static" file or from a monkey that responds to HTTP requests.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #3  
Old   
GuangXiN
 
Posts: n/a

Default Re: IE not showing PHP-generated images, but Firefox does. - 03-21-2008 , 09:05 AM



Maybe you should set Content-type in header.



Reply With Quote
  #4  
Old   
Andy Dingley
 
Posts: n/a

Default Re: IE not showing PHP-generated images, but Firefox does. - 03-21-2008 , 01:00 PM



On 21 Mar, 12:10, ur.sol... (AT) yahoo (DOT) com wrote:
Quote:
I have an image being generated by a PHP script--

I've discovered that there is a big discrepancy
between how the images appear in IE7 and FF2,
e.g. for <IMG SRC="image.php?param=foo">.
Post a URL


Reply With Quote
  #5  
Old   
Adrienne Boswell
 
Posts: n/a

Default Re: IE not showing PHP-generated images, but Firefox does. - 03-21-2008 , 01:42 PM



Gazing into my crystal ball I observed ur.solame (AT) yahoo (DOT) com writing in
news:7997f6d2-623f-47fd-a4ef-b7ea46249541 (AT) m36g2000hse (DOT) googlegroups.com:

Quote:
I have an image being generated by a PHP script--
I didn't write the code-- and the image itself is in a
database.

I've discovered that there is a big discrepancy
between how the images appear in IE7 and FF2,
e.g. for <IMG SRC="image.php?param=foo">.

Namely, they appear just fine in Firefox but
in IE nothing appears at all.

Can anyone tell me know how to make this work
and whether this is a browser issue, a PHP issue,
or what?


I have seen that happen in IE when there is no height or width
attribute.

--
Adrienne Boswell at Home
Arbpen Web Site Design Services
http://www.cavalcade-of-coding.info
Please respond to the group so others can share



Reply With Quote
  #6  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: IE not showing PHP-generated images, but Firefox does. - 03-21-2008 , 01:55 PM



Neredbojias wrote:
Quote:
On 21 Mar 2008, ur.solame (AT) yahoo (DOT) com wrote:

I have an image being generated by a PHP script--
I didn't write the code-- and the image itself is in a
database.

I've discovered that there is a big discrepancy
between how the images appear in IE7 and FF2,
e.g. for <IMG SRC="image.php?param=foo">.

Namely, they appear just fine in Firefox but
in IE nothing appears at all.

Can anyone tell me know how to make this work
and whether this is a browser issue, a PHP issue,
or what?


In certain php image manipulations, different code is required for ie than
is for other browsers.

I've never seen that. How so?

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================



Reply With Quote
  #7  
Old   
Michael Fesser
 
Posts: n/a

Default Re: IE not showing PHP-generated images, but Firefox does. - 03-21-2008 , 04:53 PM



..oO(Neredbojias)

Quote:
In certain php image manipulations, different code is required for ie than
is for other browsers.
Huh? An image is an image. It doesn't matter where it comes from.

Micha


Reply With Quote
  #8  
Old   
Michael Fesser
 
Posts: n/a

Default Re: IE not showing PHP-generated images, but Firefox does. - 03-21-2008 , 07:35 PM



..oO(Neredbojias)

Quote:
Anyway, _I_ don't know where in that labyrinth of a php manual you'll
find this (-if anywhere), but I'm tired of wasting my own time. This
line from the code of one of my old pages:

if (!($_FILES['filup']['type'] == "image/jpeg" ||
$_FILES['filup']['type'] == "image/pjpeg")) {

...rather explains it.
Not really, it's broken code. You determine the real type of an uploaded
image with getimagesize(). The Content-Type header sent by the browser
is more or less just decoration and should be seen as that. It can be
faked or not available at all, so you can't rely on it.

Quote:
An image of an unknown type is uploaded. Determining the type produces
different matches on different platforms; "image/pjpeg" on Windows and
"image/jpeg" on non-Windows.
IIRC "image/pjpeg" is sent by IE, but it doesn't matter, since you can
and should ignore it.

And BTW: The thread was about _downloading_ images, not uploading.

Micha


Reply With Quote
  #9  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: IE not showing PHP-generated images, but Firefox does. - 03-21-2008 , 09:57 PM



Neredbojias wrote:
Quote:
On 21 Mar 2008, Jerry Stuckle <jstucklex (AT) attglobal (DOT) net> wrote:

I've discovered that there is a big discrepancy
between how the images appear in IE7 and FF2,
e.g. for <IMG SRC="image.php?param=foo">.

Namely, they appear just fine in Firefox but
in IE nothing appears at all.

Can anyone tell me know how to make this work
and whether this is a browser issue, a PHP issue,
or what?

In certain php image manipulations, different code is required for ie
than is for other browsers.

I've never seen that. How so?

Har har, you know not what you ask...

No, I know EXACTLY what I ask. You have no idea what you're saying.

Quote:
Anyway, _I_ don't know where in that labyrinth of a php manual you'll
find this (-if anywhere), but I'm tired of wasting my own time. This
line from the code of one of my old pages:

if (!($_FILES['filup']['type'] == "image/jpeg" ||
$_FILES['filup']['type'] == "image/pjpeg")) {

...rather explains it.

An image of an unknown type is uploaded. Determining the type produces
different matches on different platforms; "image/pjpeg" on Windows and
"image/jpeg" on non-Windows. This particular code-bit came from a page
receiving images posted by form. Whether it matters elsewhere and
otherwise, who knows. Have a nice day.

Nope, it explains your code is broken. NEVER rely on the type of image
indicated by the upload. Check it yourself. You will get the same type
on ALL platforms.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================



Reply With Quote
  #10  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: IE not showing PHP-generated images, but Firefox does. - 03-21-2008 , 09:57 PM



Neredbojias wrote:
Quote:
On 21 Mar 2008, Michael Fesser <netizen (AT) gmx (DOT) de> wrote:

.oO(Neredbojias)

In certain php image manipulations, different code is required for ie
than is for other browsers.
Huh? An image is an image. It doesn't matter where it comes from.

Please see my erudite reply to J. Stuckle for additional convolutions...
g

And the fact your code is broken...

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.