Deprecated: Function ereg() is deprecated in C:wampwwwcatalogadminconfiguration.php on line 80

-----

page script error

Started by sreeju_tech, Aug 08 2009 10:39 AM
This topic has been archived. This means that you cannot reply to this topic.
4 replies to this topic

#-19   sreeju_tech

sreeju_tech

  • Members
  • 1 posts

Posted 08 August 2009 – 10:39 AM

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:wampwwwcatalogadminconfiguration.php on line 80
Deprecated: Function ereg() is deprecated in C:wampwwwcatalogadminconfiguration.php on line 80
2.
Admin>Shipping/Packaging 
Deprecated: Function ereg() is deprecated in C:wampwwwcatalogadminconfiguration.php on line 80 please help me!!!!!!!!!!!!!!!!!!!!!!!!!!! :huh:Edited by sreeju_tech, 08 August 2009 – 10:50 AM.

#-18   Jan Zonjee

Jan ZonjeeGovernor of Peace

  • osCommerce Crew
  • 7,028 posts

Posted 08 August 2009 – 11:22 AM

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

Deprecated: Function ereg() is deprecated in C:wampwwwcatalogadminconfiguration.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.


#-17   spooks

spooks

  • Members
  • 7,017 posts

Posted 15 August 2009 – 12:27 PM

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 pageset al.

#-16   Jan Zonjee

Jan ZonjeeGovernor of Peace

  • osCommerce Crew
  • 7,028 posts

Posted 15 August 2009 – 02:02 PM

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.


#-15   ecartz

ecartz

  • Members
  • 1,945 posts

Posted 16 August 2009 – 05:56 PM

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.

(262)

Share

visitors counter: since Sep 4th, 2012