genoMU69200 Posted September 24, 2013 Share Posted September 24, 2013 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 453Deprecated: Function eregi() is deprecated in /home/content/03/11789103/html/formmailer.php on line 460Deprecated: Function eregi() is deprecated in /home/content/03/11789103/html/formmailer.php on line 338Deprecated: 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 More sharing options...
dalecosp Posted September 24, 2013 Share Posted September 24, 2013 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. Link to comment https://forums.phpfreaks.com/topic/282426-deprecated-error-on-formmailer/#findComment-1451105 Share on other sites More sharing options...
AbraCadaver Posted September 24, 2013 Share Posted September 24, 2013 So if they are really regex expressions being used (if not use strpos()) then if the regex does not contain / then change all eregi() patterns to: preg_match("/$header_injection_regex/i", $whatever) Link to comment https://forums.phpfreaks.com/topic/282426-deprecated-error-on-formmailer/#findComment-1451109 Share on other sites More sharing options...
genoMU69200 Posted September 25, 2013 Author Share Posted September 25, 2013 thank you both! Link to comment https://forums.phpfreaks.com/topic/282426-deprecated-error-on-formmailer/#findComment-1451156 Share on other sites More sharing options...
davidannis Posted September 25, 2013 Share Posted September 25, 2013 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. Link to comment https://forums.phpfreaks.com/topic/282426-deprecated-error-on-formmailer/#findComment-1451157 Share on other sites More sharing options...
genoMU69200 Posted September 25, 2013 Author Share Posted September 25, 2013 thanks all. Link to comment https://forums.phpfreaks.com/topic/282426-deprecated-error-on-formmailer/#findComment-1451202 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.