Undefined index: spam.enableCatpchaCode in Configuration.php

Please report bugs here!

Moderator: Thorsten

Post Reply
AidyPie
Posts: 15
Joined: Wed Oct 21, 2009 10:04 am
Location: UK

Undefined index: spam.enableCatpchaCode in Configuration.php

Post by AidyPie »

Hi,
This is my first post, so I would like to start by saying what a great system phpMyFaq is! Keep it up guys :)

Right, my problem then:

After upgrading v2.52 i now get the following error on the "Add Faq", "Ask Question" and "Contact pages", and the captcha code no longer displays :(

phpMyFAQ notice [8]: Undefined index: spam.enableCatpchaCode in Configuration.php on line 135

phpMyFAQ notice [8]: Undefined index: spam.enableCatpchaCode in Configuration.php on line 143

Does anyone have any ideas to the cause?

Thanks in advance :)
WSchn123
Posts: 100
Joined: Wed Feb 02, 2005 11:00 am

Re: Undefined index: spam.enableCatpchaCode in Configuration.php

Post by WSchn123 »

Hi
AidyPie wrote:Hi,
After upgrading v2.52 i now get the following error on the "Add Faq", "Ask Question" and "Contact pages", and the captcha code no longer displays :(

phpMyFAQ notice [8]: Undefined index: spam.enableCatpchaCode in Configuration.php on line 135
phpMyFAQ notice [8]: Undefined index: spam.enableCatpchaCode in Configuration.php on line 143

Does anyone have any ideas to the cause?
have a look at the following thread viewtopic.php?f=3&t=10085. The problem has to do with a typing error in files ... I had a similar problem and changed the typing error in the file

/inc/functions.php in line 585
if ($faqconfig->get('spam.enableCatpchaCode')) {
to
if ($faqconfig->get('spam.enableCaptchaCode')) {

The rest of the update had worked correctly in my case, and the "captcha" trouble was resolved with the above typing error correction

Cheers,
Wolfgang
AidyPie
Posts: 15
Joined: Wed Oct 21, 2009 10:04 am
Location: UK

Re: Undefined index: spam.enableCatpchaCode in Configuration.php

Post by AidyPie »

Many thanks Wolfgang, that worked a treat! I should have noticed that, the typo was in the error message afteral!

However I ow get the following problem in the admin interface. I cannot turn captcha code back on!

Use a captcha code to allow public form submission (default: enabled).
phpMyFAQ notice [8]: Undefined index: spam.enableCatpchaCode in Configuration.php on line 135

phpMyFAQ notice [8]: Undefined index: spam.enableCatpchaCode in Configuration.php on line 143
/>


I can check the tickbox and press "Save Configuration", but when I look at it again the tick has gone and in have the same error again!

I notice that it too has the typo, so perhaps this is coming from a different file?

Regards,
Adrian
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Undefined index: spam.enableCatpchaCode in Configuration.php

Post by Thorsten »

Hi,

which language do you use?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
AidyPie
Posts: 15
Joined: Wed Oct 21, 2009 10:04 am
Location: UK

Re: Undefined index: spam.enableCatpchaCode in Configuration.php

Post by AidyPie »

Thorsten wrote:Hi,

which language do you use?

bye
Thorsten
Hi Thorsten,
I use the language_en.php.

I have also found the typo in these files if its any help?
Install Dir:
ibm_db2.update.sql.php
installer.php
mssql.update.sql.php
mysql.update.sql.php
mysqli.update.sql.php
pgsql.update.sql.php
sqllite.update.sql.php
sysbase.update.sql.php
update.php

Lang dir:
language_en.php
& after a quick windgrep, I believe its all the typo is in all the language files?

I have corrected typo's and ran another update on both my local and live copy.
My local copy works fine now, but the most important live one now has the same error on the admin configuration screen and pages where captcha code should be dispayed? This time the error does have the corrected captcha typo within it:

phpMyFAQ notice [8]: Undefined index: spam.enableCaptchaCode in Configuration.php on line 135

phpMyFAQ notice [8]: Undefined index: spam.enableCaptchaCode in Configuration.php on line 143
/>


Regards,
Adrian
AidyPie
Posts: 15
Joined: Wed Oct 21, 2009 10:04 am
Location: UK

Re: Undefined index: spam.enableCatpchaCode in Configuration.php

Post by AidyPie »

AidyPie wrote:
Thorsten wrote:Hi,

which language do you use?

bye
Thorsten
Hi Thorsten,
I use the language_en.php.

I have also found the typo in these files if its any help?
Install Dir:
ibm_db2.update.sql.php
installer.php
mssql.update.sql.php
mysql.update.sql.php
mysqli.update.sql.php
pgsql.update.sql.php
sqllite.update.sql.php
sysbase.update.sql.php
update.php

Lang dir:
language_en.php
& after a quick windgrep, I believe its all the typo is in all the language files?

I have corrected typo's and ran another update on both my local and live copy.
My local copy works fine now, but the most important live one now has the same error on the admin configuration screen and pages where captcha code should be dispayed? This time the error does have the corrected captcha typo within it:

phpMyFAQ notice [8]: Undefined index: spam.enableCaptchaCode in Configuration.php on line 135

phpMyFAQ notice [8]: Undefined index: spam.enableCaptchaCode in Configuration.php on line 143
/>


Regards,
Adrian
Wonder if anyone has any ideas on this ???
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Undefined index: spam.enableCatpchaCode in Configuration.php

Post by Thorsten »

Hi,

what's the value in the MySQL table "faqconfig" for this entry?

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
AidyPie
Posts: 15
Joined: Wed Oct 21, 2009 10:04 am
Location: UK

Re: Undefined index: spam.enableCatpchaCode in Configuration.php

Post by AidyPie »

Thorsten wrote:Hi,

what's the value in the MySQL table "faqconfig" for this entry?

bye
Thorsten
Hi,
it shows as 'false'.

Also I have just set this to 'true' in the database and I still get the following error message:
phpMyFAQ notice [8]: Undefined index: spam.enableCaptchaCode in Configuration.php on line 135

phpMyFAQ notice [8]: Undefined index: spam.enableCaptchaCode in Configuration.php on line 143
/>

^^and the Administration screen still shows "Use a captcha code to allow public form submission (default: enabled)" as unchecked???

Regards,
Adrian
AidyPie
Posts: 15
Joined: Wed Oct 21, 2009 10:04 am
Location: UK

Re: Undefined index: spam.enableCatpchaCode in Configuration.php

Post by AidyPie »

Hi again,
I have worked it out. The table cell name was a typo too! I have now changed the database cell name from spam.enableCatpchaCode to spam.enableCaptchaCode !

However, I now get the original problem that I had after upgrading to 2.5.2 previously :(

I now get this error after pressing the button to submit a answer to a question:

phpMyFAQ warning [2]: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in Builtin.php on line 74
Thorsten
Posts: 15725
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Undefined index: spam.enableCatpchaCode in Configuration.php

Post by Thorsten »

Hi,
AidyPie wrote:I have worked it out. The table cell name was a typo too! I have now changed the database cell name from spam.enableCatpchaCode to spam.enableCaptchaCode !

However, I now get the original problem that I had after upgrading to 2.5.2 previously :(
you didn't used the update script. The update script corrected this.
AidyPie wrote:I now get this error after pressing the button to submit a answer to a question:

phpMyFAQ warning [2]: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in Builtin.php on line 74
your PHP configuration for SMTP is wrong.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
AidyPie
Posts: 15
Joined: Wed Oct 21, 2009 10:04 am
Location: UK

Re: Undefined index: spam.enableCatpchaCode in Configuration.php

Post by AidyPie »

Thorsten wrote:Hi,
AidyPie wrote:I have worked it out. The table cell name was a typo too! I have now changed the database cell name from spam.enableCatpchaCode to spam.enableCaptchaCode !

However, I now get the original problem that I had after upgrading to 2.5.2 previously :(
you didn't used the update script. The update script corrected this.
AidyPie wrote:I now get this error after pressing the button to submit a answer to a question:

phpMyFAQ warning [2]: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in Builtin.php on line 74
your PHP configuration for SMTP is wrong.

bye
Thorsten
Er, I thought I did use the update script? :o MY mistake if I didn't, I do apologise!

I have it all working now, I have added to builtin.php the following to get around the SMTP problem:
ini_set('SMTP', *.*.*.*);
ini_set('smtp_port', 25);

All works fine now :)

Many thanks for taking the time to respond to me Thornsten, keep up the great work!
Post Reply