Well, here's the thing I just tried.
I took php.ini-production
in the distribution (to make sure none of the customisations mine has accrued over the years are involved, and should probably review that now I think about it), copied it to php.ini
, and at the end of the list of extensions (line 965) added the line
extension=pdo_sqlsrv_82_ts_x64
Adding that line was the only change I made to what was otherwise identical to php.ini-production
.
I put php_pdo_sqlsrv_82_ts_x64.dll
(which version of course matches my PHP version) in the extension directory (ext
).
Ran:
C:\php> php -r "phpinfo();" > phpinfo.txt
And the resulting file has the section
PDO
PDO support => enabled
PDO drivers => sqlsrv
pdo_sqlsrv
pdo_sqlsrv support => enabled
ExtensionVer => 5.11.0-beta1+16628
Directive => Local Value => Master Value
pdo_sqlsrv.client_buffer_max_kb_size => 10240 => 10240
pdo_sqlsrv.log_severity => 0 => 0
pdo_sqlsrv.report_additional_errors => 1 => 1
(As the extension version suggests, I downloaded the most recent sqlsrv zip file for this.)
Note that I have neither SQL Server nor SSMS installed, so I can't say whether the extension would work as installed or if more initialisation is needed, but the extension is at least being recognised and registered with that minimum amount of work.
In my normal php.ini
where I have a couple of other database extensions registered (PostgreSQL and SQLite), there was no trouble adding SQL Server as a third, so your including MySQL as well shouldn't be a problem.