Jump to content
thirty bees forum
  • 0

Update 1.5.1 from php 7.4 to 8


Question

Posted

Hello, I would like to update to PHP 8. Now I have installed the 7.4 version. I need to make something before update to php 8?

Thanks

13 answers to this question

Recommended Posts

  • 0
Posted

1. Have your shop working properly on 7.4 and make a backup (both DB and filesystem).
2. Go to Core Updater and select Target PHP version: 8.x version you want to switch to. Save.
3. Update your store at this state. It will probably break it when you refresh, don't worry.
4. Switch php versions on your server (use the version you specified in Core updater, if you don't your shop will not work as some dependencies have custom versions).
5. Open your backoffice and front office. BO should work right away. FO might have some issues (3rd party theme and modules).
6. Clear cache.
7. Fix any issues present in Collect logs module.
8. Once your shop is working on php 8.x you can once again switch Target PHP version to 'Server PHP version'.

In order to revert to 7.4 simply do the opposite:
1. In Core updater - switch the target version to 7.4. Shop is again broken until you switch php versions on the server.
2. Switch php to 7.4.
3. Open BO and FO and continue (you should not see any issues if your shop worked OK before that).
4. Clear cache.
5. Again revert back to Target PHP version to 'Server PHP version' if you don't plan to play again soon and you don't want to forget about this setting.

  • Like 1
  • 0
Posted

Yes, you should install collectlogs module, and let it collect errors for a few days.

You have to fix all deprecation warnings - core code should be ok, but you will get some errors from modules and theme.

After all warnings are fixed, you can safely update to higher version of PHP. 

Always update to next PHP level only - from 7.4 to 8.0.

When you later want to update to 8.1, you will have to repeat this process again.

  • Like 1
  • 0
Posted

Maybe, first of all, check if your theme and main 3rd party modules support PHP 8. And then ask to developers for PHP 8 versions, or do it by yourself.

So, first of first of all, have a clone of your shop to work with it.

  • Like 1
  • 0
Posted
On 9/19/2024 at 10:11 AM, theMerchantDev said:

Maybe, first of all, check if your theme and main 3rd party modules support PHP 8. And then ask to developers for PHP 8 versions, or do it by yourself.

So, first of first of all, have a clone of your shop to work with it.

^^^ What He Said ^^^

  • 0
Posted (edited)

Hi everyone, I want to upgrade from version 1.5 to 1.6 (that's already done and went quite smoothly),

and of course I also want to upgrade to PHP 8.0 and higher (I'm currently on PHP 7.4).  I have activated nd_pdo_mysql  in cPanel.

However, I'm encountering the following error, and I'm stuck...

Does this have anything to do with: https://github.com/thirtybees/thirtybees/issues/1600 

 

PDO_mysql_php8.jpg

Edited by DRMasterChief
  • 0
Posted

You have to run pdo_mysql.

In order to quickly view if you do access AdminInformation controller in BO and append "&display=phpinfo" (no quotes), this will launch phpinfo where you can check if it's running.

If not - turn it on and check again.

  • 0
Posted (edited)

Hmm, okay. I see that `nd_pdo_mysql` isn't loaded under PHP 8.0, but it is under PHP 8.1 (and I can't change that while testing).

Just so you know, I'm currently only changing the PHP version for a single directory (for testing purposes, there's a test shop in a subdirectory with a subdomain).  I do this by .htaccess .  Maybe this can cause the problem?

So I have to switch from PHP 7.4 to 8.1 (which is rather unusual, I think).

Edited by DRMasterChief
  • 0
Posted

Yes, the direct jump to 8.1 isn't documented in the manual, but it shouldn't really matter whether it's 8.0 or 8.1...

I'm very careful to use only absolutely necessary modules. This saves a lot of time and effort when such a change is needed.  But i have some manually changes to some files (mostly theme-related for a good look).

The modules and the theme I'm using don't seem to have any problems with PHP 8.1.

I'll be monitoring the collect logs for a while now. All tests are still being conducted in the test system.

If nothing unusual comes up, I'll make the same changes to the live shop.

  • 0
Posted

Since you're already spending time on upgrades and testing, it's best to upgrade thirtybees to 1.7.0 (Bleeding edge) and enable PHP 8.3.

  • 0
Posted (edited)

Hi Yabber,  not sure about thirtybees  1.7.0  (can anyone tell the details for changes from 1.6 to 1.7 ?).

My theme is well-programmed and stable, but at some point it will probably come to an end...  but yes, i will try in the next days.  Most important is to have the live-shop at php8.1

 

Now on version 1.6, it shows me the empty images (placeholder camera) for articles without a picture... hmm, so simple, but how do I change that?

Edited by DRMasterChief

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
×
×
  • Create New...