[Solved]: Captcha not working [Solved]: Captcha not working
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

[Solved]: Captcha not working

Started by dumbo, June 11, 2008, 07:14:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dumbo

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

dumbo

now i cant login to my own page  ;D

Hein Traag

no captcha.php at the root of your cpg site. redo the installation properly.

dumbo

Tried reinstalling still www.liveglamour.com/captcha.php dosent show up the image :(

What else to check for

dumbo

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

Nibbler

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.

dumbo

Quote from: 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.

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

dumbo

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

Nibbler

The instructions that come with the plugin explain how to enable/disable captcha on each page.

dumbo

not working on display image with multi line comments plugin , i just check it now :)

Nibbler

That's to be expected. You'll need to change the regex here in codebase.php


        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;

dumbo

All problems cleared now nibbler . thanks a lot