Page 1 of 1

PHP error Notice from captcha module after upgrade

Posted: Sun Jun 27, 2010 2:30 pm
by janvl
CMSMS 1.7.1. Captcha module 0.41

Hi I have a form with a Captcha and I get the following notice:

Notice: Undefined index: path in /is/htdocs/wp10469715_9Z186ZZC5H/www/cmsms/modules/Captcha/lib/classes/captchalibs/class.captchalib_hncaptcha.php on line 50

So I had a look in the source and tried some variations of line 49 an 50:

$parsed = parse_url($config['root_url']);
$path = $parsed['path'];

but if I change $config['root_url'] to $config['root_path'] the notice is gone just like the captcha-image!

Here is the part of my config.php on the shared hoster:

#-------------
#Path Settings
#-------------

#Document root as seen from the webserver.  No slash at the end
#If page is requested with https use https as root url
#e.g. http://blah.com
$config['root_url'] = 'http://www.control-engineering.at';

#SSL URL.  This is used for pages that are marked as secure.
$config['ssl_url'] = 'https://www.control-engineering.at';

#Path to document root. This should be the directory this file is in.
#e.g. /var/www/localhost
$config['root_path'] = '/is/htdocs/wp10469715_9Z186ZZC5H/www/cmsms';

#Name of the admin directory
$config['admin_dir'] = 'admin';

#Where do previews get stored temporarily?  It defaults to tmp/cache.
$config['previews_path'] = '/is/htdocs/wp10469715_9Z186ZZC5H/www/cmsms/tmp/cache';

#Where are uploaded files put?  This defaults to uploads.
$config['uploads_path'] = '/is/htdocs/wp10469715_9Z186ZZC5H/www/cmsms/uploads';

#Where is the url to this uploads directory?
$config['uploads_url'] = $config['root_url'] . '/uploads';


What has changed that I become a notice now and how do I get rid of it?
I have checked with another CMSMS install, where CMSMS 1.7.1 is running with Captcha module 0.4
There I do not have this problem.

I hope I have given enough information.

Kind regards,
Jan

Re: PHP error Notice from captcha module after upgrade

Posted: Mon Jun 28, 2010 11:50 am
by janvl
Sorry to bother but do I really need to go back to 0.40?

Jan

Re: PHP error Notice from captcha module after upgrade

Posted: Mon Jun 28, 2010 1:53 pm
by Darwin Web Design
Hello

I am having this exact same problem, I have upgraded to 1.7.1 and have Captcha 0.4.1 with Formbuilder 0.6.2.

As suggested above, I have uninstalled and reinstalled the Captcha module but the same error displays above both forms on my website:

"Notice: Undefined index: path in /home/dwnwe/public_html/modules/Captcha/lib/classes/captchalibs/class.captchalib_hncaptcha.php  on line 50"

Is there something else we can try for this problem?

Thanks.

Re: PHP error Notice from captcha module after upgrade

Posted: Mon Jun 28, 2010 2:50 pm
by janvl
Hi,

I did an uninstall, with removal and a new install.
The problem stays.

If no solution will come I will copy all of 0.40 back and hope this will work.

Regards,
Jan

Re: PHP error Notice from captcha module after upgrade

Posted: Tue Jun 29, 2010 12:20 am
by Darwin Web Design
Yes I also tried completely uninstalling and reinstalling the module with no luck.

For the time being I have reinstalled the old version 0.4 - and the form works fine - with no errors displayed.  It doesn't seem right to go back a version but don't know what else to try...

:-\

Re: PHP error Notice from captcha module after upgrade

Posted: Wed Jun 30, 2010 5:41 pm
by janvl
Seems we must downgrade to 0.40

No reaction whatsoever.

Re: PHP error Notice from captcha module after upgrade

Posted: Wed Jun 30, 2010 6:15 pm
by tyman00
Just talked to a dev and it seems that the issue is because of the way PHP changed their behavior when it came to parse_url in different versions.

The fix has been committed to SVN, but I am not sure when there'll be a release.

Re: PHP error Notice from captcha module after upgrade

Posted: Wed Jun 30, 2010 10:01 pm
by Darwin Web Design
Thank you for following this up and letting us know. 

Re: PHP error Notice from captcha module after upgrade

Posted: Tue Jul 20, 2010 6:20 pm
by Dave
I was having the same problem, but it appears to only be a problem with hn_captcha, if you switch to one of the other Captcha types it works fine.

Re: PHP error Notice from captcha module after upgrade

Posted: Wed Jul 21, 2010 5:36 am
by cyberman
It's "only" a notice from php - you have to modify the error level like in announcement for version 1.7 suggested.