Author Topic: "ereg_replace() is deprecated" After switch to PHP 5.3.0  (Read 2470 times)

new12

  • Beginner
  • *
  • Posts: 35
"ereg_replace() is deprecated" After switch to PHP 5.3.0
« on: April 29, 2010, 17:21:41 pm »
Hello,
After I switched to PHP 5.3.0 I started getting this error in the backend:

Code: [Select]
Deprecated: Function ereg_replace() is deprecated in /home/mydrhorn/public_html/administrator/components/com_virtuemart/global.php  on line 137
Any ideas on how to fix this?
Thanks!

pjhagel

  • Beginner
  • *
  • Posts: 3
Re: "ereg_replace() is deprecated" After switch to PHP 5.3.0
« Reply #1 on: May 21, 2011, 08:08:29 am »
I'm having the same issue. Did you find a solution, or did anyone else?

pjhagel

  • Beginner
  • *
  • Posts: 3
Re: "ereg_replace() is deprecated" After switch to PHP 5.3.0
« Reply #2 on: May 21, 2011, 08:24:47 am »
Got it...


$GLOBALS['mosConfig_live_site'] = ereg_replace('/$','',SECUREURL);

to   

$GLOBALS['mosConfig_live_site'] = preg_replace('/$/','',SECUREURL);