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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.