Results 1 to 5 of 5

Thread: ereg_replace() is deprecated ?

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2009
    Posts
    968

    ereg_replace() is deprecated ?

    Hi guys, Im getting this error when using php 5.3:

    Code:
    Deprecated: Function ereg_replace() is deprecated in etc.........
    When I remove the following section of code from my file the error goes away. I know "ereg_replace()" is deprecated as of php version 5.3, but the confusing part is im not using "ereg_replace()" anywhere. As you can see from the code below its not being used. Any ideas what could be wrong ?

    PHP Code:
    $baseurl="http://".$_SERVER['HTTP_HOST'];
    $pos strtolower($baseurl);
    $url2 = @parse_url($pos); 
    $url3 $url2['host']; 
    $url=str_replace("www.","",$url3);

    $sites strtolower(HOST);
    $sites2 = @parse_url($sites); 
    $sites3 $sites2['host']; 
    $baseurlfinal=str_replace("www.","",$sites3);

    if(
    $url==$baseurlfinal) {
    $md5=md5(md5($baseurlfinal));
    $sh1=sha1($baseurlfinal);
    $string=$sh1.$md5;
    $key=substr($string45);
    $keyfinal=strrev("$key"); 

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2009
    Posts
    968

    Re: ereg_replace() is deprecated ?

    Nobody got any ideas ?

  3. #3
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: ereg_replace() is deprecated ?

    You are not using it in there. But the error might say which line you are having it. Can you please post the whole error message including the line number. Or mark which line is causing it ?


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Aug 2009
    Posts
    968

    Re: ereg_replace() is deprecated ?

    It says line 1, but thats the php tag, weird as hell.
    Attached Images Attached Images  

  5. #5
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: ereg_replace() is deprecated ?

    That error means line 1 of code which is being executed using eval. The (2) after xxxx.php means line two of that file. Is there more code you're not showing us? I can't see anything in the code in the first post that should cause that error.

Posting Permissions

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



Click Here to Expand Forum to Full Width