SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    createimage problem with php and Windows installer

    I am trying to get some code to work using imagecreate and the installed windows version of php on my home computer using a localhost but the browser window keeps returning an unidentied function error for imagecreate(), I have altered the .ini file to include the line extension=php_gd.dll, the dll is in the extension folder and when Apache starts up PHP is loaded without any errors, anyone any ideas on this?

    I used the installer version of php not the source code version.

    Thanks
    Mike

  2. #2
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i don't know about the installer/CGI version but it may not have GD support compiled into PHP... you can do this: (i found this at php.net)
    Alright,
    you need not to recompile PHP to have GD support!

    Try:

    dl("extensions/php_gd.dll");

    before calling the graphic functions.

  3. #3
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have not a clue how I would impliment this into my line of code which is:
    $im = imagecreate($width,$height);
    I will take at look at the php.net site you mention.

    Thanks
    Mike

  4. #4
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just insert
    PHP Code:
    dl("extensions/php_gd.dll"); 
    just before calling imagecreate()

  5. #5
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not having much luck on this, this is the error I get in the bowser:
    Fatal error: dl() is not supported in multithreaded Web servers - use extension statements in your php.ini in c:\program files\apache group\apache\htdocs\show_poll.php on line 72

    Thanks anyway
    Mike

  6. #6
    SitePoint Wizard silver trophy redemption's Avatar
    Join Date
    Sep 2001
    Location
    Singapore
    Posts
    5,269
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    check if the GD extension is properly loaded using get_loaded_extensions()[


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •