Guestbook module & Captcha
Guestbook module & Captcha
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...
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
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).
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
Hi!
Well, the root path seems to be correct as everything else works fine...
Changed the library from b2evo to hncaptcha with no result. Any ideas? Even if it's just a workaround it's fine by me!
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';
Re: Guestbook module & Captcha
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

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
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)
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)
Last edited by baptiste on Tue Jan 30, 2007 11:34 am, edited 1 time in total.
Re: Guestbook module & Captcha
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.
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
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
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
hi mungo,
im having exactly the same problem for the built in contact form. did you find a solution yet?
tina
im having exactly the same problem for the built in contact form. did you find a solution yet?
tina
Last edited by tkeil69575 on Fri Feb 09, 2007 9:32 am, edited 1 time in total.
Re: Guestbook module & Captcha
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.
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
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
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
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.
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
thanks baptiste ... guess I'll have to read the thread again more carefully 

Re: Guestbook module & Captcha
OK that hack works for me. Thanks! 

Re: Guestbook module & Captcha
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
Regards,
D