We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19889
    • 616 Posts
    Hello
    my client has recently moved his site to a new server - although GD2 is installed, I’m not getting the captcha image to show up properly.

    what are the minimal requirements to have captcha working properly - what PHP modules need to be installed.

    thank you in advance for your help.
      • 19889
      • 616 Posts
      Sorry for bumping - does anybody know how to figure out what modules are needed to get captcha working?

      Thanks again

      by the way, here is the phpinfo: http://www.trade.ch/info.php and here is the link to the captcha script: http://www.trade.ch/manager/includes/veriword.php?rand=2034214444

      the code inspector in Safari shows me this: resource interpreted as document but transfered with MIME type image/jpeg
        • 3749
        • 24,544 Posts

        I’m not positive but I think the only thing you need is the GD and truetype.

        You might try installing the SPForm snippet, turning on its CAPTCHA, and see if that gives you an image.

        You could also try turning on CAPTCHA for manager login but if you get no image, you’ll be locked out until you manually edit the database.
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting
          • 19889
          • 616 Posts
          unfortunately, I’m not an expert at all but I think GD and truetype are running just fine - would you mind having a look at the phpinfo file - the link is in the first entry.

          thanks again

          Interesting, the following code is working:
          <?php
          header ("Content-type: image/png");
          $im = ImageCreate (250, 100);
          $white = ImageColorAllocate ($im, 255, 255, 255);
          $text_color = ImageColorAllocate ($im, 233, 0 , 233);
          // Five built in fonts 1..5
          // (Arguments: image, font-id, x, y, text, color);
          ImageString ($im, 1, 5, 5, "Hello world", $text_color);
          ImageString ($im, 2, 5, 25, "Hello world", $text_color);
          ImageString ($im, 3, 5, 45, "Hello world", $text_color);
          ImageString ($im, 4, 5, 65, "Hello world", $text_color);
          ImageString ($im, 5, 5, 85, "Hello world", $text_color);
          
          ImagePng ($im);
          ?>


            • 3749
            • 24,544 Posts
            Sorry, I meant FreeType, not TrueType.

            I looked at your phpInfo() output and it absolutely should output CAPTCHA images. Something else must be wrong.

            BTW, if you put any debugging statements ahead of the CAPTCHA code, it will often break the images.

            Are you sure the fonts and noise images got moved to their proper locations?

            Check also that veriword.php is in the proper place.

            Bob
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 19889
              • 616 Posts
              all seems to be in place - I moved the installation to a remote windows machine running wampserver - locally all is working fine - I downloaded MODx again and overwrote the noises and ttf directory as well as the veriword file - I’m assuming that either some php setting or apache setting is not working - I’m just lost

              thanks for having a look at the info file