<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
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 <br>
SET sql_mode = "ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER";<br>
<br>
(if your DB user has permission to set this..)</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<b><br>
</b></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
We found the above settings work for vTiger on newer MySQL / MariaDB servers</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<b>From:</b> vtigercrm-developers-bounces@lists.vtigercrm.com <vtigercrm-developers-bounces@lists.vtigercrm.com> on behalf of Alan Lord <alanslists@gmail.com><br>
<b>Sent:</b> Wednesday, January 21, 2026 09:21 AM<br>
<b>To:</b> vtigercrm-developers@lists.vtigercrm.com <vtigercrm-developers@lists.vtigercrm.com><br>
<b>Subject:</b> [Vtigercrm-developers] Setting sql_mode on a shared server for the mysql session?
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-size: 11pt;">Has anyone done the above?<br>
<br>
I have a customer with a fairly old Vtiger on a shared host and the<br>
hosting provider upgraded their server recently so now they are having<br>
issues due to the STRICT_TRANS_TABLES option being set.<br>
<br>
I wonder if I could modify the initial connection string in the<br>
PearDatabase or wherever to try and set the sql_mode?<br>
<br>
Before I spend a load of time trying to do this I wondered if anyone<br>
else has managed to do this before and how they did it?<br>
<br>
TIA<br>
<br>
Al<br>
<br>
_______________________________________________<br>
<a data-auth="NotApplicable" class="OWAAutoLink" id="OWAb3a7f693-7474-df64-2b38-c7ba29d00dfb" href="http://www.vtiger.com/">http://www.vtiger.com/</a><br>
</div>
</body>
</html>