From e5c03a9c15f985f97362d0d7ae66839cc1609f69 Mon Sep 17 00:00:00 2001 From: David Puglielli Date: Wed, 23 Aug 2017 16:40:49 -0700 Subject: [PATCH 1/5] Added SUSE 12 to unix setup script --- test/Performance/setup_env_unix.sh | 32 +++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/test/Performance/setup_env_unix.sh b/test/Performance/setup_env_unix.sh index a2f51cb0..3f9a58c8 100644 --- a/test/Performance/setup_env_unix.sh +++ b/test/Performance/setup_env_unix.sh @@ -2,10 +2,10 @@ set -e -if [[ ("$1" = "Ubuntu16" || "$1" = "RedHat7" || "$1" = "Sierra") ]]; then +if [[ ("$1" = "Ubuntu16" || "$1" = "RedHat7" || "$1" = "SUSE12" || "$1" = "Sierra") ]]; then PLATFORM=$1 else - echo "1st argument must be one of Ubuntu16, RedHat7, Sierra. Exiting..." + echo "1st argument must be one of Ubuntu16, RedHat7, SUSE12, Sierra. Exiting..." exit 1 fi @@ -24,7 +24,7 @@ else fi if [[ (! -f "$4") || (! -f "$5") ]]; then - echo "5th and 6th argument must be paths to sqlsrv and pdo drivers. Exiting..." + echo "4th and 5th argument must be paths to sqlsrv and pdo drivers. Exiting..." exit 1 else SQLSRV_DRIVER=$4 @@ -83,6 +83,28 @@ elif [ $PLATFORM = "RedHat7" ]; then pip3 install --upgrade pip >> env_setup.log pip3 install pyodbc >> env_setup.log printf "done\n" + +elif [ $PLATFORM = "SUSE12" ]; then + printf "Update..." + sudo zypper refresh >> env_setup.log 2>&1 + printf "done\n" + + printf "Installing autoconf, gcc, g++, git, zip, libxml, openssl, python3, pip3..." + sudo zypper -n install autoconf gcc gcc-c++ libxml2-devel git zip libopenssl-devel python3-devel python3-pip python3-setuptools >> env_setup.log 2>&1 + printf "done\n" + + printf "Installing MSODBCSQL..." + zypper -n ar https://packages.microsoft.com/config/sles/12/prod.repo 2>&1 + zypper --gpg-auto-import-keys refresh 2>&1 + ACCEPT_EULA=Y zypper -n install msodbcsql >> env_setup.log 2>&1 + ACCEPT_EULA=Y zypper -n install mssql-tools >> env_setup.log 2>&1 + zypper -n install unixODBC-devel >> env_setup.log 2>&1 + printf "done\n" + + printf "Installing pyodbc" + pip3 install --upgrade pip >> env_setup.log 2>&1 + pip3 install pyodbc >> env_setup.log 2>&1 + printf "done\n" elif [ $PLATFORM = "Sierra" ]; then printf "Installing homebrew..." @@ -158,12 +180,12 @@ cp php.ini-production php.ini driverName=$(basename $SQLSRV_DRIVER) echo "extension=$driverName" >> php.ini sudo cp -r $SQLSRV_DRIVER $phpExtDir/$driverName -sudo chmod a+r $SQLSRV_DRIVER $phpExtDir/$driverName +sudo chmod a+r $phpExtDir/$driverName driverName=$(basename $PDO_DRIVER) echo "extension=$driverName" >> php.ini sudo cp -r $PDO_DRIVER $phpExtDir/$driverName -sudo chmod a+r $SQLSRV_DRIVER $phpExtDir/$driverName +sudo chmod a+r $phpExtDir/$driverName sudo cp php.ini /usr/local/lib printf "done\n" From c505d522f95590a1382e54990d66d8aa19618a0a Mon Sep 17 00:00:00 2001 From: David Puglielli Date: Thu, 24 Aug 2017 12:59:09 -0700 Subject: [PATCH 2/5] Added suse to readme and perf script --- test/Performance/README.md | 6 ++++-- test/Performance/run-perf_tests.py | 1 + test/Performance/setup_env_unix.sh | 30 +++++++++++++++--------------- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/test/Performance/README.md b/test/Performance/README.md index 7be4ca55..84d20855 100644 --- a/test/Performance/README.md +++ b/test/Performance/README.md @@ -15,6 +15,8 @@ Run `Windows PowerShell` as administrator. sudo env "PATH=$PATH" bash setup_env_unix.sh Ubuntu16 ### RedHat 7 sudo env "PATH=$PATH" bash setup_env_unix.sh RedHat7 +### SUSE 12 + sudo env "PATH=$PATH" bash setup_env_unix.sh SUSE12 ### MacOS 10.12 Sierra `brew` cannot be run with `sudo` on Sierra. Either enable passwordless `sudo` on the machine or enter the password when prompted. @@ -30,10 +32,10 @@ PHPBench is used to run the benchmarks. Visit http://phpbench.readthedocs.io/en/ ### Windows py.exe run-perf_tests.py -platform ### Linux and Mac -On Linux and Mac, the script must be executed with `sudo python3` because to enable pooling it needs to modify odbcinst.ini system file. As an improvement, the location of the odbcinst.ini file can be changed so that, sudo is not requiered. +On Linux and Mac, the script must be executed with `sudo python3` because to enable pooling it needs to modify odbcinst.ini system file. As an improvement, the location of the odbcinst.ini file can be changed so that sudo is not required. python3 run-perf_tests.py -platform | tee run-perf_output.txt -`-platform` - The platform that the tests are ran on. Must be one of the following: Windows10, WindowsServer2016, WindowsServer2012, Ubuntu16, RedHat7, Sierra. +`-platform` - The platform that the tests are ran on. Must be one of the following: Windows10, WindowsServer2016, WindowsServer2012, Ubuntu16, RedHat7, SUSE12, Sierra. `-php-driver` (optional) - The driver that the tests are ran on. Must be one of the following: sqlsrv, pdo_sqlsrv, or both. Default is both. `-testname` (optional) - The test to run. Must be the file name (not including path) of one test or 'all'. Default is 'all'. If one test is specified, must also specify the -php-driver option to sqlsrv or pdo_sqlsrv. \ No newline at end of file diff --git a/test/Performance/run-perf_tests.py b/test/Performance/run-perf_tests.py index 077afa26..943e09a5 100644 --- a/test/Performance/run-perf_tests.py +++ b/test/Performance/run-perf_tests.py @@ -58,6 +58,7 @@ def validate_platform( platform_name ): , "WindowsServer2012" , "Ubuntu16" , "RedHat7" + , "SUSE12" , "Sierra"] if platform_name not in platforms: print ( "Platform must be one of the following:" ) diff --git a/test/Performance/setup_env_unix.sh b/test/Performance/setup_env_unix.sh index 3f9a58c8..fccf7ba7 100644 --- a/test/Performance/setup_env_unix.sh +++ b/test/Performance/setup_env_unix.sh @@ -61,8 +61,8 @@ elif [ $PLATFORM = "RedHat7" ]; then printf "Enabling EPEL repo..." # pipe non-error to log file (wget and yum install reports error when there's nothing to do) - wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm >> env_setup.log 2>&1 - yes | sudo yum install epel-release-latest-7.noarch.rpm >> env_setup.log 2>&1 || true + wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm >> env_setup.log + yes | sudo yum install epel-release-latest-7.noarch.rpm >> env_setup.log || true printf "done\n" printf "Installing python34-setuptools..." @@ -86,24 +86,24 @@ elif [ $PLATFORM = "RedHat7" ]; then elif [ $PLATFORM = "SUSE12" ]; then printf "Update..." - sudo zypper refresh >> env_setup.log 2>&1 + sudo zypper refresh >> env_setup.log printf "done\n" printf "Installing autoconf, gcc, g++, git, zip, libxml, openssl, python3, pip3..." - sudo zypper -n install autoconf gcc gcc-c++ libxml2-devel git zip libopenssl-devel python3-devel python3-pip python3-setuptools >> env_setup.log 2>&1 + sudo zypper -n install autoconf gcc gcc-c++ libxml2-devel git zip libopenssl-devel python3-devel python3-pip python3-setuptools >> env_setup.log printf "done\n" printf "Installing MSODBCSQL..." - zypper -n ar https://packages.microsoft.com/config/sles/12/prod.repo 2>&1 - zypper --gpg-auto-import-keys refresh 2>&1 - ACCEPT_EULA=Y zypper -n install msodbcsql >> env_setup.log 2>&1 - ACCEPT_EULA=Y zypper -n install mssql-tools >> env_setup.log 2>&1 - zypper -n install unixODBC-devel >> env_setup.log 2>&1 + zypper -n ar https://packages.microsoft.com/config/sles/12/prod.repo + zypper --gpg-auto-import-keys refresh + ACCEPT_EULA=Y zypper -n install msodbcsql >> env_setup.log + ACCEPT_EULA=Y zypper -n install mssql-tools >> env_setup.log + zypper -n install unixODBC-devel >> env_setup.log printf "done\n" printf "Installing pyodbc" - pip3 install --upgrade pip >> env_setup.log 2>&1 - pip3 install pyodbc >> env_setup.log 2>&1 + pip3 install --upgrade pip >> env_setup.log + pip3 install pyodbc >> env_setup.log printf "done\n" elif [ $PLATFORM = "Sierra" ]; then @@ -142,7 +142,7 @@ fi printf "Downloading PHP-$PHP_VERSION source tarball..." # pipe non-error to log file -wget http://ca1.php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror -O php-$PHP_VERSION.tar.gz >> env_setup.log 2>&1 +wget http://ca1.php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror -O php-$PHP_VERSION.tar.gz >> env_setup.log printf "done\n" printf "Extracting PHP source tarball..." @@ -154,7 +154,7 @@ phpDir=php-$PHP_VERSION cd $phpDir printf "Configuring PHP..." -./buildconf --force >> ../env_setup.log 2>&1 +./buildconf --force >> ../env_setup.log CONFIG_OPTIONS="--enable-cli --enable-cgi --with-zlib --enable-mbstring --prefix=/usr/local" [ "${PHP_THREAD}" == "ts" ] && CONFIG_OPTIONS=${CONFIG_OPTIONS}" --enable-maintainer-zts" if [ $PLATFORM = "Sierra" ]; then @@ -163,7 +163,7 @@ else CONFIG_OPTIONS=$CONFIG_OPTIONS" --with-openssl" fi #pipe non-error to log file -(./configure $CONFIG_OPTIONS >> ../env_setup.log 2>&1) +(./configure $CONFIG_OPTIONS >> ../env_setup.log) printf "done\n" printf "Compiling and installing PHP..." @@ -197,7 +197,7 @@ printf "done\n" printf "Installing Composer..." cd .. # pipe non-error to log file -wget https://getcomposer.org/installer -O composer-setup.php >> env_setup.log 2>&1 +wget https://getcomposer.org/installer -O composer-setup.php >> env_setup.log /usr/local/bin/php composer-setup.php >> env_setup.log printf "done\n" From a37ecd700e4cfc96f570b7714f4840dd9dd0b500 Mon Sep 17 00:00:00 2001 From: David Puglielli Date: Thu, 24 Aug 2017 14:41:11 -0700 Subject: [PATCH 3/5] Added CRUD tests --- .../benchmark/pdo_sqlsrv/PDOCRUDBench.php | 79 +++++++++++++++++++ .../benchmark/sqlsrv/SqlsrvCRUDBench.php | 79 +++++++++++++++++++ test/Performance/run-perf_tests.py | 2 + 3 files changed, 160 insertions(+) create mode 100644 test/Performance/benchmark/pdo_sqlsrv/PDOCRUDBench.php create mode 100644 test/Performance/benchmark/sqlsrv/SqlsrvCRUDBench.php diff --git a/test/Performance/benchmark/pdo_sqlsrv/PDOCRUDBench.php b/test/Performance/benchmark/pdo_sqlsrv/PDOCRUDBench.php new file mode 100644 index 00000000..866d5521 --- /dev/null +++ b/test/Performance/benchmark/pdo_sqlsrv/PDOCRUDBench.php @@ -0,0 +1,79 @@ +tableName = "datatypes_".rand(); + } + + public function connect() + { + $this->conn = PDOSqlsrvUtil::connect(); + } + + public function createTable() + { + PDOSqlsrvUtil::createCRUDTable( $this->conn, $this->tableName ); + } + + public function generateInsertValues() + { + $this->insertValues = PDOSqlsrvUtil::generateInsertValues(); + } + + public function generateUpdateValues() + { + $this->updateValues = PDOSqlsrvUtil::generateUpdateValues(); + } + + public function generateUpdateParams() + { + $this->updateParams = PDOSqlsrvUtil::generateUpdateParams(); + } + /** + * Each iteration does the following $loopsPerCRUDIter times: + * (i) insert a row into the table with insertWithPrepare + * (ii) fetch the row with fetchWithPrepare + * (iii) update the row's contents with updateWithPrepare + * (iv) delete the row with delete + * Every insertion calls prepare, bindParam and execute APIs. + * Every fetch calls prepare, execute and fetch APIs. + * Every update calls prepare, bindParam and execute APIs. + * Every delete calls prepare and execute APIs. + */ + public function benchCRUDWithPrepare() + { + for( $i=0; $iconn, $this->tableName, $this->insertValues ); + PDOSqlsrvUtil::fetchWithPrepare( $this->conn, $this->tableName ); + $stmt = PDOSqlsrvUtil::updateWithPrepare( $this->conn, $this->tableName, $this->updateValues, $this->updateParams ); + PDOSqlsrvUtil::deleteWithPrepare( $this->conn, $this->tableName ); + } + } + + public function dropTable() + { + PDOSqlsrvUtil::dropTable( $this->conn, $this->tableName ); + } + + public function disconnect() + { + PDOSqlsrvUtil::disconnect( $this->conn ); + } + +} diff --git a/test/Performance/benchmark/sqlsrv/SqlsrvCRUDBench.php b/test/Performance/benchmark/sqlsrv/SqlsrvCRUDBench.php new file mode 100644 index 00000000..bcc93513 --- /dev/null +++ b/test/Performance/benchmark/sqlsrv/SqlsrvCRUDBench.php @@ -0,0 +1,79 @@ +tableName = "datatypes_".rand(); + } + + public function connect() + { + $this->conn = SqlsrvUtil::connect(); + } + + public function createTable() + { + SqlsrvUtil::createCRUDTable( $this->conn, $this->tableName ); + } + + public function generateInsertValues() + { + $this->insertValues = SqlsrvUtil::generateInsertValues(); + } + + public function generateUpdateValues() + { + $this->updateValues = SqlsrvUtil::generateUpdateValues(); + } + + public function generateUpdateParams() + { + $this->updateParams = SqlsrvUtil::generateUpdateParams(); + } + /** + * Each iteration does the following $loopsPerCRUDIter times: + * (i) insert a row into the table with insertWithPrepare + * (ii) fetch the row with fetchWithPrepare + * (iii) update the row's contents with updateWithPrepare + * (iv) delete the row with delete + * Every insertion calls prepare, bindParam and execute APIs. + * Every fetch calls prepare, execute and fetch APIs. + * Every update calls prepare, bindParam and execute APIs. + * Every delete calls prepare and execute APIs. + */ + public function benchCRUDWithPrepare() + { + for( $i=0; $iconn, $this->tableName, $this->insertValues ); + SqlsrvUtil::fetchWithPrepare( $this->conn, $this->tableName ); + $stmt = SqlsrvUtil::updateWithPrepare( $this->conn, $this->tableName, $this->updateValues, $this->updateParams ); + SqlsrvUtil::delete( $this->conn, $this->tableName ); + } + } + + public function dropTable() + { + SqlsrvUtil::dropTable( $this->conn, $this->tableName ); + } + + public function disconnect() + { + SqlsrvUtil::disconnect( $this->conn ); + } + +} diff --git a/test/Performance/run-perf_tests.py b/test/Performance/run-perf_tests.py index 943e09a5..0b2ca285 100644 --- a/test/Performance/run-perf_tests.py +++ b/test/Performance/run-perf_tests.py @@ -122,6 +122,7 @@ def get_test_name( name ): test_name_dict = { 'SqlsrvConnectionBench': 'connection' , 'SqlsrvCreateDbTableProcBench': 'create' + , 'SqlsrvCRUDBench': 'crud' , 'SqlsrvInsertBench': 'crud-create' , 'SqlsrvFetchBench': 'crud-retrieve' , 'SqlsrvUpdateBench': 'crud-update' @@ -130,6 +131,7 @@ def get_test_name( name ): , 'SqlsrvSelectVersionBench': 'version' , 'PDOConnectionBench': 'connection' , 'PDOCreateDbTableProcBench': 'create' + , 'PDOCRUDBench': 'crud' , 'PDOInsertBench': 'crud-create' , 'PDOFetchBench': 'crud-retrieve' , 'PDOUpdateBench': 'crud-update' From f69033f67a627336febc2573ac7f545a4b183608 Mon Sep 17 00:00:00 2001 From: David Puglielli Date: Thu, 24 Aug 2017 17:05:34 -0700 Subject: [PATCH 4/5] Fixed phantom statement return --- test/Performance/benchmark/pdo_sqlsrv/PDOCRUDBench.php | 2 +- test/Performance/benchmark/pdo_sqlsrv/PDOUpdateBench.php | 2 +- test/Performance/benchmark/sqlsrv/SqlsrvCRUDBench.php | 2 +- test/Performance/benchmark/sqlsrv/SqlsrvUpdateBench.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/Performance/benchmark/pdo_sqlsrv/PDOCRUDBench.php b/test/Performance/benchmark/pdo_sqlsrv/PDOCRUDBench.php index 866d5521..dd9e3660 100644 --- a/test/Performance/benchmark/pdo_sqlsrv/PDOCRUDBench.php +++ b/test/Performance/benchmark/pdo_sqlsrv/PDOCRUDBench.php @@ -61,7 +61,7 @@ class PDOSqlsrvCRUDBench extends CRUDBaseBenchmark { PDOSqlsrvUtil::insertWithPrepare( $this->conn, $this->tableName, $this->insertValues ); PDOSqlsrvUtil::fetchWithPrepare( $this->conn, $this->tableName ); - $stmt = PDOSqlsrvUtil::updateWithPrepare( $this->conn, $this->tableName, $this->updateValues, $this->updateParams ); + PDOSqlsrvUtil::updateWithPrepare( $this->conn, $this->tableName, $this->updateValues, $this->updateParams ); PDOSqlsrvUtil::deleteWithPrepare( $this->conn, $this->tableName ); } } diff --git a/test/Performance/benchmark/pdo_sqlsrv/PDOUpdateBench.php b/test/Performance/benchmark/pdo_sqlsrv/PDOUpdateBench.php index cceaac60..21a25106 100644 --- a/test/Performance/benchmark/pdo_sqlsrv/PDOUpdateBench.php +++ b/test/Performance/benchmark/pdo_sqlsrv/PDOUpdateBench.php @@ -57,7 +57,7 @@ class PDOUpdateBench extends CRUDBaseBenchmark { for( $i=0; $iconn, $this->tableName, $this->updateValues, $this->updateParams ); + PDOSqlsrvUtil::updateWithPrepare( $this->conn, $this->tableName, $this->updateValues, $this->updateParams ); } } diff --git a/test/Performance/benchmark/sqlsrv/SqlsrvCRUDBench.php b/test/Performance/benchmark/sqlsrv/SqlsrvCRUDBench.php index bcc93513..5a3550ba 100644 --- a/test/Performance/benchmark/sqlsrv/SqlsrvCRUDBench.php +++ b/test/Performance/benchmark/sqlsrv/SqlsrvCRUDBench.php @@ -61,7 +61,7 @@ class SqlsrvCRUDBench extends CRUDBaseBenchmark { SqlsrvUtil::insertWithPrepare( $this->conn, $this->tableName, $this->insertValues ); SqlsrvUtil::fetchWithPrepare( $this->conn, $this->tableName ); - $stmt = SqlsrvUtil::updateWithPrepare( $this->conn, $this->tableName, $this->updateValues, $this->updateParams ); + SqlsrvUtil::updateWithPrepare( $this->conn, $this->tableName, $this->updateValues, $this->updateParams ); SqlsrvUtil::delete( $this->conn, $this->tableName ); } } diff --git a/test/Performance/benchmark/sqlsrv/SqlsrvUpdateBench.php b/test/Performance/benchmark/sqlsrv/SqlsrvUpdateBench.php index de86cc82..eb41dfac 100644 --- a/test/Performance/benchmark/sqlsrv/SqlsrvUpdateBench.php +++ b/test/Performance/benchmark/sqlsrv/SqlsrvUpdateBench.php @@ -57,7 +57,7 @@ class SqlsrvUpdateBench extends CRUDBaseBenchmark { for( $i=0; $iconn, $this->tableName, $this->updateValues, $this->updateParams ); + SqlsrvUtil::updateWithPrepare( $this->conn, $this->tableName, $this->updateValues, $this->updateParams ); } } From aec0af581cf1eae4334de330c6c672cfba8743fa Mon Sep 17 00:00:00 2001 From: David Puglielli Date: Fri, 25 Aug 2017 15:15:24 -0700 Subject: [PATCH 5/5] Fixed driver names and typos --- .../benchmark/pdo_sqlsrv/PDOFetchLargeBench.php | 2 +- .../benchmark/sqlsrv/SqlsrvFetchLargeBench.php | 2 +- test/Performance/setup_env_windows.ps1 | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/test/Performance/benchmark/pdo_sqlsrv/PDOFetchLargeBench.php b/test/Performance/benchmark/pdo_sqlsrv/PDOFetchLargeBench.php index 26fab48c..c726d905 100644 --- a/test/Performance/benchmark/pdo_sqlsrv/PDOFetchLargeBench.php +++ b/test/Performance/benchmark/pdo_sqlsrv/PDOFetchLargeBench.php @@ -23,7 +23,7 @@ class PDOFetchLargeBench $this->conn = PDOSqlsrvUtil::connect(); } /* - * Each iteration calls prepare, execute and fetch APIs to fetch the already populdated data + * Each iteration calls prepare, execute and fetch APIs to fetch the already populated data */ public function benchFetchWithPrepare() { diff --git a/test/Performance/benchmark/sqlsrv/SqlsrvFetchLargeBench.php b/test/Performance/benchmark/sqlsrv/SqlsrvFetchLargeBench.php index 24dee142..cccf11ce 100644 --- a/test/Performance/benchmark/sqlsrv/SqlsrvFetchLargeBench.php +++ b/test/Performance/benchmark/sqlsrv/SqlsrvFetchLargeBench.php @@ -23,7 +23,7 @@ class SqlsrvFetchLargeBench $this->conn = SqlsrvUtil::connect(); } /* - * Each iteration calls prepare, execute and fetch APIs to fetch the already populdated data + * Each iteration calls prepare, execute and fetch APIs to fetch the already populated data */ public function benchFetchWithPrepare() { diff --git a/test/Performance/setup_env_windows.ps1 b/test/Performance/setup_env_windows.ps1 index a6b83633..bbafb8d2 100644 --- a/test/Performance/setup_env_windows.ps1 +++ b/test/Performance/setup_env_windows.ps1 @@ -41,18 +41,19 @@ $phpDir="C:\php" Remove-Item $phpDir -Recurse -ErrorAction Ignore New-Item -ItemType directory -Path $phpDir Expand-Archive $PHP_ZIP -DestinationPath $phpDir -Copy-Item $SQLSRV_DRIVER $phpDir\ext -Copy-Item $PDO_DRIVER $phpDir\ext + +# copy drivers to extensions directory and rename to a standard nomenclature +# for consistency with run-perf_tests.py +Copy-Item $SQLSRV_DRIVER $phpDir\ext\php_sqlsrv.dll +Copy-Item $PDO_DRIVER $phpDir\ext\php_pdo_sqlsrv.dll # setup driver Copy-Item $phpDir\php.ini-production $phpDir\php.ini Add-Content $phpDir\php.ini "extension=$phpDir\ext\php_openssl.dll" Add-Content $phpDir\php.ini "extension=$phpDir\ext\php_mbstring.dll" -$driverName=Split-Path $SQLSRV_DRIVER -leaf -Add-Content $phpDir\php.ini "extension=$phpDir\ext\$driverName" -$driverName=Split-Path $PDO_DRIVER -leaf -Add-Content $phpDir\php.ini "extension=$phpDir\ext\$driverName" +Add-Content $phpDir\php.ini "extension=$phpDir\ext\php_sqlsrv.dll" +Add-Content $phpDir\php.ini "extension=$phpDir\ext\php_pdo_sqlsrv.dll" Move-Item $phpDir\php.ini C:\Windows -force Copy-Item $phpDir\ssleay32.dll C:\Windows -force