Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    May 2005
    Location
    Utah
    Posts
    64
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Angry Loaded PHP, can't get gd library to work

    I spent way to long, but I finally got PHP v5.2.3 running on my Win32 computer. I went to the php.ini file and removed the ; on the extension=php_gd2.dll
    I restarted apache, and tried to create a button, the error was:
    Fatal error: Call to undefined function imagecreatefrompng()....

    My extension_dir = "C:/php/php-5.2.3-Win32/ext" and the php_gd2.dll file is there. I must be missing something

    From what I've read online, it would seem that the library isn't installed. When I do a phpinfo(), I don't show any gd library. Is it something that I have to load seperatly? Apart from activating it in the php.ini and having the dll?

    I've read 100's of posts and php.net and everyone says it should work, but I can't even show a gd library
    Any help or possible ideas are really appreciated

  • #2
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,638
    Thanks
    2
    Thanked 404 Times in 396 Posts
    Windows doesn't need the library installed; just the extension enabled(which you already did). If the extension were loading you would see the gd section in your phpinfo(), and you would stop seeing those errors. So, check your "Configuration File (php.ini) Path", and "extension_dir" path in your phpinfo() to make sure you are editing the correct file, and the changes have taken effect.

  • Users who have thanked Inigoesdr for this post:

    Local Hero (02-26-2008)

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    You could have been done in 10 minutes if you had just used an install package which is what you probably should do anyways. It would save you the hassle of install php, apache, and mysql one by one. I recommend XAMPP.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    Local Hero (02-26-2008)

  • #4
    New Coder
    Join Date
    May 2005
    Location
    Utah
    Posts
    64
    Thanks
    6
    Thanked 0 Times in 0 Posts
    The php.ini file is located in C:/php/php-5.2.3-Win32

    In the file I've specified the extension as extension_dir = "C:/php/php-5.2.3-Win32/ext"

    In the ext file is the gd library .dll file

    When I check the phpinfo it says it should be in C:/php5. THAT'S IT!!!!!!!!!!!

    I know I can probably just make a php5 folder but I'd rather know where it is getting that direction and fix it. Any ideas there? By the way. THANKS!!!!

    As for the XAMPP, I wasn't aware of that when I started. I think I'll give it a shot on the next computer I try. Thanks

  • #5
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,638
    Thanks
    2
    Thanked 404 Times in 396 Posts
    Quote Originally Posted by Local Hero View Post
    When I check the phpinfo it says it should be in C:/php5. THAT'S IT!!!!!!!!!!!
    The extension_dir? What is the path for the php.ini that the phpinfo() says it's using?

  • #6
    New Coder
    Join Date
    May 2005
    Location
    Utah
    Posts
    64
    Thanks
    6
    Thanked 0 Times in 0 Posts
    In the file I've specified the extension as extension_dir = "C:/php/php-5.2.3-Win32/ext"

    So somewhere else it's telling it to look for C:/php5 which doesn't exist. Any ideas where it would say that?

  • #7
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,638
    Thanks
    2
    Thanked 404 Times in 396 Posts
    Quote Originally Posted by Local Hero View Post
    Any ideas where it would say that?
    Yes, probably in the php.ini it's reading from, which should be listed at the top of the phpinfo() page.


  •  

    Posting Permissions

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