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($string, 45);
$keyfinal=strrev("$key");
Re: ereg_replace() is deprecated ?
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 ?
:wave:
1 Attachment(s)
Re: ereg_replace() is deprecated ?
It says line 1, but thats the php tag, weird as hell.
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.