Running oscommerce in php5.3 often causes deprecated: function ereg () is deprecated in... and deprecated: function ereg_replace () is deprecated in... error messages of these types.
The reason is that php5.3 and later versions do not support the ereg () function, but use the preg_match () function. They do not support the ereg_replace () function, but use the preg_replace () function.
Solution 1: Return to php5.2
Solution 2: continue to use php5.3, but modify the 460 rows of devel/devel. modul: if ($ errno & (e_all ^ e_notice) {to if ($ errno &
(E_all &~ E_notice &~ E_deprecated)} ignores the deprecated error.
Solution 3: Change unsupported functions to supported functions.
For example:
Deprecated: function eregi () is deprecated in D: \ www \ oscommerce \ catalog \ Classes des \ Classes \ language. php on line 87
Then, the 87 rows
If (eregi ('^ ('. $ value. ') (; q = [0-9] \. [0-9])? $ ', $ This-> browser_ages [$ I])
Changed:
If (preg_match ('/^ ('. $ value. ') (; q = [0-9] \. [0-9])? $/I ', $ this-> browser_ages [$ I])
For example:
Deprecated: function ereg_replace () is deprecated in c: \ Wamp \ www \ des \ functions \ General. php on line 61
Then
$ String = ereg_replace ('+', '', trim ($ string ));
Changed:
$ String = preg_replace ('{+}', '', trim ($ string ));
Similarly, other similar errors can be modified according to the syntax of the above two functions.
Cause and solution of deprecated: function ereg_replace () is deprecated in