Post by glolar » Fri Jan 28, 2022 1:24 pm

A couple of months ago, I uploaded the GitHub version of 3.0.3.8 to a 3.0.2.0 site (site was running PHP 7.4), and got thru the upgrade fine. A couple of days before that, I upgraded a different 3.0.2.0 site, using the Download Page version of 3.0.3.8 (this site was also running PHP 7.4). Upgraded fine.

I just uploaded the most recent 3.0.3.8 (GitHub version) to a third site (also running PHP 7.4), went to the /install folder in the browser, and got a message saying "PHP 8.0+ Required", and the upgrade script never launched.

So, added the following line to my .htaccess file to use PHP 8.0:

AddHandler application/x-httpd-php80 .php .php5 .php4 .php3

... and the upgrade script started. It quickly aborted however, with a JSON parsing error. See the attached image for the error. After looking at the mysqli.php code that is referenced in the error message, it APPEARS that the upgrade is trying to modify one of the database tables, using an ALTER statement, but cannot connect to the database. Line 52 referenced in the error message is the throw EXCEPTION that occurs when it cannot connect.

Looks like some changes to 3.0.3.8 were made in the last couple of months to require PHP 8.0???

Shouldn't there be a version number change if that is true?

The biggest issue, however, is that I cannot get past this JSON error, and cannot upgrade my site.

Any help is appreciated!

Attachments

opencart_upgrade_error.jpg

opencart_upgrade_error.jpg (106.1 KiB) Viewed 522 times

Last edited by glolar on Sun Jan 30, 2022 11:57 am, edited 1 time in total.

Increase Your Child's I.Q.
iPad Wallpapers
Turtle & Tortoise Screen Savers


User avatar
Active Member

Posts

Joined
Thu Jul 29, 2010 12:35 pm
Location - San Diego, CA

Post by ADD Creative » Fri Jan 28, 2022 5:55 pm

I can tell from the line numbers in the error posted that you do not have 3.0.3.8 or the 3.0.x.x_Maintenance branch, you have the master branch.

3.x requires PHP 7.3 not PHP 8.0. Only 4.x requires PHP 8.0.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by by mona » Sat Jan 29, 2022 1:52 am

I believe from other posts you are using a master version in error.

However, for anyone else searching.

That is a json error because functions in OC which expect json encoded input never check if the input is indeed json encoded.
Since many functions use exceptions which are not caught, those functions return html error output to those json expecting functions.
Hence the json error popups.

In this case you have an sql error.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by glolar » Sat Jan 29, 2022 6:36 am

by mona wrote:
Sat Jan 29, 2022 1:52 am
I believe from other posts you are using a master version in error.

However, for anyone else searching.

That is a json error because functions in OC which expect json encoded input never check if the input is indeed json encoded.
Since many functions use exceptions which are not caught, those functions return html error output to those json expecting functions.
Hence the json error popups.

In this case you have an sql error.
Thank you for the helpful response. Yes, I inadvertently downloaded version 4.0.x.x. I clicked on the Github link on the OpenCart Download page, which took me to the 4.0.x.x Github page, but in the Overview section on that same page, it stated that the version was 3.0.3.8. Nothing in the readme or installation instructions in the download referenced a version number either, but I should have known from the filename of the downloaded file (master), that it wasn't 3.0.3.8. I saw the Version 3.0.3.8 in the Overview section on the Github page and just believed it.

I think someone has put in request to fix that, so hopefully others won't go thru what I did.

Thanks again!

Increase Your Child's I.Q.
iPad Wallpapers
Turtle & Tortoise Screen Savers


User avatar
Active Member

Posts

Joined
Thu Jul 29, 2010 12:35 pm
Location - San Diego, CA

Post by glolar » Sat Jan 29, 2022 6:41 am

ADD Creative wrote:
Fri Jan 28, 2022 5:55 pm
I can tell from the line numbers in the error posted that you do not have 3.0.3.8 or the 3.0.x.x_Maintenance branch, you have the master branch.

3.x requires PHP 7.3 not PHP 8.0. Only 4.x requires PHP 8.0.
Yep, I trusted the version number stated in the Overview section on the Github page (it said version 3.0.3.8), and I did in fact download version 4. Got it all sorted now.

