Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

2 important problems with osc

ereg_replace() ereg()

  • You cannot reply to this topic
4 replies to this topic

#1 akbareshghi

  • Community Member
  • 11 posts
  • Real Name:akbar eshghi

Posted 25 January 2012, 09:38

Specifications of test machines:
Xampp 1.7.7
Windows 7
Oscommerce 2.2 with installed persian language ,Hejri date and various addons
First problem:
Deprecated: Function ereg_replace() is deprecated in C:\xampp\htdocs\2\includes\application_top.php on line 17
These codes: lines around 17
while (list($key, $value) = each($_GET)){
    $_GET[$key] = ereg_replace('[<>]', '', $value);
    unset($GLOBALS[$key]);
  }

Second problem:
Deprecated: Function ereg() is deprecated in C:\xampp\htdocs\2\includes\functions\farsi.php on line 25
These codes: lines around 25
function tep_formathejri($date) {
  if($date == null)
    return null;
  if (ereg ("([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})", $date, $datetime)) {
    return jdate("l، d F، Y", mktime(0,0,0,$datetime[2],$datetime[3],$datetime[1]));
  } else {
    return HEJRI_ERROR;
  }
}

Please help me troubleshooting this problem
I customized the OSC commerce of eshopmaster (osCommerce STS Edition v.0.98)
Thanks for replys

#2 toyicebear

  • Community Sponsor
  • 5,694 posts
  • Real Name:Nick
  • Location:World Citizen

Posted 25 January 2012, 10:05

You are using an old oscommerce version, use the new 2.3.1 and you will not have those errors
Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce

Check out my profile [click here] for information on professional services, custom coding, templates, SEO optimization, modifications, commercial support and help.

#3 DunWeb

  • Community Sponsor
  • 10,469 posts
  • Real Name:Chris Dunn
  • Gender:Male
  • Location:Tecumseh, Ontario, Canada N8N 1X8

Posted 25 January 2012, 12:52

@akbareshghi,


Here is a PHP tutorial if you want to learn how to replace the deprecated functions.




Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:

:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:

#4 geoffreywalton

  • Community Sponsor
  • 7,731 posts
  • Real Name:Geoffrey Walton
  • Gender:Male
  • Location:Norfolk, UK (close to the centre of the universe)

Posted 25 January 2012, 14:06

you couldtry lookingat this contribution

http://addons.oscommerce.com/info/7394

HTH

G
Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

Virus Threat Scanner
My Contributions
Basic install answers.
Click here for Contributions / Add Ons.
UK your site.
Site Move.
Basic design info.

For links mentioned in old answers that are no longer here follow this link Useful Threads.

If this post was useful, click the Like This button over there ======>>>>>.

#5 DunWeb

  • Community Sponsor
  • 10,469 posts
  • Real Name:Chris Dunn
  • Gender:Male
  • Location:Tecumseh, Ontario, Canada N8N 1X8

Posted 25 January 2012, 17:06

View Postgeoffreywalton, on 25 January 2012, 14:06, said:

you couldtry lookingat this contribution

http://addons.oscommerce.com/info/7394

HTH

G

That contribution does contain the exact fix for the application_top.php file but it won't help with the custom page error. I also expect that additional errors will present themselves as the two initial errors are corrected.



Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:

:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|: