Harald Ponce de Leon Posted July 24, 2012 Share Posted July 24, 2012 Hi All.. A PHP 5.4 compatibility fix will be included in v2.3.3 to make v2.3.x work under PHP 5.4 installations. The simple fix, which is not PHP 5.4 specific but rather a general bug fix, can be seen at: https://github.com/osCommerce/oscommerce2/commit/9a4d1e6ab9ed87bdc20543995448b114364426b9 This should not have an affect on Add-Ons. If an Add-On is affected, it will be noted similar to what has been done for the v2.3.2 upgrade guide. Kind regards, , osCommerce Link to comment Share on other sites More sharing options...
burt Posted July 24, 2012 Share Posted July 24, 2012 I just upgraded my testenv server to 5.4.5, and this fix seems to work well. Thanks Harald. Link to comment Share on other sites More sharing options...
tgely Posted July 24, 2012 Share Posted July 24, 2012 Hi @@Harald Ponce de Leon what will be the new in v2.3.3 beyond the php5.4 fixes and could you let us know about it? I think exept only some exclusive contributions not need to rewrites so it will be a big project in the future. PHP5.4 fixes wont be stop in the core for community. Do not you afraid of too many brain resources will be need on it and the v3 will be stop for a while which really use PHP5.4 abilities? Regards, Gergely osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
♥toyicebear Posted July 24, 2012 Share Posted July 24, 2012 For PHP5.4 would it not also make sense to do this small change in the tep_session_is_registered function? return isset($_SESSION) && array_key_exists($variable, $_SESSION); to return isset($_SESSION[$variable]) && array_key_exists($variable, $_SESSION); Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted July 24, 2012 Author Share Posted July 24, 2012 Hi Tóth.. what will be the new in v2.3.3 beyond the php5.4 fixes and could you let us know about it? I think exept only some exclusive contributions not need to rewrites so it will be a big project in the future. PHP5.4 fixes wont be stop in the core for community. Do not you afraid of too many brain resources will be need on it and the v3 will be stop for a while which really use PHP5.4 abilities? A list of changes so far confirmed for v2.3.3 can be seen here: https://github.com/osCommerce/oscommerce2/compare/master...upgrade233#files_bucket After v3.1 (user ready release) replaces v3.0, we can look at a v3.2 development branch for optimizing to PHP 5.4, possibly even PHP 5.5: http://nikic.github.com/2012/07/10/What-PHP-5-5-might-look-like.html Kind regards, , osCommerce Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted July 24, 2012 Author Share Posted July 24, 2012 Hi Nick.. For PHP5.4 would it not also make sense to do this small change in the tep_session_is_registered function? isset() returns false for null values (eg, $foo = null), which is why array_key_exists() is used. Kind regards, , osCommerce Link to comment Share on other sites More sharing options...
♥FWR Media Posted July 24, 2012 Share Posted July 24, 2012 return isset($_SESSION[$variable]) && array_key_exists($variable, $_SESSION); That is wrong anyway Nick isset($_SESSION[$variable]) effectively can ( sort of ) do the same job as array_key_exists($variable, $_SESSION) so you duplicated code, but also as Harald mentioned it can have unwanted side effects. Your code also didn't check whether $_SESSION is set so would trigger an error if it were not set. If $_SESSION may not be set however ( PHP 4 <= 4.1.0 ) then you would also I suppose check if it were an array as well or the code could generate an error. return isset($_SESSION) && is_array($_SESSION) && array_key_exists($variable, $_SESSION); Re: isset() vs array_key_exists(), if I am checking if a variable is set I use isset() and if I am checking if an array key exists I would use array_key_exists() which is their correct usage, sometimes however with multi dimensional arrays array_key_exists can become unweildy which is why I think many get a bit too used to using isset(). Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥toyicebear Posted July 24, 2012 Share Posted July 24, 2012 Just mentioned it because prior to the above linked fix at github, doing the small change mentioned made 2.3.1 run just fine on PHP5.4. Basics for osC 2.2 Design - Basics for Design V2.3+ - Seo & Sef Url's - Meta Tags for Your osC Shop - Steps to prevent Fraud... - MS3 and Team News... - SEO, Meta Tags, SEF Urls and osCommerce - Commercial Support Inquiries - OSC 2.3+ How To To see what more i can do for you check out my profile [click here] Link to comment Share on other sites More sharing options...
♥kymation Posted July 24, 2012 Share Posted July 24, 2012 Could we also get some old bug fixes included? Bug #134 has been around since 2010, and a working fix has been posted in the bug thread. This is a confirmed problem that prevents customers from logging in. There are many other open bugs that should be looked at and closed if possible. Also, jQuery, jQuery UI, and the Redmond theme should be updated to the latest version. The obsolete version that ships with osCommerce currently causes problems when users try to create or download a new theme using the current version. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted July 24, 2012 Author Share Posted July 24, 2012 If $_SESSION may not be set however ( PHP 4 <= 4.1.0 ) then you would also I suppose check if it were an array as well or the code could generate an error. That wouldn't make sense as PHP < 4.1 doesn't have superglobals. In tep_session_is_registered(), $_SESSION is accessed as a superglobal if PHP >= 4.3 is used - it should be safe to assume it is an array. , osCommerce Link to comment Share on other sites More sharing options...
Harald Ponce de Leon Posted July 24, 2012 Author Share Posted July 24, 2012 Could we also get some old bug fixes included? .... Also, jQuery, jQuery UI, and the Redmond theme should be updated to the latest version. All bug reports will be reviewed for v2.3.3. In addition, older libraries and modules will be updated. , osCommerce Link to comment Share on other sites More sharing options...
♥FWR Media Posted July 24, 2012 Share Posted July 24, 2012 @@Harald Ponce de Leon Yup .. guess who wasn't in the function scope :) Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥kymation Posted July 24, 2012 Share Posted July 24, 2012 @@Harald Ponce de Leon Thanks Harald. Regards Jim See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 27, 2012 Share Posted September 27, 2012 I just came across a posting on the dutch forum which basically says that any special characters when used in PHP 5.4 together with ISO-8859-1 will cause the field to go blanc in the database because of the way htmlspecialchars treats illegal characters. http://forums.oscommerce.nl/index.php?showtopic=26033&pid=155510&st=0entry155510 See http://nl.php.net/ma...ecialchars.php: 1. If omitted, the default value for this argument is ISO-8859-1 in versions of PHP prior to 5.4.0, and UTF-8 from PHP 5.4.0 onwards. 2. If the input string contains an invalid code unit sequence within the given encoding an empty string will be returned, unless either the ENT_IGNORE or ENT_SUBSTITUTE flags are set. This was an eyeopener for me as I still have my site in ISO-8859-1. So my question is twofold: 1) how do I go from a MS2.2 installation to version 2.3.3 UTF-8, what are the proper steps ? 2) shouldn't htmlspecialchars provide the necessary flags based on the char-set defined ? KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥Biancoblu Posted September 28, 2012 Share Posted September 28, 2012 Does this happen when using the actual special character like "é" or when using its HTML code, or both? ~ Don't mistake my kindness for weakness ~ Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted September 28, 2012 Share Posted September 28, 2012 the actual character like "é" KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
syscon Posted October 8, 2012 Share Posted October 8, 2012 Hi All.. A PHP 5.4 compatibility fix will be included in v2.3.3 to make v2.3.x work under PHP 5.4 installations. The simple fix, which is not PHP 5.4 specific but rather a general bug fix, can be seen at: https://github.com/osCommerce/oscommerce2/commit/9a4d1e6ab9ed87bdc20543995448b114364426b9 This should not have an affect on Add-Ons. If an Add-On is affected, it will be noted similar to what has been done for the v2.3.2 upgrade guide. Kind regards, Will this fix work with v.2.2 RC2 ? #Joseph Link to comment Share on other sites More sharing options...
syscon Posted October 8, 2012 Share Posted October 8, 2012 Will this fix work with v.2.2 RC2 ? I would like to report that this fix works with v.2.2 RC2 as well. #Joseph Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.