Jump to content

Archived

This topic is now archived and is closed to further replies.

sreeju_tech

page script error

Recommended Posts

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:

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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 back up before making changes.

Share this post


Link to post
Share on other sites

×