GD and IE7 issue...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Keith Miller

    #1

    GD and IE7 issue...

    Hello, I currently have a script that creates a image and then another
    small script for displaying the image to the user.

    This is what I use to display the image:

    <img src="created_im age.php?image=' .$image_name.'" />

    And this is created_image.p hp:

    <?php
    /* Created on Sep 3, 2008 - KM
    * all this file does is display the gd created image
    */

    if(empty($_GET) || !array_key_exis ts('image', $_GET)) {
    exit();
    }

    $tmp_dir = "/tmp/";
    header("Content-type: image/jpg");
    $image = $_GET['image'];
    //check for file first, just in case
    $file = $tmp_dir.$image ;
    if(file_exists( $file)) {
    readfile($file) ;
    unlink($file);
    exit();
    } else {
    die("ERROR: Image file $file not found!");
    }
    ?>

    Now, the image is displayed correctly, no problems. The issue is that
    users are unable to right click and save as with the image because IE7
    says "The system cannot find the file specified." I thought maybe it
    was the unlink, but even removing that doesn't make a difference. Any
    ideas? Thanks.
  • R. Rajesh Jeba Anbiah

    #2
    Re: GD and IE7 issue...

    On Oct 14, 4:20 am, Keith Miller <kee...@gmail.c omwrote:
    <snip>
    header("Content-type: image/jpg");
    <snip>
    Now, the image is displayed correctly, no problems. The issue is that
    users are unable to right click and save as with the image because IE7
    says "The system cannot find the file specified." I thought maybe it
    was the unlink, but even removing that doesn't make a difference. Any
    ideas? Thanks.
    Try setting the cache headers too.

    --
    <?php echo 'Just another PHP saint'; ?>
    Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

    Comment

    • Keith Miller

      #3
      Re: GD and IE7 issue...

      Oddly enough turning off caching worked. I guess IE7 was not saving
      the local copy correctly. Now the issue is that it wants to save it as
      a bmp instead of a jpeg. Weird.


      On Oct 13, 7:20 pm, "R. Rajesh Jeba Anbiah"
      <ng4rrjanb...@r ediffmail.comwr ote:
      On Oct 14, 4:20 am, Keith Miller <kee...@gmail.c omwrote:
         <snip>
      >
      header("Content-type: image/jpg");
         <snip>
      Now, the image is displayed correctly, no problems. The issue is that
      users are unable to right click and save as with the image because IE7
      says "The system cannot find the file specified." I thought maybe it
      was the unlink, but even removing that doesn't make a difference. Any
      ideas? Thanks.
      >
          Try setting the cache headers too.
      >
      --
        <?php echo 'Just another PHP saint'; ?>
      Email: rrjanbiah-at-Y!com    Blog:http://rajeshanbiah.blogspot.com/

      Comment

      • =?ISO-8859-1?Q?=22=C1lvaro_G=2E_Vicario=22?=

        #4
        Re: GD and IE7 issue...

        Keith Miller escribió:
        Oddly enough turning off caching worked. I guess IE7 was not saving
        the local copy correctly. Now the issue is that it wants to save it as
        a bmp instead of a jpeg. Weird.
        That's a known bug of IE 6. You must remove manually the temporary
        Internet files.

        So that bug also remains in version 7? Why aren't I surprised?



        --
        -- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
        -- Mi sitio sobre programación web: http://bits.demogracia.com
        -- Mi web de humor al baño María: http://www.demogracia.com
        --

        Comment

        Working...