• Resolved ymf

    (@ymf)


    On a Linux-based web host, I am getting PHP warnings about a missing php_gd2.dll file. Hello, are .dll’s even expected to be in Linux? My web host (WebhostingPad.com) tells they don’t support any dll’s.

    The following error messages into the root-level error_log file:

    [02-May-2010 22:22:48] PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_gd2.dll’ – /usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_gd2.dll: cannot open shared object file: No such file or directory in Unknown on line 0

    Any ideas about the potential root cause?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    which PHP Version are you using on hosting server? Is your server GD library supported?

    I suggest you to check with PHP5 for your blog.

    Thanks,

    Shane G.

    Upload phpinfo page in your domain and check whether GD library is enabled or not. If it is not enabled, you can contact your host to enable it for web site/server.

    Regarding the warning message, sometimes this happens if there is a problem in the php.ini file.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Look in your php.ini file of conf.d for

    extension=php_gd2.dll

    It probably should be

    extension=gd.so
    Thread Starter ymf

    (@ymf)

    Thanks for all your help. The problem has been fixed by the host on their side. Something must have been wrong in their server-wide php.ini file of conf.d, as jdembowski guessed (not in my local .ini files). They never told me exactly what the problem was. Anyway, I feel good that they (WebhostingPad.com) finally fixed the problem that for a long time was affecting many other customers.

    Answering Accuwebhosting‘s idea: the GD library was enabled all the time. They probably had in their .ini files both “extension=php_gd2.dll” and “extension=gd.so”.

    Best regards
    ymf

    Thread Starter ymf

    (@ymf)

    Update: Apparently, they at webhostingpad.com do not implement fixes system-wide, but rather at individual servers. After they migrated my account to a different server, the problem reappeared. To their credit, they quickly applied the fix to that new server after I asked them.

    I am experiencing the exact same problem that you originally described, ymf. The error message is identical. I, too, am not sure why DLL files are referenced in a Linux environment. However, once upon a time this was not an issue for me.

    When my server was first setup, I used logged into WHM/cPanel to use EasyApache (the Apache updater) in order to recompile Apache with the GD module installed. The module installed successfully and ‘–with-gd’ showed up when I ran phpinfo(). After uncommentting the line read “extension=php_gd2.dll” within my php.ini file, I was able to generate captchas with no problem.

    That was then, this is now. I have recently “reprovisioned” my server, which is fancy-speak for having my host reinstall my server from scratch and set it up like a brand new account. Once again, I had to recompile Apache to include the GD module. And once again, it showed up successfully when I ran phpinfo(). But now when I go to use the GD library, I get the same error message:

    "Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/php_gd2.dll'"

    I SSH’d into my account as the superuser and searched for the php_gd2.dll file but it was nowhere to be found. I did however find “gd.so”. I edited php.ini to point to the location of gd.so for modules and thought I’d solved the problem. Now, when I make calls to the GD library, I get this error:

    PHP Warning:  PHP Startup: gd: Unable to initialize module
    Module compiled with module API=20050922, debug=0, thread-safety=0
    PHP    compiled with module API=20060613, debug=0, thread-safety=0
    These options need to match

    I tried telling my host about this issue and how it used to work, but the second I mention anything about the php.ini file, GD, or use the word “module”, they immediately tell me it’s outside the scope of their responsibilities and that I ought to Google some more.

    Anyway, I just want to be able to reference the DLL file like I used to. Any ideas?

    Oh to hell with it all, I only need GD to generated captchas. I’ll just use Google’s reCaptcha service. It’s got to be more secure than the random script I found on the ‘net anyway.

    And that’s how you properly solve a problem. 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP Warning: Unable to load php_gd2.dll. Hello, but on Linux server?’ is closed to new replies.