genoMU69200 Posted September 24, 2013 Share Posted September 24, 2013 (edited) 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 Edited September 24, 2013 by genoMU69200 Quote Link to comment 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. Quote Link to comment 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) Quote Link to comment Share on other sites More sharing options...
genoMU69200 Posted September 25, 2013 Author Share Posted September 25, 2013 thank you both! Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
genoMU69200 Posted September 25, 2013 Author Share Posted September 25, 2013 thanks all. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.