I am curious about the 3.0.x.x_Maintenance branch. When should I (if ever) use the maintenance version, and what is the difference between that and the 3.0.3.8 branch? I am assuming the difference is that the maintenance branch includes some bug fixes. But should I ever used that version?

Thank you very much!

Increase Your Child's I.Q.
iPad Wallpapers
Turtle & Tortoise Screen Savers


User avatar
Active Member

Posts

Joined
Thu Jul 29, 2010 12:35 pm
Location - San Diego, CA

Post by ADD Creative » Sat Jan 29, 2022 11:21 pm

Easy mistake to make if you are not following the development. A lot of the official documentation is out of date or contains errors.

3.0.3.8 is not a branch, it is a release from the 3.0.x.x_Maintenance branch. https://github.com/opencart/opencart/re ... ag/3.0.3.8

You can see the changes made to the 3.0.x.x_Maintenance branch since the 3.0.3.8 release at the link below. At some point these changes might be released as a new version.
https://github.com/opencart/opencart/co ... aintenance

It is generally safe to use, but that could change if more or bigger changes are made in the future. There is always a chance that a change could affect compatibility with an extension.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by glolar » Sun Jan 30, 2022 11:56 am

ADD Creative wrote:
Sat Jan 29, 2022 11:21 pm
Easy mistake to make if you are not following the development. A lot of the official documentation is out of date or contains errors.

3.0.3.8 is not a branch, it is a release from the 3.0.x.x_Maintenance branch. https://github.com/opencart/opencart/re ... ag/3.0.3.8

You can see the changes made to the 3.0.x.x_Maintenance branch since the 3.0.3.8 release at the link below. At some point these changes might be released as a new version.
https://github.com/opencart/opencart/co ... aintenance

It is generally safe to use, but that could change if more or bigger changes are made in the future. There is always a chance that a change could affect compatibility with an extension.
Good to know, thank you.

As for the documentation: I have been getting a lot of FaceBook ads recently, touting how great OpenCart is, and I agree. I have been using it since version 1.4. But I don't use it every day. I download a new version every couple of years, if that, so I don't stay up to date. That's why it is so critical that a download page on Github AT LEAST references the actual version that is being downloaded from the page. The FaceBook ads also say how easy OpenCart is to use, but it is downright embarrassing that the OpenCart documentation is so out of date, it no longer even matches the interface (especially on the admin side of things). I don't even think I could find a reference to the version anywhere in the 3.0.3.8 download. It still mentions version 2.x though!

For example, just about every time I upgrade a site to a new version of OpenCart, I forget to copy the contents of the upload's storage folder to the site's storage folder, and it happened again just the other day. And I don't see ANYTHING in any of the readme files, instructions, etc. that even mention the need to do that. Only lost about half an hour this time, because I found my forum post from a year ago about that issue, and I realized that not doing that was causing my Server 500 issue when trying to access the admin page after the upgrade. I feel sorry for newcomer's to OpenCart. Especially when some on this forum are supposed to be helpful, but seem to be preoccupied with trying to demonstrate how clever they are, instead of just offering help. Not complaining, just stating my experience.

I recently retired from a 40 year career in software development (mostly Java and Multimedia training development for the defense industry), so I am well aware of how documentation updates almost never seem to get done.
.
Thank you very much, again. You have to be the most helpful, courteous member of this forum. The OpenCart organization, and those of us who use OpenCart, owe you a debt of gratitude.

- OpenCart till I die

Increase Your Child's I.Q.
iPad Wallpapers
Turtle & Tortoise Screen Savers


User avatar
Active Member

Posts

Joined
Thu Jul 29, 2010 12:35 pm
Location - San Diego, CA

Post by by mona » Sun Jan 30, 2022 1:13 pm

Yes, Opencart needs to update its documentation, it is just waiting for someone like you to offer to do it !
I guess you have found yourself a job for your retirement ;D

This is what the community is about.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


Spinning Social : Links : Menus : Payments : Socials : Ads : Screen Backgrounds : Galleries : Headers : Banners : Promos


Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am
Who is online

Users browsing this forum: No registered users and 3 guests