-1

Possible Duplicate:
Why is ereg deprecated in PHP?

I was uploading files to server but I got the following error

Deprecated: Function ereg_replace() is deprecated in /home/vicedu/public_html/includes
/functions/sessions.php on line 112

What can I do? Please help

Community
  • 1
  • 1
Lucky13
  • 11,393
  • 7
  • 25
  • 36
  • A deprecated function is one which is supposed to avoid and a better replacement of that function exists in the language library, in your case you should use preg_replace() instead of ereg_replace(), You can see docs here: http://php.net/manual/en/function.preg-replace.php – Aqeel Ahmad Feb 25 '11 at 07:40
  • Please point out why none of the answer in http://stackoverflow.com/search?q=ereg+deprecated helped solve your question. – Gordon Feb 25 '11 at 08:13
  • definite duplicate of [Why is `ereg` deprecated in PHP?](http://stackoverflow.com/questions/3078993/why-is-ereg-deprecated-in-php) – Gordon Feb 25 '11 at 08:14

2 Answers2

3

The function ereg_replace() is deprecated that mean superseded and should be avoided form php in replace of ereg_replace() you can use preg_replace. this will definately solve your problem.

Sujeet
  • 1,780
  • 3
  • 16
  • 33
1

You can switch to preg_replace since eregi has been deprecated, and update your pattern Since the preg_* variant is PCRE syntax.

Russell Dias
  • 70,980
  • 5
  • 54
  • 71