Fatal error: Call to undefined function: imagecreatefromjpeg()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Randell D.

    Fatal error: Call to undefined function: imagecreatefromjpeg()


    Folks,
    I feel like pulling my hair out - I tried unsuccessfully over the past few
    days to install ImagMagick but because of version conflicts and missing
    libraries I had to give up. I originally choose ImageMagick because I've
    heard so much about it.

    I then decided to go with the inbuilt GD tools since I'm using PHP 4.3.3
    that I compiled with --with-gd. I can use some of the image functions in
    PHP so why is this one undefined? What can I do to resolve it? The message
    follows, in addition, I include an extract from my phpinfo() to show that I
    do have GD Support fully enabled.

    Fatal error: Call to undefined function: imagecreatefrom jpeg()

    An extract from phpinfo(); tells me the following:

    GD Support enabled
    GD Version bundled (2.0.15 compatible)
    GIF Read Support enabled
    PNG Support enabled
    WBMP Support enabled
    XBM Support enabled

    What do I need to do to fix the problem?
    --
    A: Because it messes up the order in which people normally read text.
    Q: Why is top-posting such a bad thing?
    A: Top-posting.
    Q: What is the most annoying thing on usenet?


  • Randell D.

    #2
    Re: Fatal error: Call to undefined function: imagecreatefrom jpeg()


    "Randell D." <you.can.email. me.at.randelld@ yahoo.com> wrote in message
    news:LXo8b.9399 36$ro6.18723578 @news2.calgary. shaw.ca...[color=blue]
    >
    > Folks,
    > I feel like pulling my hair out - I tried unsuccessfully over the past few
    > days to install ImagMagick but because of version conflicts and missing
    > libraries I had to give up. I originally choose ImageMagick because I've
    > heard so much about it.
    >
    > I then decided to go with the inbuilt GD tools since I'm using PHP 4.3.3
    > that I compiled with --with-gd. I can use some of the image functions in
    > PHP so why is this one undefined? What can I do to resolve it? The[/color]
    message[color=blue]
    > follows, in addition, I include an extract from my phpinfo() to show that[/color]
    I[color=blue]
    > do have GD Support fully enabled.
    >
    > Fatal error: Call to undefined function: imagecreatefrom jpeg()
    >
    > An extract from phpinfo(); tells me the following:
    >
    > GD Support enabled
    > GD Version bundled (2.0.15 compatible)
    > GIF Read Support enabled
    > PNG Support enabled
    > WBMP Support enabled
    > XBM Support enabled
    >
    > What do I need to do to fix the problem?
    > --[/color]

    Interestingly enough - I found imagecreatefrom gif() works thus I'm wondering
    if there is a dependancy on an external jpeg library that I do not have
    installed.

    Can anyone help with a solution?


    Comment

    • Andy Hassall

      #3
      Re: Fatal error: Call to undefined function: imagecreatefrom jpeg()

      On Fri, 12 Sep 2003 19:15:55 GMT, "Randell D."
      <you.can.email. me.at.randelld@ yahoo.com> wrote:
      [color=blue]
      >Folks,
      >I feel like pulling my hair out - I tried unsuccessfully over the past few
      >days to install ImagMagick but because of version conflicts and missing
      >libraries I had to give up. I originally choose ImageMagick because I've
      >heard so much about it.
      >
      >I then decided to go with the inbuilt GD tools since I'm using PHP 4.3.3
      >that I compiled with --with-gd. I can use some of the image functions in
      >PHP so why is this one undefined? What can I do to resolve it? The message
      >follows, in addition, I include an extract from my phpinfo() to show that I
      >do have GD Support fully enabled.
      >
      >Fatal error: Call to undefined function: imagecreatefrom jpeg()
      >
      >An extract from phpinfo(); tells me the following:
      >
      >GD Support enabled
      >GD Version bundled (2.0.15 compatible)
      >GIF Read Support enabled
      >PNG Support enabled
      >WBMP Support enabled
      >XBM Support enabled
      >
      >What do I need to do to fix the problem?[/color]

      --with-jpeg=<path to jpeg libs> may be worth a try, although my version of PHP
      wasn't compiled with that and still has jpeg support; configure may have found
      the libs by itself though, since they're in /usr/lib.

      --
      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

      • Randell D.

        #4
        Re: Fatal error: Call to undefined function: imagecreatefrom jpeg()


        "Andy Hassall" <andy@andyh.co. uk> wrote in message
        news:e6d4mvcpe8 ubhqesg9441ipd1 5qg0qcc6h@4ax.c om...[color=blue]
        > On Fri, 12 Sep 2003 19:15:55 GMT, "Randell D."
        > <you.can.email. me.at.randelld@ yahoo.com> wrote:
        >[color=green]
        > >Folks,
        > >I feel like pulling my hair out - I tried unsuccessfully over the past[/color][/color]
        few[color=blue][color=green]
        > >days to install ImagMagick but because of version conflicts and missing
        > >libraries I had to give up. I originally choose ImageMagick because I've
        > >heard so much about it.
        > >
        > >I then decided to go with the inbuilt GD tools since I'm using PHP 4.3.3
        > >that I compiled with --with-gd. I can use some of the image functions in
        > >PHP so why is this one undefined? What can I do to resolve it? The[/color][/color]
        message[color=blue][color=green]
        > >follows, in addition, I include an extract from my phpinfo() to show that[/color][/color]
        I[color=blue][color=green]
        > >do have GD Support fully enabled.
        > >
        > >Fatal error: Call to undefined function: imagecreatefrom jpeg()
        > >
        > >An extract from phpinfo(); tells me the following:
        > >
        > >GD Support enabled
        > >GD Version bundled (2.0.15 compatible)
        > >GIF Read Support enabled
        > >PNG Support enabled
        > >WBMP Support enabled
        > >XBM Support enabled
        > >
        > >What do I need to do to fix the problem?[/color]
        >
        > --with-jpeg=<path to jpeg libs> may be worth a try, although my version of[/color]
        PHP[color=blue]
        > wasn't compiled with that and still has jpeg support; configure may have[/color]
        found[color=blue]
        > the libs by itself though, since they're in /usr/lib.
        >
        > --
        > Andy Hassall (andy@andyh.co. uk) icq(5747695) (http://www.andyh.co.uk)
        > Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)[/color]

        I've got it recompiling as I write this so I'll post again in an hour or so
        and let you know if that was the root of the problem - thought I'd just
        drop a byte though and say thanks for the suggestion since its the second
        time this week that you've answered one of my posts...


        Comment

        • Randell D.

          #5
          Re: Fatal error: Call to undefined function: imagecreatefrom jpeg()


          "Randell D." <you.can.email. me.at.randelld@ yahoo.com> wrote in message
          news:LXo8b.9399 36$ro6.18723578 @news2.calgary. shaw.ca...[color=blue]
          >
          > Folks,
          > I feel like pulling my hair out - I tried unsuccessfully over the past few
          > days to install ImagMagick but because of version conflicts and missing
          > libraries I had to give up. I originally choose ImageMagick because I've
          > heard so much about it.
          >
          > I then decided to go with the inbuilt GD tools since I'm using PHP 4.3.3
          > that I compiled with --with-gd. I can use some of the image functions in
          > PHP so why is this one undefined? What can I do to resolve it? The[/color]
          message[color=blue]
          > follows, in addition, I include an extract from my phpinfo() to show that[/color]
          I[color=blue]
          > do have GD Support fully enabled.
          >
          > Fatal error: Call to undefined function: imagecreatefrom jpeg()
          >
          > An extract from phpinfo(); tells me the following:
          >
          > GD Support enabled
          > GD Version bundled (2.0.15 compatible)
          > GIF Read Support enabled
          > PNG Support enabled
          > WBMP Support enabled
          > XBM Support enabled
          >
          > What do I need to do to fix the problem?
          > --
          > A: Because it messes up the order in which people normally read text.
          > Q: Why is top-posting such a bad thing?
          > A: Top-posting.
          > Q: What is the most annoying thing on usenet?
          >
          >[/color]

          I've called the gd_info() function and notice that jpeg support isn't
          recognised

          # 10 Elements strlen
          GD Version bundled (2.0.15 compatible) 27
          FreeType Support 0
          T1Lib Support 0
          GIF Read Support 1 1
          GIF Create Support 0
          JPG Support 0
          PNG Support 1 1
          WBMP Support 1 1
          XBM Support 1 1
          JIS-mapped Japanese Font Support 0

          I *do* have jpeg-6b compiled though and was unsure as to why it hadn't
          picked it up.

          After three or four different compiles, I changed the order of the
          ../configure arguements (which probably didn't do anything) however I had
          previously --with-jpeg-dir=/usr/lib I've modifed it to have --with-jpeg-dir
          without a directory specified and I think that sorted it.

          The following are my compile options for those who might suffer the same
          problem (note though that my apache has been compiled with a number of extra
          modules that you may (not?) need like mysql, suexec, perl...

          # cd apache/
          # make clean

          # cd ../php/
          # make clean

          # cd ../apache/
          #
          ../configure --prefix=/opt/apache --enable-module=unique_i d --enable-module=s
          o --enable-suexec --with-perl=/usr/bin/perl --suexec-caller=www --suexec-log
          file=/var/log/suexec.log --suexec-uidmin=1025 --suexec-gidmin=1025 --disable
          -module=imap --disable-module=asis --disable-module=userdir --disable-module
          =autoindex --disable-module=status --enable-module=vhost_al ias --activate-mo
          dule=src/modules/php4/libphp4.a --activate-module=src/modules/extra/mod_geoi
          p.c

          # cd ../php/
          #
          ../configure --with-mysql --with-apache=$src/apache --with-mcrypt --with-jpeg
          -dir --enable-exif --with-zlib-dir --with-gd --disable-cgi
          # make
          # make install

          # cd ../apache/
          #
          ../configure --prefix=/opt/apache --enable-module=unique_i d --enable-module=s
          o --enable-suexec --with-perl=/usr/bin/perl --suexec-caller=www --suexec-log
          file=/var/log/suexec.log --suexec-uidmin=1025 --suexec-gidmin=1025 --disable
          -module=imap --disable-module=asis --disable-module=userdir --disable-module
          =autoindex --disable-module=status --enable-module=vhost_al ias --activate-mo
          dule=src/modules/php4/libphp4.a --activate-module=src/modules/extra/mod_geoi
          p.c
          # make
          # make install


          Comment

          • Daniel Hansen

            #6
            Re: Fatal error: Call to undefined function: imagecreatefrom jpeg()

            On Fri, 12 Sep 2003 22:22:34 GMT, "Randell D."
            <you.can.email. me.at.randelld@ yahoo.com>, wrote:

            [color=blue][color=green]
            >> ....[/color][/color]

            This is what finally worked for me. Not sure whether it was the "make
            clean" or adding exif support -- but it worked!

            make clean
            ../configure --with-mysql --with-apxs2 --with-xpm-dir --with-png
            --with-png-dir --with-jpeg-dir --enable-exif --with-zlib-dir --with-gd[color=blue]
            > configure.2003. 09.12.dh5.log[/color]
            make
            make install
            libtool --finish /etc/rpms/php-4.3.1/libs
            apachectl -k stop
            service httpd start


            ------------------------------------------------
            Dan Hansen
            ------------------------------------------------

            Comment

            Working...