Welcome to Dagon Design. In addition to free scripts, WordPress plugins, and articles, we offer a variety of services including custom theme design, plugin creation, and PHP scripting. Contact me for more information.

Updated Sunday, April 23rd, 2006 at 4:16pm

Checking for GD support on your server

Several of the scripts and plugins on this site use the GD library to generate verification images. If you are having problems getting a generated image to display, the first step is to make sure your server has support for the GD library in PHP. This small script will tell you if your server supports GD, and if it does, it will list the specific components. For example, some versions of PHP/GD have problems generating PNG files. You can use this script to know if you need to change the script to generate a GIF instead, or if you just do not have support at all for GD.

Live Demo

Download

Instructions

Download the above file, rename it from .txt to .php, upload it to your server, and open it in your browser.

Pages: « 3 [2] 1 » Show All

  1. Cool I made fully basic testing scirpt based off your tester for GD. Makes easyer for iwndows users to turn on things like curl and GD. Good work and thank you for the share!

  2. unknown: You may have to recompile Apache with PHP included.

  3. does your check GD script work for php_gd2.dll?….because i enabled it in php.ini and told php.ini where to find the dll but your test GD script says its not installed…I’ve verified that i correctly configured php.ini but still no GD according to your script.I also used php info script and GD doesn’t show up in it neither.

  4. Jack: I see you have verification removed right now on your form. Send me an email when you have it enabled and I will check something.

  5. formmailer_verify.php will not display verification #
    gd-test.php was run and I contacted support/ GD PNG & GIF
    are both supported, session cookies are enabled but it
    is still not working ??

  6. Ray: To disable verification in the formmailer script, set the veirfication field option to “” and remove the verification line from the form structure.

  7. I apologize, but a couple of times you mention in the website… “read above to learn how to disable GD.” and I can’t find where you have laid out those steps… For now I just deleted the line about verification. But it still gives me the error message. How can I disable GD so it stops giving me the error message at the top of the contact page… textorservice.com | contact. Thanks for your help. Great code by the way.

  8. george: If you do not have direct access to the server (to recompile Apache), you will just have to ask your web host to see if they can enable GD for you.

  9. hi i would like some help i have tryed the script and GD is not supported how do i get it to work thanks

  10. Thanks, useful script!

  11. Terje: The non-caching code has actually already been added to the new version of my formmailer script/plugin (as well as new session code), although it is not ready for public release yet. It will also be added to the guestbook script eventually when I have time to update that one :)

  12. 19
    Terje With Lunndal

    To avoid the verification image being cached, and thereby not changing to the user, one could add two lines of code to the start of ddbb.php:

    
    header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
    

  13. 18
    Terje With Lunndal

    Everyone who are experiencing issues with displaying the verification image should first check if session cookies are enabled for the site in question. The author might want to mention this in the documentation and the script output.

  14. Virginia: When I go to that link I get an error - perhaps it is some sort of re-direction code in your .htaccess file? Try going to that link.

  15. 16
    Virginia

    Yes the file is there.

Pages: « 3 [2] 1 » Show All

Leave a Comment

Before you comment: If you are having an issue with a script, please make sure you have read the entire article. Also, please read through the comments because most common issues have already been discussed many times. Thanks.


Be sure to wrap all code in <code></code> tags.