GD thinks it's installed, but won't work

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

    GD thinks it's installed, but won't work

    I'm running PHP5 on a WinXP box using Apache2. I am having an unusual
    problem and can't find a solution online at all.

    I believe I have enabled the GD module properly. I modified the php.ini
    and restarted apache (and later restarted my computer) to enable the
    php_gd2.dll. When I run phpinfo() and gd_info() I get valid output:

    Array
    (
    [GD Version] =bundled (2.0.28 compatible)
    [FreeType Support] =1
    [FreeType Linkage] =with freetype
    [T1Lib Support] =1
    [GIF Read Support] =1
    [GIF Create Support] =1
    [JPG Support] =1
    [PNG Support] =1
    [WBMP Support] =1
    [XPM Support] =>
    [XBM Support] =1
    [JIS-mapped Japanese Font Support] =>
    )

    The problem, though, is that no gd functions work. I keep getting
    "Fatal error: Call to undefined function imagecreate()" or any other
    image___() functions. I've tried reinstalling php, restarting the
    computer and apache, disabling and reenabling the dll, all with no
    success. Does anyone have any idea why this GD installation is partial
    and how I can get around it?

    Thanks in advance,

    Bob

  • Alvaro G. Vicario

    #2
    Re: GD thinks it's installed, but won't work

    *** Bob Baddeley escribió/wrote (11 Aug 2006 12:05:37 -0700):
    I believe I have enabled the GD module properly. I modified the php.ini
    and restarted apache (and later restarted my computer) to enable the
    php_gd2.dll. When I run phpinfo() and gd_info() I get valid output:
    [...]
    The problem, though, is that no gd functions work. I keep getting
    "Fatal error: Call to undefined function imagecreate()" or any other
    image___() functions.
    Weird indeed... Just to discard Apache, do you have the same problem when
    running the script from command line?


    --
    -+ http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
    ++ Mi sitio sobre programación web: http://bits.demogracia.com
    +- Mi web de humor con rayos UVA: http://www.demogracia.com
    --

    Comment

    • Bob Baddeley

      #3
      Re: GD thinks it's installed, but won't work

      >Alvaro G. Vicario wrote:
      >Weird indeed... Just to discard Apache, do you have the same problem when
      >running the script from command line?
      Good thought. I just tried it, and got the same result. Call to
      undefined function imagecreate.

      Comment

      • Bob Baddeley

        #4
        Re: GD thinks it's installed, but won't work

        I have functional code now. I'm not sure what the problem was exactly.
        I tried replacing the sample code I had found with slightly different
        sample code, and it worked. I pored over the original code many many
        times and never saw any mistakes with the imagecreate function, so I
        don't know what the deal is. But it works now.

        Comment

        Working...