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

  If you have found this page useful, please consider donating. Thanks!

Instructions

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

  1. Whoa! That’s great. Thank you!
    I would never thought about this myself!

  2. what happen when i turn on off GD ?

  3. urberry Hobo Styles Medium Tote Bags Red

  4. I was just thinking about That Auction and you’ve really helped out. Thanks!

  5. Wow and wow! Thank you!

  6. Its interesting. I would like to know more about this…I really wanted to know how this works can you please help me out…….Thanks for sharing. nfdxgbf

  7. kgfhtfg This is a wonderful site! I’ve been looking for something like this 
    for a while now! Thank you!
    

  8. Nice hosting! It’s my first time to read like this article. 
    .	
    few9

  9. Thank you so very much for taking the time to share…very useful, indeed!fgtuju

  10. Thanks for a nice share you have given to us with such an large collection of information dfhfd

  11. I will always give a nice thrust look in to you from my bookmark feed. I don’t actually comment and don’t like to spend time in typing the comment.

  12. Very impressive post.

  13. You just made my night!!! my cpanel installation it wasnt built with GD option. it wasnt enough for me with phpinfo :P

  14. I visited this page first time and found it Very Good Job of acknowledgment and a marvelous source of info………Thanks Admin!

  15. Thanks! This should help with the issues we’ve been having with verification images.

  16. Nice idea but still need to think a lot before concluding.

  17. 66
    ssara

    The new system seems to be workable. I hope so as there are lot of problems which are being faced. Dentist NYC

  18. good writing! thx!

  19. thx so much for these nice posts!

  20. Thanks for the help. I am still having problems viewing my captcha image at my end. :( Even though my server passes the test

  21. 62
    Person

    I fallow all the steps about your great plugin for multi-column list. I am using Wordpress 3.1 and install the plugin but it is not showing me any list of alphabetic order window. I’m very new to this so really need your help in this.
    Pavement Signs

  22. Option to display as tabbed dialog Easy drag & drop setup engineering masters

  23. Brand Yourself and Advertise any site all with one URL Free to Join masters degree social work

  24. I fallow all the steps about your great plugin for multi-column list. I am using Wordpress 3.1 and install the plugin but it is not showing me any list of alphabetic order window. I’m very new to this so really need your help in this. online mba in sustainable business

  25. “I want to install the contribution ‘On The Fly’ Auto Thumbnailer’ for my images but I first need to be sure that I have the ‘GD Library’.
    Thank you web designing

  26. We are now possibly looking at having to have pleurodesis on the left and not sure what will happen or what is next if the fluid goes to the belly. Looking for insight from others who may have had same experience best slimming tea

  27. I can’t seem to get this to work – it only imports the first account (the first line) regardless of how many I have listed – tried both manually entering the data and uploading a text file. Any help would be appreciated safety degree

  28. 55
    sun

    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. informatics

  29. 54
    sun

    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. nursing administration

  30. 53
    sun

    My 2 year old son has been in the hospital for bilateral pleural chylous effusions since Jan 29, p/o Fontan in November of 2009. He has tried diet, diuretics, thoracic duct ligation and now pleurodesis on the right side. rn bsn

  31. 52
    sun

    My 2 year old son has been in the hospital for bilateral pleural chylous effusions since Jan 29, p/o Fontan in November of 2009. He has tried diet, diuretics, thoracic duct ligation and now pleurodesis on the right side. end of tenancy cleaning london

  32. 51
    sun

    I got my hair cut today. It was not just an ordinary hair cut, I decided to give my hair to locks of love.I am going through problems myself and wanted to help out other people. Many people should do this, it only takes ten inches of your hair. It goes out to people who do not have hair for different reasons. I am really glad I did what I did cause I feel so much better knowing that I can help someone out, cause I might need someone to help me out you can never know. masters in healthcare

  33. We are now possibly looking at having to have pleurodesis on the left and not sure what will happen or what is next if the fluid goes to the belly. Looking for insight from others who may have had same experience. Online masters in education

  34. please read through the comments because most common issues have already been discussed many times. Thanks. masters in education

  35. Can England afford to take a bowler “who will never completely be able to set his own fields” to Australia

  36. please read through the comments because most common issues have already been discussed many times. Thanks. music education

  37. please read through the comments because most common issues have already been discussed many times. Thanks. Information Systems Degree

  38. please read through the comments because most common issues have already been discussed many times. Thanks.online social work masters

  39. Nifty little helper for our web projects. Many Thanks!

  40. I have seen my issue has been discussed by I can’t see how it was resolved.
    When i open the php file in my browser (mozilla firefox). It says:
    ‘; echo ‘

    GD is ‘; if (function_exists(“gd_info”)) { echo ’supported by your server!
    ‘; $gd = gd_info(); foreach ($gd as $k => $v) { echo ‘
    ‘; echo ” . $k . ‘ ‘; if ($v) echo ‘Yes’; else echo ‘No’; echo ‘
    ‘; } } else { echo ‘not supported by your server!

    ‘; } echo ‘

    by dagondesign.com
    ‘; echo ”; ?>

    but I dont know what does this means!
    I want to install the contribution ‘On The Fly’ Auto Thumbnailer’ for my images but I first need to be sure that I have the ‘GD Library’.
    Thank you

  41. 42
    jibran

    We can give them a good education that they can use in their life to get a better chance in this life. Im sure with a good education all of us will see the changing that all that kids can have. DVD Ripper For Mac

  42. 41
    jibran

    Companies these days are using ergonomic furniture to ensure that there are no injuries from work related hazards. Use an ergonomic chair and feel better comfort in your back and shoulder. rabattkod

  43. 40
    webseo67

    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.
    dermatology

  44. 39
    Harry

    when i open the php file in my browser (mozilla firefox). It says:

    ‘; echo ‘

    GD is ‘; if (function_exists(“gd_info”)) { echo ’supported by your server!
    ‘; $gd = gd_info(); foreach ($gd as $k => $v) { echo ‘
    ‘; echo ” . $k . ‘ ‘; if ($v) echo ‘Yes’; else echo ‘No’; echo ‘
    ‘; } } else { echo ‘not supported by your server!

    ‘; } echo ‘

    by dagondesign.com
    ‘; echo ”; ?>

    What does this mean?…i want to enable the gd library. Thanks!

  45. Thanks for the hints!

  46. Vielen Dank für diesen Vorschlag. Ich schicke Dir einen Gruß aus Deutschland.

    Thanks for the suggestion. I send you regards from Germany.

  47. Runf: One thing to try is making sure you are consistent with the URL options for your site in the script. If your options use ‘www.test.com’ but you are viewing the site without the ‘www.’ that can cause several verification scripts out there to not work, as the cookie used to hold the verification code things the domain is different.

  48. I have had the GB working at my personal site, jazzdrummer.com for quite some time now.
    I’m trying to set up a GB for a client. I’ve been having no luck with the verification. I’ve tried so many combinations of permissions and path variations that I’ve lost count.
    As a last resort, I copied my working GB to the new site, changed the paths where applicable but otherwise copied exactly the working GB files and set permissions the same as the working GB. No luck.
    Please help. It seems many people are having trouble with the validation images. GD is supported by my server btw.
    Thanks.

  49. Thanks, very useful, it sure would be great to have a dedicated hosting facility so we wouldn’t have to make go through channels to make those changes.

  50. 33
    WormSlayer

    win!

  51. Thanks, It really helped me on my new server.
    It will be good if you put some information on installing GD.

  52. 31
    Darken

    Thanks for this little tool.

  53. 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!

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

  55. 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.

  56. 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.

  57. 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 ??

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

  59. 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.

  60. 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.

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

  62. Thanks, useful script!

  63. 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 :)

  64. 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
    

  65. 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.

  66. 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.

  67. 16
    Virginia

    Yes the file is there.

  68. Virginia: The script on your server is looking here for the verification file:

    http://www.yukasato.net/formmailer_verify.php

    The problem is that the file is just not there. Did you upload it?

  69. 14
    Virginia

    I have it up at http://www.yukasato.net/links.php
    Sorry it took a while to respond :)

  70. Virginia: There are many possible reasons :) Can I see a link? You can email it to me if you prefer.

  71. 12
    Virginia

    I have done everything listed here successfully(gd supported, php mail works) and the image still doesn’t show up on one site I am doing(it works on my other site). Is there anything else anyone can think of as to why the image doesn’t show up?

  72. Matt: No. It should work fine in all browsers, unless there is another issue you are having. :) Please post this on the proper page though.

  73. Oops – Secure Form Mailer Plugin For Wordpress

    thanks Admin, but I just noticed that it is showing up on my work computer (Internet Explorer). I was using firefox at home when I posted, and tried reloading the page, too – are there any issues w/ the mozilla browser (CSS, etc)?

    thanks

  74. Matt: You are going to have to tell me what plugin/script you are trying to use. There are a few different ones that make use of the image verification. Please leave a comment on the page for the script in question. :)

  75. Regarding previous comment, forgot to mention I tried alt version of verify already – no dice…

  76. I am not seeing any verification code – uploaded the file to my server to test as you instructed and received the following.

    GD is supported by your server!
    GD Version Yes
    FreeType Support Yes
    FreeType Linkage Yes
    T1Lib Support No
    GIF Read Support Yes
    GIF Create Support Yes
    JPG Support Yes
    PNG Support Yes
    WBMP Support Yes
    XBM Support Yes
    JIS-mapped Japanese Font Support No

    by dagondesign.com

    Shows just like the demo file on your server… what can I do next to determine the cause of the image not showing?

    Thanks,

  77. Maya: You will have to contact your web host and see if they can enable sending mail through PHP. There is not much you will be able to do yourself unfortunately.

  78. ok i get this message:
    Warning: mail(): “sendmail_from” not set in php.ini or custom “From:” header missing in D:\hshome\chefilan\chefilan.com\blog\wp-content\plugins\test.php on line 1

    i guess it’s not supported. how can i make it work?

  79. Maya: Save the following code as test.php, upload it, and open it in your browser. Then check your mail :)

    <?php mail('your@email.com', 'Subject', 'Message'); ?>

    Be sure to add in your email address of course.

  80. what can i do to check that?

  81. Maya: I have not seen this happen before, but after a bit of searching, it looks like it is usually caused by PHP not being configured to send mail. Do you know if your server supports the use of the mail function from PHP?

  82. i don’t want any verification. i removed it from the form successfully, but now when i send the message i keep getting this error:

    Warning: mail(): “sendmail_from” not set in php.ini or custom “From:” header missing in D:\hshome\chefilan\chefilan.com\blog\wp-content\plugins\intouch\dd-formmailer-plugin.php on line 700

    about a missing header..
    any idea what this is?

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.