PHP error Notice from captcha module after upgrade

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
janvl
Power Poster
Power Poster
Posts: 972
Joined: Wed Aug 13, 2008 10:57 am

PHP error Notice from captcha module after upgrade

Post 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
Last edited by janvl on Sun Jun 27, 2010 4:11 pm, edited 1 time in total.
janvl
Power Poster
Power Poster
Posts: 972
Joined: Wed Aug 13, 2008 10:57 am

Re: PHP error Notice from captcha module after upgrade

Post by janvl »

Sorry to bother but do I really need to go back to 0.40?

Jan
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am
Location: Darwin NT, Australia

Re: PHP error Notice from captcha module after upgrade

Post 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.
janvl
Power Poster
Power Poster
Posts: 972
Joined: Wed Aug 13, 2008 10:57 am

Re: PHP error Notice from captcha module after upgrade

Post 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
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am
Location: Darwin NT, Australia

Re: PHP error Notice from captcha module after upgrade

Post 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...

:-\
janvl
Power Poster
Power Poster
Posts: 972
Joined: Wed Aug 13, 2008 10:57 am

Re: PHP error Notice from captcha module after upgrade

Post by janvl »

Seems we must downgrade to 0.40

No reaction whatsoever.
tyman00
Power Poster
Power Poster
Posts: 906
Joined: Tue Oct 24, 2006 5:59 pm

Re: PHP error Notice from captcha module after upgrade

Post 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.
Last edited by tyman00 on Wed Jun 30, 2010 6:37 pm, edited 1 time in total.
If all else fails, use a bigger hammer.
M@rtijn wrote: This is a community. This means that we work together and have the same goal (a beautiful CMS), not that we try to put people down and make their (voluntary) job as difficult as can be.
User avatar
Darwin Web Design
Forum Members
Forum Members
Posts: 212
Joined: Tue May 30, 2006 3:12 am
Location: Darwin NT, Australia

Re: PHP error Notice from captcha module after upgrade

Post by Darwin Web Design »

Thank you for following this up and letting us know. 
User avatar
Dave
Forum Members
Forum Members
Posts: 19
Joined: Fri Jul 07, 2006 11:59 am

Re: PHP error Notice from captcha module after upgrade

Post 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.
cyberman

Re: PHP error Notice from captcha module after upgrade

Post by cyberman »

It's "only" a notice from php - you have to modify the error level like in announcement for version 1.7 suggested.
Post Reply

Return to “Modules/Add-Ons”