SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2009
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hello friends pls help me for this issue

    hello friends after installing my xampp and running the program i am getting a new error and i dont know how to make it off before i am having one xampp in my system in tht it is working properly according the virus issue i cleaned my system and installed new no i am getting the following error pls help to remove this


    Error encountered:
    ERRNO: 8192
    TEXT: Function eregi() is deprecated
    LOCATION: E:\xampp\xampp\htdocs\boom-2009-09-08\validate.class.php, line 505

    505 line is

    private function validateFullName($value)
    {
    // trim and escape input value
    $value = trim($value);
    // empty user name is not valid
    if ($value && eregi('^[a-zA-Z-]*$',$value))
    {
    return '1'; // you can go
    }
    else

    i am not finding any error so what.....pls help me

  2. #2
    SitePoint Guru
    Join Date
    Jan 2005
    Location
    heaven
    Posts
    953
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Your use of eregi is the error. TEXT: Function eregi() is deprecated Try preg_match instead.
    Creativity knows no other restraint than the
    confines of a small mind.
    - Me
    Geekly Humor
    Oh baby! Check out the design patterns on that framework!

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2009
    Posts
    152
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    any other way to get through this issue pls because i have so many fuctions

  4. #4
    @php.net Salathe's Avatar
    Join Date
    Dec 2004
    Location
    Edinburgh
    Posts
    1,398
    Mentioned
    65 Post(s)
    Tagged
    1 Thread(s)
    You can suppress the E_DEPRECATED notice by using an appropriate error_reporting level, for example by calling error_reporting(E_ALL ^ E_DEPRECATED) before any notices are generated (like at the very top of your script). That however is just ignoring the problem. To fix it, you should really be replacing any calls to POSIX functions (ereg*, etc.) with PCRE functions (preg*) as the latter are supported and aren't deprecated.
    Salathe
    Software Developer and PHP Manual Author.

  5. #5
    SitePoint Evangelist
    Join Date
    Jun 2006
    Location
    Wigan, Lancashire. UK
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if (preg_match('/^[a-zA-Z-]*$/',$value))
    ---
    Development Projects:
    PHPExcel
    PHPPowerPoint


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •