[Vtigercrm-developers] Setting sql_mode on a shared server for the mysql session?

Martin Allen martin.allen at exe-squared.co.uk
Thu Jan 22 12:41:37 GMT 2026


I don't think you can set it in the connection string itself, but you should be able to run a SQL query to set it using
SET sql_mode = "ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER";

(if your DB user has permission to set this..)

We found the above settings work for vTiger on newer MySQL / MariaDB servers

________________________________
From: vtigercrm-developers-bounces at lists.vtigercrm.com <vtigercrm-developers-bounces at lists.vtigercrm.com> on behalf of Alan Lord <alanslists at gmail.com>
Sent: Wednesday, January 21, 2026 09:21 AM
To: vtigercrm-developers at lists.vtigercrm.com <vtigercrm-developers at lists.vtigercrm.com>
Subject: [Vtigercrm-developers] Setting sql_mode on a shared server for the mysql session?

Has anyone done the above?

I have a customer with a fairly old Vtiger on a shared host and the
hosting provider upgraded their server recently so now they are having
issues due to the STRICT_TRANS_TABLES option being set.

I wonder if I could modify the initial connection string in the
PearDatabase or wherever to try and set the sql_mode?

Before I spend a load of time trying to do this I wondered if anyone
else has managed to do this before and how they did it?

TIA

Al

_______________________________________________
http://www.vtiger.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20260122/9f3ead82/attachment.html>


More information about the vtigercrm-developers mailing list