Open HLeithner opened 2 weeks ago
Hi @HLeithner
Thanks for your suggestion!
We're marking your suggestion as 'Patches Welcome'. This means that we're not, presently, going to be investigating the implementation of your suggestion, but we also agree that it has merit.
If you would like to implement this yourself, I suggest you start by having a read through the Developer Corner wiki page.
https://sangomakb.atlassian.net/wiki/spaces/FP/pages/10289341/Developer+Corner+Home#Getting-Involved
Thanks again for your time!
Regards, Kapil Gupta``
FreePBX Version
FreePBX 17
Issue Description
Superfecta uses the same DSN for all PDO drivers, sadly that doesn't work for all drivers. for example the sqlsrv from microsoft needs a different DSN
Current used string:
$dbh = new PDO($run_param['DB_Driver'].':dbname='.$run_param['DB_Name'].';host='.$run_param['DB_Host'].';port='.$run_param['DB_Port'], $run_param['DB_User'], $run_param['DB_Password']);
for sqlsrv you need the following string:$dbh = new PDO($run_param['DB_Driver'].':Server='.$run_param['DB_Host'].','.$run_param['DB_Port'].';Database='.$run_param['DB_Name'] .';TrustServerCertificate=yes', $run_param['DB_User'], $run_param['DB_Password']);
In addition I doesn't care about the certificate and trust it.
My suggestion would be to add a DSN field which replaces all (except username and password) other connection fields. For b/c reasons I would check if DSN field is filled and use only this if we have a DSN string.
If you want I can create a PR.
Operating Environment
Debian 12 PDO Driver sqlsrv 18 ODBC 18
Relevant log output
No response