Page 1 of 1

Help! Getting the fatal error "Impossible to write to binary log since BINLOG_FORMAT = STATEMENT

Posted: Thu Apr 29, 2021 6:59 am
by RideTheWave
Help! When going to the admin page, I'm all of a sudden getting the fatal error message:
Fatal error: Uncaught Exception: Error: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.<br />Error No: 1665<br />DELETE FROM oc_cart WHERE (api_id > '0' OR customer_id = '0') AND date_added < DATE_SUB(NOW(), INTERVAL 1 HOUR) in /home/mysite/public_html/system/library/db/mysqli.php:40 Stack trace: #0 /home/mysite/public_html/system/library/db.php(16): DB\MySQLi->query('DELETE FROM oc_...', Array) #1 /home/mysite/public_html/vqmod/vqcache/vq2-system_library_cart_cart.php(31): DB->query('DELETE FROM oc_...') #2 /home/mysite/public_html/admin/controller/startup/startup.php(56): Cart\Cart->__construct(Object(Registry)) #3 /home/mysite/public_html/vqmod/vqcache/vq2-system_storage_modification_system_engine_action.php(51): ControllerStartupStartup->index() #4 /home/mysite/p in /home/mysite/public_html/system/library/db/mysqli.php on line 40
The front end is not working either - just a blank white page. It was working perfectly fine last night and we have not made any changes at all. Can anyone suggest how to fix this? Do you think this is a change that happened on the host?

Re: Help! Getting the fatal error "Impossible to write to binary log since BINLOG_FORMAT = STATEMENT

Posted: Thu Apr 29, 2021 7:34 am
by ADD Creative
Probably a change your host has made.

Re: Help! Getting the fatal error "Impossible to write to binary log since BINLOG_FORMAT = STATEMENT

Posted: Thu Apr 29, 2021 8:20 am
by RideTheWave
Is there any change in the mysqli.php code to make to make it work? Below the line: $this->connection->query("SET SQL_MODE = ''"); I tried adding: $this->connection->query("SET SESSION binlog_format = 'MIXED'"); but that still didn't fix it.

Would it work if I reset the hosting account and reuploaded all the files and the database or do you think I would get the same error?

Re: Help! Getting the fatal error "Impossible to write to binary log since BINLOG_FORMAT = STATEMENT

Posted: Thu Apr 29, 2021 4:53 pm
by paulfeakins
RideTheWave wrote:
Thu Apr 29, 2021 6:59 am
Do you think this is a change that happened on the host?
Yep and I see from your other host you're with GoDaddy who are known to be pretty awful.

Re: Help! Getting the fatal error "Impossible to write to binary log since BINLOG_FORMAT = STATEMENT

Posted: Thu Apr 29, 2021 7:28 pm
by ADD Creative
RideTheWave wrote:
Thu Apr 29, 2021 8:20 am
Is there any change in the mysqli.php code to make to make it work? Below the line: $this->connection->query("SET SQL_MODE = ''"); I tried adding: $this->connection->query("SET SESSION binlog_format = 'MIXED'"); but that still didn't fix it.
I don't think you would have the correct privileges to do that.
https://dev.mysql.com/doc/refman/5.7/en ... leges.html