Jump to content

Need Help


joshd2007

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/270092-need-help/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/270092-need-help/#findComment-1388843
Share on other sites

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.