Skip to content

Commit 15f61bd

Browse files
authored
Fix issue 955 - errors building sqlsrv alone (microsoft#956)
1 parent df8d7da commit 15f61bd

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,14 @@ jobs:
261261
$env:VERSION=type sha256sum.txt | where { $_ -match "php-($(phpVersion)\.\d+)-src" } | foreach { $matches[1] }
262262
Write-Host "Latest PHP $(phpVersion) is ${env:VERSION}"
263263
cd $(Build.SourcesDirectory)/buildscripts/
264-
python builddrivers.py --PHPVER=${env:VERSION} --ARCH=x64 --THREAD=nts --SOURCE=$(Build.SourcesDirectory)/source --TESTING --NO_RENAME
264+
python builddrivers.py --PHPVER=${env:VERSION} --DRIVER=sqlsrv --ARCH=x64 --THREAD=nts --SOURCE=$(Build.SourcesDirectory)/source --TESTING --NO_RENAME
265+
dir *sqlsrv*.dll
266+
python builddrivers.py --PHPVER=${env:VERSION} --DRIVER=pdo_sqlsrv --ARCH=x64 --THREAD=nts --SOURCE=$(Build.SourcesDirectory)/source --TESTING --NO_RENAME
265267
cp php-sdk\phpdev\vc15\x64\php-${env:VERSION}-src\run-tests.php $(Build.SourcesDirectory)\test\functional\sqlsrv
266268
cp php-sdk\phpdev\vc15\x64\php-${env:VERSION}-src\run-tests.php $(Build.SourcesDirectory)\test\functional\pdo_sqlsrv
267269
dir *sqlsrv*.dll
268270
cp *sqlsrv*.dll C:\tools\php\ext\
269-
displayName: 'Build drivers for the latest version of PHP $(phpVersion)'
271+
displayName: 'Build drivers (separately) for the latest version of PHP $(phpVersion)'
270272
271273
- script: |
272274
echo extension=php_sqlsrv.dll >> C:\tools\php\php.ini

source/sqlsrv/config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if( PHP_SQLSRV != "no" ) {
2727
if (CHECK_LIB("odbc32.lib", "sqlsrv") && CHECK_LIB("odbccp32.lib", "sqlsrv") &&
2828
CHECK_LIB("version.lib", "sqlsrv") && CHECK_LIB("psapi.lib", "sqlsrv")&&
2929
CHECK_HEADER_ADD_INCLUDE( "core_sqlsrv.h", "CFLAGS_SQLSRV", configure_module_dirname + "\\shared")) {
30-
if (PHP_PDO_SQLSRV == "no" || PHP_SQLSRV_SHARED) {
30+
if (PHP_SQLSRV_SHARED || PHP_PDO_SQLSRV == "no") {
3131
ADD_SOURCES( configure_module_dirname + "\\shared", shared_src_class, "sqlsrv" );
3232
}
3333
CHECK_HEADER_ADD_INCLUDE("sql.h", "CFLAGS_SQLSRV_ODBC");

0 commit comments

Comments
 (0)