Jump to content
Latest News: (loading..)
rebelsheep

New Install PHP 7.2 sizeof()

Recommended Posts

Hi, I'm running lastest version of OSCommerce 2.3.4.1, PHP 7.2 and MySQL 5.5.
 
It's my first installation of OSCommerce. When I go in to Admin > Categories/Products I get lots of errors relating to sizeof().
 
Warning: sizeof(): Parameter must be an array or an object that implements Countable in /htdocs/domains/mysite.rocks/catalog/admin/includes/functions/general.php on line 89
 
Also for categories.php on line 901

Is anyone else experiencing this? Any clues?

Thank you.

Share this post


Link to post
Share on other sites
30 minutes ago, rebelsheep said:

lastest version of OSCommerce 2.3.4.1

unfortunately this is meaningless! are using official,Gold, edge, frozen or some mish mash of  one of these. Your only way of knowing is to remember what link you used to down load and when it was download.


 

Share this post


Link to post
Share on other sites

Ok the official version will have issues with  PHP 7.2!

Your options are fix the errors or drop your PHP version to 5.6.

Or use the Community Version which will run on 7.2 but is unofficial.

 


 

Share this post


Link to post
Share on other sites

@rebelsheep

Two points ...

1) The 'official' v2.3.4.1 version of osCommerce is very much out of date! The osCommerce project was lead by one person that has been absent for quite some time. In his absence, the "community" has continued with the development of osC. Unfortunately, that one missing person is the only one that can make this continued development an 'official' release.

The 'Community Edition' (also called osC-CE (for Community Edition), osC-BS (for Bootstrap, the platform it is based on), osC-Edge, and/or osC-Frozen.)  is a big improvement over the last 'official' v2.3.4 release in a number of ways:

A ) It is responsive. This means that it will adjust the screen layout depending on the size of the screen of your customer's device. This is very important in this day of mobile devices. The 'official' version is not responsive.

B ) It will work with the newer version of PHP, the scripting language used in osC. As more and more hosts upgrade their servers to PHP 7.x, older versions of osC (including the 'official' version) will crash.

C ) It is much more modular. This means that you can turn features on or off, change the layout, or even add new features, all without touching the core code.

As I said, the community is still working on osC. Every so often, a version is released as a 'fixed' release. 'Frozen' was the last 'fixed' release, while 'Edge' is still ongoing. Since the developers are constantly testing new things in 'Edge', 'Frozen' is the better choice for a live store. As will all software, there will be bugs in any release, and some have been identified in 'Frozen'. There is an entire thread identifying these, as well as their fixes.

Unfortunately, there are no version numbers associated with any of these releases, and they will all say that they are osC v2.3.4.1. The only way to know which release you have is the date on the full package.

You can find a link to the latest 'Frozen' version of the Community Edition in my signature below.

 

2) osCommerce, in any of its versions, is not ready for PHP 7.2 (nor are many of the add-ons). PHP v7.2 is much more strict than earlier versions, and much of the osCommerce code (and add-ons) will need updating. So, you have two choices here:

A ) Roll back to a supported version of PHP. If you are using the 'official' version of osC, that means v5.6. If you are using a current version of the 'Community Edition,' you can run PHP v7.0 (and possibly v7.1). Or, ...

B ) Be ready to have to do a lot of code fixing. While you can get *some* support on this forum (be sure to search for PHP 7.2 posts), a lot of this you'll have to do on your own.

 

HTH

Malcolm

 


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get the latest community-supported responsive "Frozen" release here

Share this post


Link to post
Share on other sites

