problem opening dynamic images from mysql with gd

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Johannes Götzinger

    #1

    problem opening dynamic images from mysql with gd

    hello everyone,

    I use a script to save .jpg-images in a mysql database. Another small
    script outputs the database-stored-image to the browser
    (getdbfile?id=1 ). All works fine.

    Now I want to resize these images from the database using the GD
    libraries. But I always get an error while opening the
    'dynamic'-database-image:

    getimagesize(ge tdbfile.php?id= 1): failed to open stream: No such file
    or directory in C:\apache\htdoc s\cur\files\thu mb.php on line 33

    (I'm running Apache 1.3.14 and PHP 4.3.2).

    Does anybody know how to solve my problem? - Thanks.
  • Andy Hassall

    #2
    Re: problem opening dynamic images from mysql with gd

    On 21 Dec 2003 05:42:22 -0800, johannes@pageho st.de (Johannes Götzinger) wrote:
    [color=blue]
    >I use a script to save .jpg-images in a mysql database. Another small
    >script outputs the database-stored-image to the browser
    >(getdbfile?id= 1). All works fine.
    >
    >Now I want to resize these images from the database using the GD
    >libraries. But I always get an error while opening the
    >'dynamic'-database-image:
    >
    >getimagesize(g etdbfile.php?id =1): failed to open stream: No such file
    >or directory in C:\apache\htdoc s\cur\files\thu mb.php on line 33[/color]

    You seem to be trying to use a URL for getimagesize; not going to work, it
    doesn't accept URLs, just filesystem files.

    You're probably going to have to write the image to a temporary file.

    See http://uk2.php.net/getimagesize , the user notes at the bottom for
    getimagesize_re mote().

    --
    Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
    Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)

    Comment

    Working...