GD Problem - Call to undefined function imagejpeg()

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

    #1

    GD Problem - Call to undefined function imagejpeg()

    I tried to create some images with php and gd and get always

    Call to undefined function imagejpeg()
    or
    Call to undefined function imagepng()

    PHP was build with --with-gd --with-zlib but I assume I will need more?

    phpinfo() says:
    gd
    GD Support enabled
    GD Version bundled (2.0.23 compatible)
    GIF Read Support enabled
    PNG Support enabled
    WBMP Support enabled
    XBM Support enabled

    Thanks, Jan
  • Aidan

    #2
    Re: GD Problem - Call to undefined function imagejpeg()

    You'll need to compile in the jpeg/png library before you'll be able to
    do anything with them... here's a link to the source:



    For any kind of file you want to work with, you'll most likely need a
    library... here's the PNG one too:



    HTH

    xcomm wrote:
    [color=blue]
    >I tried to create some images with php and gd and get always
    >
    >Call to undefined function imagejpeg()
    >or
    >Call to undefined function imagepng()
    >
    >PHP was build with --with-gd --with-zlib but I assume I will need more?
    >
    >phpinfo() says:
    >gd
    >GD Support enabled
    >GD Version bundled (2.0.23 compatible)
    >GIF Read Support enabled
    >PNG Support enabled
    >WBMP Support enabled
    >XBM Support enabled
    >
    >Thanks, Jan
    >
    >[/color]

    Comment

    • Aidan

      #3
      Re: GD Problem - Call to undefined function imagejpeg()

      try running `./configure --help` in the GD srouce dir to see what
      configure options you have...

      xcomm wrote:
      [color=blue]
      >I tried to create some images with php and gd and get always
      >
      >Call to undefined function imagejpeg()
      >or
      >Call to undefined function imagepng()
      >
      >PHP was build with --with-gd --with-zlib but I assume I will need more?
      >
      >phpinfo() says:
      >gd
      >GD Support enabled
      >GD Version bundled (2.0.23 compatible)
      >GIF Read Support enabled
      >PNG Support enabled
      >WBMP Support enabled
      >XBM Support enabled
      >
      >Thanks, Jan
      >
      >[/color]

      Comment

      • xcomm

        #4
        Re: GD Problem - Call to undefined function imagejpeg()

        Hi Aidan,

        Thanks for helping me with this. I tried it under phpsource/ext/gd but
        had no configure there. I did download gd with the php snap not extra.

        Playing a little arround I used imagecreatetruc olor() instead of
        imagecreate() and it works smooth this way.

        Thanks, Jan



        Aidan <nospam.aidan@l inknet.com.au> wrote in message news:<newscache $x5qz0i$mg4$1@t itan.linknet.co m.au>...[color=blue]
        > try running `./configure --help` in the GD srouce dir to see what
        > configure options you have...
        >
        > xcomm wrote:
        >[color=green]
        > >I tried to create some images with php and gd and get always
        > >
        > >Call to undefined function imagejpeg()
        > >or
        > >Call to undefined function imagepng()
        > >
        > >PHP was build with --with-gd --with-zlib but I assume I will need more?
        > >
        > >phpinfo() says:
        > >gd
        > >GD Support enabled
        > >GD Version bundled (2.0.23 compatible)
        > >GIF Read Support enabled
        > >PNG Support enabled
        > >WBMP Support enabled
        > >XBM Support enabled
        > >
        > >Thanks, Jan
        > >
        > >[/color][/color]

        Comment

        • Aidan

          #5
          Re: GD Problem - Call to undefined function imagejpeg()

          Acctually, what I meant was to run `./configure --help` in the gdlib
          directory...

          See, first you need to compile the GD library with JPG support, then you
          compile PHP and link it to the GDlib you've created, thus PHP will make use
          of the GD library with jpg support.

          HTH

          "xcomm" <google@xcommun ycationz.com> wrote in message
          news:7d4e0bd8.0 407171344.4a523 f26@posting.goo gle.com...[color=blue]
          > Hi Aidan,
          >
          > Thanks for helping me with this. I tried it under phpsource/ext/gd but
          > had no configure there. I did download gd with the php snap not extra.
          >
          > Playing a little arround I used imagecreatetruc olor() instead of
          > imagecreate() and it works smooth this way.
          >
          > Thanks, Jan
          >
          >
          >
          > Aidan <nospam.aidan@l inknet.com.au> wrote in message[/color]
          news:<newscache $x5qz0i$mg4$1@t itan.linknet.co m.au>...[color=blue][color=green]
          > > try running `./configure --help` in the GD srouce dir to see what
          > > configure options you have...
          > >
          > > xcomm wrote:
          > >[color=darkred]
          > > >I tried to create some images with php and gd and get always
          > > >
          > > >Call to undefined function imagejpeg()
          > > >or
          > > >Call to undefined function imagepng()
          > > >
          > > >PHP was build with --with-gd --with-zlib but I assume I will need[/color][/color][/color]
          more?[color=blue][color=green][color=darkred]
          > > >
          > > >phpinfo() says:
          > > >gd
          > > >GD Support enabled
          > > >GD Version bundled (2.0.23 compatible)
          > > >GIF Read Support enabled
          > > >PNG Support enabled
          > > >WBMP Support enabled
          > > >XBM Support enabled
          > > >
          > > >Thanks, Jan
          > > >
          > > >[/color][/color][/color]


          Comment

          Working...