0

I am working with SEO PHP scripts and I am just following Google SEO scripts. When I used the search terms I got an error like the following:

Deprecated: Function eregi() is deprecated in E:\wamp\www\subgoogle\nusoap.php on line 3876

Deprecated: Function ereg() is deprecated in E:\wamp\www\subgoogle\nusoap.php on line 3896

Deprecated: Function ereg() is deprecated in E:\wamp\www\subgoogle\nusoap.php on line 1451

How should I remove that error function? Is there any need to use a library?

user664833
  • 18,397
  • 19
  • 91
  • 140
lavan
  • 67
  • 1
  • 3
  • 8
  • 2
    You should use preg_* functions . Check if there is a new version of the nusoap library which doesn't use the deprecated functions. Or, to take an easy way out, you can suppress error messages of 'Deprecated' type by changing the error_reporting arguments. – Srisa Jan 28 '11 at 05:44
  • 5
    **FATAL ERROR: Not [using the Search Function](http://stackoverflow.com/search?q=ereg+deprecated) is deprecated.** – Gordon Jan 28 '11 at 09:10
  • @Iavan - Stack Overflow, strives to be a technical resource akin to encyclopedias. As such, the writing style should preclude pleasantries and formalities such as "hello", "thank you", "help me", etc., with exactly the same reasoning that "hope this helps" isn't at the bottom of any Wikipedia page. – user664833 Mar 18 '15 at 15:43

5 Answers5

2

eregi() function has been DEPRECATED as of PHP 5.3.0. Relying on this feature is highly discouraged.

you can use preg_match().

Poonam Bhatt
  • 10,154
  • 16
  • 53
  • 72
0

you may want to check this brunch http://sourceforge.net/projects/nusoapforphp53/ it works for me

0

Change ereg() to mb_ereg.hope which fixes your error. Good luck!

Opal
  • 81,889
  • 28
  • 189
  • 210
0

http://php.net/manual/en/function.eregi.php

Note:

As of PHP 5.3.0, the regex extension is deprecated in favor of the PCRE extension. Calling this function will issue an E_DEPRECATED notice. See the list of differences for help on converting to PCRE.

You need to convert every use of ereg* to an equivalent function of the preg_* family. Or, as @Srisa rightly points out, look for an updated version of the library/script in question.

Community
  • 1
  • 1
deceze
  • 510,633
  • 85
  • 743
  • 889
0

error_reporting( 0 ) ;
That's how you can eliminate the symptoms, but to cure the disease you just shouldn't use POSIX regular expressions, change them to PCRE

kos
  • 478
  • 2
  • 10