Re: undefined function imagecreate()

From: Jed R. Brubaker (jed.brubaker_at_psych.utah.edu)
Date: 10/03/03


To: php-general@lists.php.net
Date: Fri, 3 Oct 2003 00:31:03 -0600

You know, I am not sure if this will help, but I have a problem very similar
to this in my debugger.
When I run a script check through my WIN32 PHP module, I get errors related
to imagecreate() functions. In a current project I use imagecreatefromjpeg()
functions and get the same problems.

Fortunately for me, once my scripts have gone up to the server they have
worked fine. You might have the same luck!

One other thing - you might want to check the image capabilities of your
PHP's build. One server I worked on did not have the capabilities to work
with GIFs or PNGs, so I had to do things with imagecreatefromjpeg() (as I
mentioned above).

Good luck!
Jed

"Marco Moonen" <marco_moonen@hotmail.com> wrote in message
news:20030807153200.85651.qmail@pb1.pair.com...
> Just new at PHP and learning.
> Trying to execute simple script to draw a line:
> <?php
> //draw2.php
> Header("Content-type: image/jpeg");
> $image = ImageCreate(200,150);
> $gray = ImageColorAllocate($image,204,204,204);
> $blue = ImageColorAllocate($image,0,0,255);
> ImageLine($image,10,10,150,30,$blue);
> ImageArc($image,150,65,70,70,0,360,$blue);
> ImageJPEG($image);
> ImageDestroy($image);
> ?>
>
> Browser returns:
> <br />
> <b>Fatal error</b>: Call to undefined function: imagecreate() in
> <b>c:\inetpub\wwwroot\draw4.php</b> on line <b>4</b><br />
> Why is imagcreate() not understoodMarco
>
>



Relevant Pages

  • Re: imagecreatetruecolor sometimes causes forced-download of index.php for some JPEG images
    ... only with certain JPEG images. ... script is far below memory_limit, however, it still "dies". ... If imagecreatefromjpeg() is exhausting the memory you're not going to be able ... What _is_ output by the script when it fails? ...
    (comp.lang.php)
  • Re: Search & replace, but increment with every replace
    ... I gave it a whirl though and have not had any luck yet. ... I simplified my script to contain just this line now: ... Field one of the file is strictly integers however, ... This will save some folks many hours of work and they will be ...
    (comp.unix.shell)
  • Re: Registry search and replace
    ... Good luck on that one. ... Perhaps this script is capable of making changes to registry values somewhat along the lines of what you are trying to do. ... But just to adapt this code to do that would be a significant task. ...
    (microsoft.public.scripting.vbscript)
  • Re: function function question from a newbie
    ... I'm trying to script a web survey and I'm not having any luck. ... form elements with IDs that contain non-valid identifier characters. ... Strings are strings when quoted, ...
    (comp.lang.javascript)
  • Re: Set javascript value OnCheckedChanged
    ... tried that but no luck. ... It stops the script from working for ... all controls on the page!? ...
    (microsoft.public.dotnet.framework.aspnet)