joshd2007 Posted October 30, 2012 Share Posted October 30, 2012 Hello, I use Mafia Raven Scripts, but our host made some changes to the PHP version and it messed up one of our scripts for it because its trying to use ereg, ereg_replace, etc. I have read on the PHP website trying to find out how to fix this, but I cannot seem to grasp it. Can you please provide some help. security.php Quote Link to comment https://forums.phpfreaks.com/topic/270092-need-help/ Share on other sites More sharing options...
ManiacDan Posted October 30, 2012 Share Posted October 30, 2012 ereg has been deprecated, that means you can't use it. The "changes" were an actual PHP version upgrade. To fix it, you have to use an alternative, like preg_match. In general, what you do is: ereg('foo', $str); Change to: preg_match('/foo/', $str); Just add the slashes around the string. Now, if you're calling the other ereg functions like eregi you'll need to do use flags on the expression, etc. Find all the instances of ereg and see which ereg functions they are. If it's just ereg(), you're done. If there's more, you may need to learn more about this transition or pay someone to do this fix. Quote Link to comment https://forums.phpfreaks.com/topic/270092-need-help/#findComment-1388843 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.