I have been working my way through changing from mysqli to pdo all good but then on the latest site it uses a mssql db, and as soon as I changed the config file with below I got this message -
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in \\CSFFILES11\WEBSITES\dev\mysite.php:7 Stack trace: #0 \\CSFFILES11\WEBSITES\dev\new_checksafetyfirst\en\csfintranet\config.php(7): PDO->__construct('mssql:host=csft...', 'contract_user', 'L3tm31n1') #1 \\CSFFILES11\WEBSITES\dev\mysite.php(5): include('\\\\CSFFILES11\\WE...') #2 {main} thrown in \\CSFFILES11\WEBSITES\dev\mysite.php on line 7
Using
$pdo=new PDO("mysql:host=csftest01;dbname=stuff;charset=utf8","user","pass");
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
So thought that a logical change of changing the first line above from mysql to mssql to get
$pdo=new PDO("mssql:host=csftest01;dbname=stuff;charset=utf8","user","pass");
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
But then got this error
Uncaught exception ‘PDOException’ with message ‘could not find driver’ in