Jump to content
thirty bees forum
  • 0

My site is reduced to source code until I can revert to php 7.4: how?



I used core updater to update to php 8.
Unfortunately the site turned into error messages and cannot be pulled back without a bit more knowledge than I have.

Undefined constant PDO::MYSQL_ATTR_USE_BUFFERED_QUERY is the heading, in file classes/db/DbPDO.php at line 76 it says on the screen where I hoped to see my site or my back office after trying to update to php 8. Line 76 goes like this - something above my head:

73:        return new PDO($dsn, $user, $password, [
75:            PDO::ATTR_TIMEOUT => $timeout,
76:            PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,
77:            PDO::ATTR_STRINGIFY_FETCHES => true,

This would not matter so much if I had a backup, or could revert to php 7.4 , which seems the easiest route out. Maybe there are other easy routes out.

So I change the server back to php 7.4 and get 

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.33. in /home/veganlin/public_html/vendor/composer/platform_check.php on line 24

Does anyone know how to teach my software to go back to php 7.4 using only changes to source code?
Or other easy routes out?



Edited by veganline
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Fiddling with php extensions worked!
For anyone with the same error message on Hosting.co.uk ...

Cpanel > PHP version > 8  > press "apply" >  nd_pdo_mysql should be ticked for Thirtybees to work. Probably press "apply" after that as well.

Default settings on Cpanel have it ticked, but Hosting.co.uk have it un-ticked until you risk pressing "default settings" or just tick the one box. If it's relevant, I think they use Innodb databases but I don't need to understand that.

After that, the back office started working and it only took a module delete to get the front office working.
------------------------------- next day
On Hosting.co.uk the site went down again with control panel messages about excessive newrelic messages. I ticked the php box for "newrelic" and the site started working again! This isn't a default setting. A few days later I looked on my Prestoolsuite page which suggested OPcache as "recommended", so now that's ticked too.
-------------------------------- 2 days later
I had missed a fault, now solved. The site worked at the back but the front still showed error messages instead of most product pages.
Backoffice > advanced > performance > Disable non Thirtybees Modules did the trick with temporary help from "force recompile" on the same page. There's still the question of whether any non-Thbirtybees modules can run on PHP 8
-------------------------------- 3 days later
My own hacks on Thirtybees modules and templates were the problem. I restored standard versions from Github and re-hacked.

Edited by veganline
2 days later
  • Thanks 1
Link to comment
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
  • Create New...