Try to avoid rolling back to anything earlier than PHP 7.1, because all earlier versions (up through 7.0) are completely out of support. Hackers are going to have a field day breaking anything running on less than PHP 7.1, as there will be no further patches to those PHP levels. In practical terms, that means that only osC "Frozen" and "Edge" should be used. Frozen has a short bug list (which needs patching), and Edge is unstable (the author is constantly changing it). Frozen needs further fixes to run on PHP 7.2, and Edge is at least most of the way there on PHP 7.2 compatibility (I don't know if it will run on 7.2 out of the box).


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozen or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

Apologies for the late reply, and thank you for the very detailed and knowledgable answers.

If the official version has ended, how responsible would it be to run a professional shop on OSCommerce that should take 100s of orders per day, is responsive and integrates well with ebay?

If the community decide not to continue development, surely my client will be in trouble and have to have the site rebuilt from the ground up on another platform at significant cost. Isn't this an argument for prehaps developing the site on Magento?

Share this post


Link to post
Share on other sites
1 hour ago, rebelsheep said:

If the official version has ended

This is not true the vast majority of osC shops still run on the official version. Yes the official version is not responsive out of the box, but many developers and partners offer responsive versions. Alternativly use the CE version which is responsive out of the box, that's entirely your decision, even Magento has a CE version I use it!


 

Share this post


Link to post
Share on other sites

osCommerce has always been community supported, but unfortunately, developed by only one person (at least, he's the gatekeeper). This one person has not been active for a year and a half now, and has let the official version grow obsolete. We've repeatedly told him that you cannot let a product stagnate for years at a time, and then release an updated version in a blaze of glory, because we have to start all over again building a track record for the product, but he's set in his ways.

As for how responsible would it be to use the community edition (2.3.4.1BS Frozen), it would certainly be more responsible than using a totally obsolete version (that won't even run on most servers today. At least, the CE is up to date and is being maintained. If your client is uneasy about depending on such an informal arrangement, then by all means they should switch to another shop which has a more robust and formal organization behind it. Just keep in mind that even the best professional shops eventually fade away, and your client will be looking to move once again! That's a fact of life: no shopping cart software will ever be eternal, and no matter what you use, you will sooner or later have to migrate to something else. All you can do it keep good records on everything you've done to a shop, so that it's less painful to migrate in the future, whether it's to a newer version of your current software, or to a whole new platform.


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozen or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites
20 hours ago, rebelsheep said:

If the official version has ended, how responsible would it be to run a professional shop on OSCommerce that should take 100s of orders per day, is responsive and integrates well with ebay?

One of my clients takes hundreds of orders per day, millions in $$ per annum. 
All done on the Community Edition.

Obviously as and when needed I step in to perform certain actions on the site when it's too much for the shopowner to DIY, but in general, the whole thing is incredibly smooth.  I think that is the case for most users of CE, in general things go quite smoothly.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest current code (community-supported responsive 2.3.4.1BS Edge) here

 

Share this post


Link to post
Share on other sites
22 minutes ago, MrPhil said:

(that won't even run on most servers today

Just to put this to bed once and for all, here is the official osC 2.3.4.1 running on the latest cloud based Unix servers

running the latest Apache code, and PHP7.2 As you can see it installs and works fine.

To use or not is upto you.

Edited by JcMagpie

 

Share this post


Link to post
Share on other sites

All good points.

All platforms fade in an out of use, including commercial solutions.

I will continue with OSCommerce, or at least keep exploring it / testing it for a while. Going with the CE version as it is the most up-to-date / needs the least amount of mods for me to get things up and running. Also new to the platform so unsure how much coding I will need to do personally (happy to do it if needed, but it will be a steep learning curve for a while until I work out what's what).

Thank you for all your help and advice.

Share this post


Link to post
Share on other sites
Quote

As you can see it installs and works fine.

On the contrary, I've seen many reports of official 2.3.4.1 installing OK, but failing to run properly due to incompatibilities with PHP 7.x. Unless HPDL did a sneak update recently (without bumping the point release number), the last time I looked, all he had done was to suppress PHP 7's "deprecated" warnings. If he's actually gone through and fixed all the PHP 7 problems, I'll be happy to retract my statement. Get a copy of 2.3.4 and a copy of 2.3.4.1, and file-compare them, as I did last year.


If you are running the "official" osC 2.3.4 or 2.3.4.1 download, your installation is obsolete! Get (stable) Frozen or (unstable) Edge. See also the naming convention and the latest community-supported responsive "Edge" release

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×