Jump to content

Deprecated error on formmailer


genoMU69200

Recommended Posts

Hello friends -

 

I recently used a pre coded formmailer and adjusted the form content. When I tested the form, it went through but 4 deprecated  errors popped up. I have used the formmailer before with success. I am having trouble figuring out the error on my own. Below are the errors that show upon completing the form:

 

Deprecated: Function eregi() is deprecated in /home/content/03/11789103/html/formmailer.php on line 453

Deprecated: Function eregi() is deprecated in /home/content/03/11789103/html/formmailer.php on line 460

Deprecated: Function eregi() is deprecated in /home/content/03/11789103/html/formmailer.php on line 338

Deprecated: Function eregi() is deprecated in /home/content/03/11789103/html/formmailer.php on line 546

Message Sent

Thank you for your inquiry

 

And the lines that correspond to the errors. I have researched the error and it looks like the errors are due to the formmailers use of eregi:

 

453    if(eregi($header_injection_regex,$_POST[$reply_to_field[$config]]))
            $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";

 

460   if(eregi($header_injection_regex,$_POST[$reply_to_name[$config]]))
            $security_filter.="<li>Header injection attempt detected, mail aborted.</li>\n";

 

338  if($cur_email=="" || !eregi($regex, $cur_email))

 

546  if($cur_email=="" || !eregi($regex, $cur_email))

 

 

Thank you all in advance for any guidance given.

 

Regards,

 

Gene

Link to comment
https://forums.phpfreaks.com/topic/282426-deprecated-error-on-formmailer/
Share on other sites

All the error is saying is that "ereg()"  (and "eregi()", which is what this script is using) are now deprecated in PHP.  They will, one day, be removed and your script won't work when the language is updated to that version, whatever/whenever that is.

So, logically, you should update the script to use the PCRE functions instead.

I think I recognize the problem. Looks to me like you are using Tectite's formmail but are many versions back. As an alternative to fixing it yourself, you could upgrade to a newer version at http://www.tectite.com They've added some new features.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.