[SOLVED] Captcha 2.2 - Image with security code

15 years 10 months ago #65338 by undoIT
I have installed the Captcha 2.2 plugin. The image is not showing in the frontend or the backend. Instead I get the text, "Image with security code embedded in it". The URL for that is:

[code:1]/components/com_comprofiler/plugin/user/plug_cbcaptcha/captchaindex.php?urlmode=image&captchasid=GlO6oyIX3v446pTGdnUD5tCQRQLYeimy[/code:1]

If I try to visit that URL I get the following warning:

[code:1]Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mydbuser'@'localhost' (using password: NO) in /home/myserver/public_html/administrator/components/com_comprofiler/library/cb/cb.session.php on line 87
Session connect error![/code:1]

I have checked cb.session.php and line 41 is as it should be:

[code:1] array_unshift ($check, &$_SESSION);[/code:1]

Running PHP 5.2.6 and mySQL 5.0.45 with fastCGI, Joomla 1.0.15

Does it matter where the Session save path for Joomla is located? Any clues?

Thanks!

Post edited by: undoIT, at: 2008/06/11 10:25

Please Log in to join the conversation.

15 years 10 months ago #65341 by undoIT
Okay. figured out what is going on here. as an added security measure i store the configuration.php file in a private folder and call from it using a php include. cb.session.php was trying to read the replaced configuration.php file for the db settings. i just set the path to the moved config file and now the image works. in case any body is wonder, this is the line that needed to be changed in cb.session.php

/administrator/components/com_comprofiler/library/cb/cb.session.php line 87 [code:1]$config = file_get_contents( dirname( __FILE__ ) . '/../../../../../configuration.php' );[/code:1]

Post edited by: undoIT, at: 2008/06/11 10:32

Please Log in to join the conversation.

15 years 10 months ago #65344 by RichRawlings
Replied by RichRawlings on topic Re:[SOLVED] Captcha 2.2 - Image with security code
I just removed the & before $_SESSION); in 41 and this worked for me.

Please Log in to join the conversation.

15 years 10 months ago #66255 by sitsinthestands
Replied by sitsinthestands on topic Re:[SOLVED] Captcha 2.2 - Image with security code
Editing cb.session.php to remove the ampersand worked for me also. Good spot Rich.

Bryn

Please Log in to join the conversation.

15 years 10 months ago #66364 by apbristow
And for me too - after hours of thinking I'd done something wrong. Thank you.

Please Log in to join the conversation.

15 years 8 months ago #70869 by dspor6
Just upgraded to CB 1.2 RC2 with captcha 2.2 rc2 with similar security precautions... ie configuration.php elsewhere and only solution was to change cb.session.php as did undoIT. This is a hard-coded solution which means I need to change this every time I copy/move this installation-perhaps not a big deal but just curious, why didn't the include of an included file work as per joomla security recommendations ?

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.750 seconds

Facebook Twitter LinkedIn