Page 1 of 1

Guestbook module & Captcha

Posted: Mon Dec 11, 2006 12:13 pm
by wientanz
Hi,

I'm currently using CMSMS 1.02 on www.wientanz.com.
My problem lies with the Guestbook module and the Captha module. When I activate Captcha for the Guestbook it tells me, that it's installed and everything, but when I call the page http://www.wientanz.com/index.php?page=gastebuch I see that there is a space for a captcha image, but it's missing. The link for the image is http://www.wientanz.com/hermes/web07/b2 ... 6d6834.jpg
and should be
http://www.wientanz.com/modules/Captcha ... 6d6834.jpg

It mixes the hostname with the absolute path! Is there any way to change that? Tried to run the Guestbook without captcha, but I get spam entries almost daily...

Re: Guestbook module & Captcha

Posted: Mon Dec 11, 2006 3:20 pm
by Dee
Strange one, haven't seen that before.
Check the $config['root_path'] value in config.php - it should be the full path to the server root. There were some issues on windows servers when this contains backslashes, but that doesn't seem the case here.

The URL is created by the b2evo library, from the $tempfolder setting (in lib/classes/class.captchalib_b2evo.php), which uses the $config['root_path'] and does a str_replace($_SERVER['DOCUMENT_ROOT'],'',$this->tempfolder) to get the url (function get_filename_url in lib/b2evo_captcha/b2evo_captcha.class.php).

Re: Guestbook module & Captcha

Posted: Thu Dec 14, 2006 9:47 am
by wientanz
Hi!

Well, the root path seems to be correct as everything else works fine...

Code: Select all

#Document root as seen from the webserver.  No slash at the end
#e.g. http://blah.com
$config['root_url'] = 'http://www.wientanz.com';

#Path to document root. This should be the directory this file is in.
#e.g. /var/www/localhost
$config['root_path'] = '/hermes/web07/b2393/pow.wientanz/htdocs';
Changed the library from b2evo to hncaptcha with no result. Any ideas? Even if it's just a workaround it's fine by me!

Re: Guestbook module & Captcha

Posted: Tue Jan 09, 2007 8:14 pm
by hesbas
In an other CMSMS website I made, on a totaly other server (XS4ALL-unix in NL) I have exactly the same problem as Wietanz. The same configuration on my other servers works fine!  ???

I guess  it is some security issue, wicht I cant figure out yet. May be an other member has som ideas?

I use CMSMS 1.0.2, Captcha 0.1.1(with latesd SVN-files already) and Guestbook 1.1.5.

Thanx

Re: Guestbook module & Captcha

Posted: Tue Jan 30, 2007 10:34 am
by baptiste
The problem in our case is due to our hosting provider not reporting the correct document root:
according to our host the document root for our site is '/homepages/20/2020202/', however it is actually '/kunden/homepages/20/2020202/' ('kunden' is German for customers).

Changing our 'root_path', 'previews_path', 'uploads_path', 'image_uploads_path' in config.php to include this 'extra' directory has fixed the captcha problem, but hasn't broken the rest of the site.

(I think it is more likely that the homepages directory, or equivalent, is preceded with a 'users' directory)

Re: Guestbook module & Captcha

Posted: Wed Jan 31, 2007 2:33 pm
by tholler
Hi all,
I had the same problem as you had; and I released it;

just have to set the umask in global settings to 002 and everything is fine.

Try it.

Re: Guestbook module & Captcha

Posted: Thu Feb 08, 2007 6:31 pm
by mungo
I have a similar problem on my server, the Captcha image is missing. If I look at the image path it is:
http://mysite/cms/cms/modules/Captcha/i ... ha_xxx.jpg

For some reason it has added and extra /cms into the path.

Any ideas for a workaround?

TIA

Re: Guestbook module & Captcha

Posted: Fri Feb 09, 2007 9:29 am
by tkeil69575
hi mungo,
im having exactly the same problem for the built in contact form. did you find a solution yet?
tina

Re: Guestbook module & Captcha

Posted: Thu Feb 15, 2007 11:42 am
by baptiste
there is a hack to fix this problem (http://forum.cmsmadesimple.org/index.ph ... l#msg49609).

But I think this is down to an incorrect 'root_path', our site was working fine apart from the capcha image, changed the path, and the site still works fine and now captcha is also working.

Re: Guestbook module & Captcha

Posted: Thu Feb 15, 2007 11:46 am
by tkeil69575
Hi babtise,
thanks for the link, i read that, but I'm not on a windows server and am 100% sure the root path is correct.
thanks anyway :)

tina

Re: Guestbook module & Captcha

Posted: Thu Feb 15, 2007 2:02 pm
by baptiste
Hi Tina,

the hack will work on any server, it involves hard coding the path to the captcha images on those 2 lines in the captcha class.

Re: Guestbook module & Captcha

Posted: Thu Feb 15, 2007 2:13 pm
by tkeil69575
thanks baptiste ... guess I'll have to read the thread again more carefully :)

Re: Guestbook module & Captcha

Posted: Thu Feb 15, 2007 5:51 pm
by mungo
OK that hack works for me. Thanks!  ;D

Re: Guestbook module & Captcha

Posted: Sun Feb 18, 2007 9:44 pm
by Dee
Version 0.2 should fix the captcha image not showing up in some cases. Let me know if this version works for you without hacks.

Regards,
D