forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: dumbo on June 11, 2008, 07:14:03 pm

Title: [Solved]: Captcha not working
Post by: dumbo on June 11, 2008, 07:14:03 pm
installed captcha as per the read me and the php version is 5.2..5 and coppermine version is latest

the problem is the captcha image dosent appear any where in comments and login page or e card page

login page
http://www.liveglamour.com/login.php

comment page
http://liveglamour.com/displayimage.php?pos=-163

e cards page
http://liveglamour.com/ecard.php?album=11&pid=163&pos=5


please help
Title: Re: Captcha not working
Post by: dumbo on June 11, 2008, 07:30:58 pm
now i cant login to my own page  ;D
Title: Re: Captcha not working
Post by: Hein Traag on June 11, 2008, 07:31:41 pm
no captcha.php at the root of your cpg site. redo the installation properly.
Title: Re: Captcha not working
Post by: dumbo on June 12, 2008, 06:10:55 am
Tried reinstalling still www.liveglamour.com/captcha.php dosent show up the image :(

What else to check for
Title: Re: Captcha not working
Post by: dumbo on June 12, 2008, 04:48:23 pm
but i have copied the captcha.php to the root directory as mentioned , is there any thing else like the permission to change for the file ?
I badly need this get done please help me
Title: Re: Captcha not working
Post by: Nibbler on June 12, 2008, 04:52:10 pm
You've got a whole load of whitespace (empty lines) somewhere. Review any PHP files you have modified and remove any space before the opening <?php at the start of the file or after the closing ?> at the end of the file.
Title: Re: Captcha not working
Post by: dumbo on June 12, 2008, 05:01:43 pm
You've got a whole load of whitespace (empty lines) somewhere. Review any PHP files you have modified and remove any space before the opening <?php at the start of the file or after the closing ?> at the end of the file.

nibbler u saved me  ;D ;D ;D ;D

My modified theme was the villan  ;D , i removed the white space in the theme file and its rocking now  ;D


never knew white spaces could create such big problem
Title: Re: [Solved]: Captcha not working
Post by: dumbo on June 12, 2008, 05:18:21 pm
nibbler i still have small probs , captcha is not showed on comments is that too caused by white space ? ? i didnt find any in displayimage.php, and how to avoid captcha at login ?

cos login part is quite hard on theme :) especially on Strams login box at top right :( , hope ill be able to fix it

see it

www.liveglamour.com/login.php
Title: Re: [Solved]: Captcha not working
Post by: Nibbler on June 12, 2008, 05:21:36 pm
The instructions that come with the plugin explain how to enable/disable captcha on each page.
Title: Re: [Solved]: Captcha not working
Post by: dumbo on June 12, 2008, 05:28:14 pm
not working on display image with multi line comments plugin , i just check it now :)
Title: Re: [Solved]: Captcha not working
Post by: Nibbler on June 12, 2008, 05:42:41 pm
That's to be expected. You'll need to change the regex here in codebase.php

Code: [Select]
        case 'displayimage.php':
            $valid_groups = explode(',', $CAPTCHA_DISABLE['comment']);
            if (!in_array(USER_GROUP, $valid_groups) OR $CAPTCHA_DISABLE['comment'] == '') {
                $exper = '(<input type="submit" class="comment_button" name="submit" value="' . $lang_display_comments['OK'] . '" />)';
                if (preg_match($exper, $html)) {
                    if (USER_ID) {
                        $newcpch = '<!-- CAPTCH PLUGIN 3 --><input type="submit" class="comment_button" name="submit" id="submit" value="' . $lang_display_comments['OK'] . '" /></td></tr><tr><td class="tableb_compact" colspan="2">' . $lang_plugin_captcha_conf . '</td><td class="tableb_compact" colspan="2"><input type="text" name="confirmCode" id="confirmCode" size="5" class="textinput"><img src="captcha.php" align="middle">';
                    } else {
                        $newcpch = '<!-- CAPTCH PLUGIN 3 --><input type="submit" class="comment_button" name="submit" id="submit" value="' . $lang_display_comments['OK'] . '" /></td></tr><tr><td class="tableb_compact" >' . $lang_plugin_captcha_conf . '</td><td class="tableb_compact" ><input type="text" name="confirmCode" id="confirmCode" size="5" class="textinput"><td class="tableb_compact"><img src="captcha.php" align="middle"></td><td class="tableb_compact" >&nbsp;</td><td class="tableb_compact" >&nbsp;</td>';
                    }
                    $html = preg_replace($exper, $newcpch, $html);
                }
            }
            break;
Title: Re: [Solved]: Captcha not working
Post by: dumbo on June 13, 2008, 05:07:25 am
All problems cleared now nibbler . thanks a lot