Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

page script error


4 replies to this topic

#1 sreeju_tech

  • Community Member
  • 1 posts
  • Real Name:sreejith

Posted 08 August 2009, 10:39

I have installed osCommerce version 2.2C2
my server is : Apache/2.2.11 (Win32) PHP/5.3.0
my pages show some errors......
1. At the URL
http://localhost/catalog/admin/configuration.php?gID=1 (in the admin>My Store)
the page shows error:

Deprecated: Function ereg() is deprecated in C:\wamp\www\catalog\admin\configuration.php on line 80

Deprecated: Function ereg() is deprecated in C:\wamp\www\catalog\admin\configuration.php on line 80

2.

Admin>Shipping/Packaging

Deprecated: Function ereg() is deprecated in C:\wamp\www\catalog\admin\configuration.php on line 80
please help me!!!!!!!!!!!!!!!!!!!!!!!!!!! :huh:

Edited by sreeju_tech, 08 August 2009, 10:50.


#2 Jan Zonjee

  • Team Member
  • 7,001 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 08 August 2009, 11:22

View Postsreeju_tech, on Aug 8 2009, 12:39 PM, said:

Deprecated: Function ereg() is deprecated in C:\wamp\www\catalog\admin\configuration.php on line 80
Try replacing line 16-17 in catalog/includes/application_top.php and admin/includes/application_top.php
// set the level of error reporting
  error_reporting(E_ALL & ~E_NOTICE);
With:
// set the level of error reporting
  error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED);
Found this in the Drupal site by the way.

#3 spooks

  • Community Member
  • 7,017 posts
  • Real Name:Sam
  • Gender:Male
  • Location:UK

Posted 15 August 2009, 12:27

http://forums.oscommerce.com/index.php?showtopic=341737
Sam

Remember, What you think I ment may not be what I thought I ment when I said it.

Contributions:


Auto Backup your Database, Easy way

Multi Images with Fancy Pop-ups, Easy way

Products in columns with multi buy etc etc

Disable any Category or Product, Easy way

Secure & Improve your account pages et al.

#4 Jan Zonjee

  • Team Member
  • 7,001 posts
  • Real Name:Jan Zonjee
  • Gender:Male
  • Location:the Netherlands

Posted 15 August 2009, 14:02

View Postspooks, on Aug 15 2009, 02:27 PM, said:

Looking at the long list of deprecated features in PHP 5.3.0 I get the impression that if you want to replace all the code with deprecated functions we might as well do a total rewrite and use superglobals everywhere.
But then we might as well better start using osC v3. Pity there doesn't seem to be any progress in that area :blush:

So for the time being I believe adding the ~E_DEPRECATED will at least be needed too. Frankly, I'm amazed that these are the only error messages since for example all the session_ functions are deprecated too.

#5 ecartz

  • Community Member
  • 1,919 posts
  • Real Name:Matt
  • Gender:Male

Posted 16 August 2009, 17:56

View PostJan Zonjee, on Aug 15 2009, 10:02 AM, said:

So for the time being I believe adding the ~E_DEPRECATED will at least be needed too. Frankly, I'm amazed that these are the only error messages since for example all the session_ functions are deprecated too.
Not all of them, just the ones related to registering variables. Anyway, someone fixed those already:
  function tep_session_register($variable) {
	global $session_started;

	if ($session_started == true) {
	  if (PHP_VERSION < 4.3) {
		return session_register($variable);
	  } else {
		if (isset($GLOBALS[$variable])) {
		  $_SESSION[$variable] =& $GLOBALS[$variable];
		} else {
		  $_SESSION[$variable] = null;
		}
	  }
	}

	return false;
  }

  function tep_session_is_registered($variable) {
	if (PHP_VERSION < 4.3) {
	  return session_is_registered($variable);
	} else {
	  return isset($_SESSION) && array_key_exists($variable, $_SESSION);
	}
  }

  function tep_session_unregister($variable) {
	if (PHP_VERSION < 4.3) {
	  return session_unregister($variable);
	} else {
	  unset($_SESSION[$variable]);
	}
  }
The deprecated version is only used for PHP versions less than 4.3. Since they weren't deprecated until 5.3, that will work fine.
Always backup before making changes.