We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 29525
    • 388 Posts
    Hi Everyone.

    I can’t figure out why the captcha images don’t appear on my discussion page.

    http://www.terrybarthdesign.com/discussion.html

    The page has two chunks:

    discussion
    [!Jot? &subscribe=`1` &cssFile=`assets/templates/modxhost/jot.css` &placeholders=`1` &output=`0` &pagination=`10` &captcha=`2` &notify=`2` &canmoderate=`admin` &validate=`email:Please enter valid Email address.:email,name:Please enter your name.`!]
    
       [+jot.html.comments+]
    


    subscribe:
    <div id="outer_container"
    <div class="content">
    <div class="subscribe">
    
    <ul><li><a href=# onclick="cacherVoir('Update2'); return false;">Add a comment</a></li></ul>
    </div>
    
       [+jot.html.subscribe+]
    
    <div id="moderate">
       [+jot.html.moderate+]
       [+jot.html.navigation+]
    </div>
    
    <div id="Update2" style="display:none;">
       [+jot.html.form+]
    </div>
    </div>
    </div>


    This line is used to hide/show the subscribe section which:
    <a href=# onclick="cacherVoir('Update2'); return false;">


    I’ve used these these chunks on other pages on this server and it works perfectly. I copied the chunks from the other pages to this one but the captcha isn’t showing.

    I don’t know how to trouble shoot this. I would appreciate any thoughts.

    Thank you!
      www.terrybarthdesign.com
      • 36592
      • 970 Posts
      You have a following error generating captcha image...
      Warning: dir(./ttf) [function.dir]: failed to open dir: No such file or directory in /home/terrybar/public_html/manager/includes/veriword.php on line 111
      
      Fatal error: Call to a member function read() on a non-object in /home/terrybar/public_html/manager/includes/veriword.php on line 113
      
        • 29525
        • 388 Posts
        tkfm Thank you!

        I’m still a bit clueless.

        1. Where do you see this error msg?

        2. I have confirmed that the veriword.php file exists in the manager/includes directory. Line 111 contains the following:
         $dir = dir("./ttf");
        $fontstmp = array();
        while (false !== ($file = $dir->read())) {
        if($file!="." && $file!=".." && file_exists('./ttf/'.$file) && !is_dir('./ttf/' . $file)) {
        $fontstmp[] = './ttf/'.$file;
        }
        }
        $dir->close();
        $text_font = (string) $fontstmp[array_rand($fontstmp)];


        3. I have also confirmed the directory ttf exists in the same location and there is a file called ftb_____.ttf contained within it.

        Not sure how interpret this.

        Thank you!
          www.terrybarthdesign.com
          • 36592
          • 970 Posts
          1. Where do you see this error msg?
          I looked into the source code of your web page and found the line which link to the captcha image as follows...
          http://www.terrybarthdesign.com/manager/includes/veriword.php?rand=478898482

          I copy&pasted this url in the browser and found the error in my previous post.


          2. I have confirmed that the veriword.php file exists in the manager/includes directory. Line 111 contains the following:
           $dir = dir("./ttf");

          3. I have also confirmed the directory ttf exists in the same location and there is a file called ftb_____.ttf contained within it.
          I do not know much about PHP, but your system seems not to be able to read that directory.
          Checking the permission of the directory and containd files or re-uploading that directory might make difference...
            • 29525
            • 388 Posts
            tkfm

            You were right on the money. The file wasn’t where I thought it was. I had installed it in another directory which was not where I was looking and not where captcha needed it.

            I copied the file over and I’m good to go!

            Thank you!!

            Terry
              www.terrybarthdesign.com