Guest Posted July 18, 2009 Share Posted July 18, 2009 After installing OS Commerce in my local system I got the following error or message: Deprecated: Function eregi() is deprecated in C:\wamp\www\catalog\includes\classes\language.php on line 87 The line 87 : if (eregi('^(' . $value . ')(;q=[0-9]\\.[0-9])?$', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { 88: $this->language = $this->catalog_languages[$key]; 89: break 2; } Please help. Thanks in advance Ronnie Link to comment Share on other sites More sharing options...
Guest Posted July 18, 2009 Share Posted July 18, 2009 See if this works if (preg_match('/^(' . $value . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { $this->language = $this->catalog_languages[$key]; ereg is deprecated in PHP 5.3 but I don't have PHP 5.3 so I don't know if that will work. Link to comment Share on other sites More sharing options...
Guest Posted July 19, 2009 Share Posted July 19, 2009 Thanks! it works. Link to comment Share on other sites More sharing options...
sincn Posted October 27, 2009 Share Posted October 27, 2009 After installing OS Commerce in my local system I got the following error or message: Deprecated: Function eregi() is deprecated in C:\wamp\www\catalog\includes\classes\language.php on line 87 The line 87 : if (eregi('^(' . $value . ')(;q=[0-9]\\.[0-9])?$', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { 88: $this->language = $this->catalog_languages[$key]; 89: break 2; } Please help. Thanks in advance Ronnie I also got the same issue. really no idea about this. i am a fresh Link to comment Share on other sites More sharing options...
BryceJr Posted October 27, 2009 Share Posted October 27, 2009 Go to sourceforge.net and look for an older version of WAMP. --OR-- Download and install an older version of XAMPP. Download instructions ->here Link to comment Share on other sites More sharing options...
MrPhil Posted October 27, 2009 Share Posted October 27, 2009 Or better yet, fix the PHP code to avoid using deprecated functions: http://www.oscommerce.com/forums/topic/341737-function-ereg-replace-is-deprecated/page__p__1434612__hl__eregi%20deprecated__fromsearch__1entry1447311 Link to comment Share on other sites More sharing options...
kolioali Posted December 23, 2009 Share Posted December 23, 2009 Hi, please i need a link to download and install PHP 5.2.x on a MS Windows machine using a the latest WAMP server . Thank you so much Link to comment Share on other sites More sharing options...
MrPhil Posted December 23, 2009 Share Posted December 23, 2009 You're much better off fixing your osC code to avoid "deprecated function" warnings than to downgrade PHP levels. It's not a lot of work, and when PHP 6.0 finally rolls out, you won't be caught with your pants down (you will have to fix osC at that point). In the mean time, search around for the magic spell to suppress "deprecated" errors (I seem to recall something about an ini.set call with ~DEPRECATED added to it). Just don't forget to get around some time to updating osC. Link to comment Share on other sites More sharing options...
design_idea Posted April 15, 2010 Share Posted April 15, 2010 See if this works if (preg_match('/^(' . $value . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { $this->language = $this->catalog_languages[$key]; ereg is deprecated in PHP 5.3 but I don't have PHP 5.3 so I don't know if that will work. Thanks buddy. rally amazing solution. now its working proper. really good solution Link to comment Share on other sites More sharing options...
shyamcdac Posted May 20, 2010 Share Posted May 20, 2010 See if this works if (preg_match('/^(' . $value . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { $this->language = $this->catalog_languages[$key]; ereg is deprecated in PHP 5.3 but I don't have PHP 5.3 so I don't know if that will work. Link to comment Share on other sites More sharing options...
shyamcdac Posted May 20, 2010 Share Posted May 20, 2010 ya this is working Thanks..... Link to comment Share on other sites More sharing options...
dmrobi Posted July 7, 2010 Share Posted July 7, 2010 Thank you so much... its working. Link to comment Share on other sites More sharing options...
Guest Posted July 8, 2010 Share Posted July 8, 2010 For future reference, I have uploaded complete instructions and all 24 'drop on top' files for RC2a to make the site PHP 5.3 compatible. You can find it here: http://addons.oscommerce.com/info/7394 Chris Link to comment Share on other sites More sharing options...
sangre Posted September 3, 2010 Share Posted September 3, 2010 Hi DunWeb, Thank you very much for the addons ...it works Link to comment Share on other sites More sharing options...
designcraft Posted September 14, 2010 Share Posted September 14, 2010 For future reference, I have uploaded complete instructions and all 24 'drop on top' files for RC2a to make the site PHP 5.3 compatible. You can find it here: http://addons.oscommerce.com/info/7394 Chris Thank you very much for the contribution! You are a life saver! It works great! Link to comment Share on other sites More sharing options...
Guest Posted September 14, 2010 Share Posted September 14, 2010 Lindsay, No thanks needed as I did not write the contents of that download, I simple compiled information already available on the GITHUB repository and placed them in the add-on area to help members resolve their PHP 5.3 compatibility issues. All thanks goes to the original authors and the OSC Development Team. :thumbsup: Chris Link to comment Share on other sites More sharing options...
The ANT man Posted November 14, 2010 Share Posted November 14, 2010 thanks, exactly what i needed. Link to comment Share on other sites More sharing options...
mirza_yasir4 Posted May 30, 2011 Share Posted May 30, 2011 If I down grade php version , exactly which version should I install? Thanks and Regards Yasir Imran Mirza My Contributions Link to comment Share on other sites More sharing options...
Guest Posted May 30, 2011 Share Posted May 30, 2011 Not sure why you would choose to downgrade, but I wouldn't use any version older than RC2a. If you choose to use RC2a, ensure you read the security forums to ensure the site includes all of the security patches and recommended contributions. I DO suggest that you use v2.3.1 as it contains all of the patches and has a stronger base code. Chris Link to comment Share on other sites More sharing options...
multimixer Posted May 30, 2011 Share Posted May 30, 2011 If I down grade php version , exactly which version should I install? Do you want to downgrade osCommerce version or php version? My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
shuuzzz Posted November 8, 2011 Share Posted November 8, 2011 Hi, I am new to php.. can someone help me with this $email_body_no_url = eregi_replace('\[url\]','',eregi_replace('\[/url\]','',$email_body)); Link to comment Share on other sites More sharing options...
MrPhil Posted November 8, 2011 Share Posted November 8, 2011 If it's to get rid of the deprecated functions warnings, downgrade PHP to 5.2. However, in the long run you'll be a lot better off upgrading osC to 2.3.1 (with PHP 5.3) or fixing the osC code to use non-deprecated functions. Link to comment Share on other sites More sharing options...
MrPhil Posted November 8, 2011 Share Posted November 8, 2011 $email_body_no_url = eregi_replace('\[url\]','',eregi_replace('\[/url\]','',$email_body)); If you search around a bit, you'll find lots of discussion on this subject. To fix this particular case, $email_body_no_url = preg_replace('/\[url\]/i', '', preg_replace('/\[/url\]/i', '', $email_body)); I think that's the proper incantation. You can check at www.php.net and look up the preg_replace and eregi_replace function syntax. Link to comment Share on other sites More sharing options...
Landis Posted December 5, 2011 Share Posted December 5, 2011 See if this works if (preg_match('/^(' . $value . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { $this->language = $this->catalog_languages[$key]; ereg is deprecated in PHP 5.3 but I don't have PHP 5.3 so I don't know if that will work. THANK YOU! Спасибо, Landis. p.s., I also needed this: http://www.oscommerce.com/forums/topic/381320-since-were-updating-deprecated-session-and-ereg-solutions/page__hl__eregi__fromsearch__1 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.