Spambot email plugin error

By hiroko - December 22, 2018

Hello,

Thanks to all the members for the great update on v3.5!

I just updated my cmsb to v3.5 and updated php to 7.2 on my server. 

One problem for now. I'm getting errors from the spambot email pulgin. 

#0 _errorlog_logErrorRecord() called at [/public_html/cmsb/lib/errorlog_functions.php:64]
#1 _errorlog_catchRuntimeErrors() called at [/public_html/cmsb/plugins/spambotEmailProtector2_01/spambotEmailProtector.php:35]
#2 SEP_replaceEmails() called at [/public_html/index.php:95]

Is there any update I should work on?

Thanks beforehand.

Hiroko

Spambot email plugin error & Create Record Here plugin.

By hiroko - December 22, 2018 - edited: December 22, 2018

Hi again,

I've noticed that the Create Record Here plugin v1.02 is also not working, meaning the "create here" link doesn't show up on the cms.

I downgraded my server's php version to 7.1 and the spambot email plugin stop getting errors, so the problem seems to be the php version.

Thanks again,

Hiroko

Spambot email plugin error & Create Record Here plugin.

By daniel - December 27, 2018

Hi Hiroko,

Those are some interesting issues, as I was able to use both plugins successfully while running PHP 7.2.4 and CMSB v3.50.

Could you confirm that you've copied the whole error message? In the Developer Log, it'll be in the "Error" field - it looks like you may have just copied the "Backtrace" field, which is helpful, but doesn't give the whole picture.

As well, can you check in the Developer Log if there are any errors relating to the Create Record Here plugin?

Thanks,

Daniel
Technical Lead
interactivetools.com

By hk - January 11, 2019 - edited: January 11, 2019

Hi,

I got the same problem on SpamBot with PHP 7.2 and v3.35:

Array
(
[logType] => runtime
[errno] => 8192
[errstr] => Function create_function() is deprecated
[errfile] => /home/adonai/public_html/cms/plugins/spambotEmailProtector 2.01/spambotEmailProtector.php
[errline] => 41
[errcontext] => *** in symbol table field above ***
)

Thanks

Helmut

Spambot email plugin error & Create Record Here plugin.

By hiroko - January 12, 2019 - edited: January 12, 2019

Hi Daniel,

Thanks for your reply. I'm very sorry for the late response.

And thank you Helmut for reporting.

This is the error I get (raw log data) when I change to php 7.2.

Array
(
[logType] => runtime
[errno] => 8192
[errstr] => Function create_function() is deprecated
[errfile] => /home/xx.com/public_html/cmsAdmin/plugins/spambotEmailProtector2_01/spambotEmailProtector.php
[errline] => 35
[errcontext] => *** in symbol table field above ***
)

And this is from the Symbol Table

Array
(
[content] => Event Detail
[EMAIL_ONLY] => ([\w\-\.]+@[\w\-\.]+\.[A-Za-z]{2,8})
[mailtoRegexp] => (<[^>]*?['"])mailto:([\w\-\.]+@[\w\-\.]+\.[A-Za-z]{2,8})(['"][^>]*>)
[php_errormsg] => Undefined index: SEP_DISABLED
)

For the Create Record Here Plugin, I think I was wrong about it. I updated php version again to 7.2 for testing and it was working.

Thank you for your help. 

Hiroko

Spambot email plugin error & Create Record Here plugin.

By daniel - January 14, 2019

Hey all,

Thanks for the error reports! The error is being caused by a function that is now deprecated in PHP 7.2. There is no urgency to replace this function as it should still work for the near future, so one option you have is to modify the plugin to silence these errors by adding the "@" symbol in front of each function call. These references are in the spambotEmailProtector.php file on lines 35, 41, and 47, and would look something like this:

$mailtoReplacement = @create_function(...

Additionally, I've just released a new version of the plugin (https://www.interactivetools.com/plugins/spambot-email-protector/) which has replaced the deprecated functions entirely.

Let me know if I can help with anything else!

Thanks,

Daniel
Technical Lead
interactivetools.com