note 97495 added to mssql.configuration
| From: | BrendonCrawford at osu1 dot php dot net | Date: | Thu, 22 Apr 2010 23:00:48 +0000 |
| Subject: | note 97495 added to mssql.configuration | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168527@lists.php.net to get a copy of this message | ||
Use this to check the runtime tds version...
<?php
/**
*
* Checks runtime tds version for freetds with mssql
*
* @author Brendon Crawford
* @see http://us.php.net/manual/en/mssql.configuration.php
* @param string $dbHost
* @param int $dbPort
* @param string $dbUser
* @param string $dbPass
* @return float
*
*/
function checkTdsVersion($dbHost, $dbPort, $dbUser, $dbPass) {
$cmd = sprintf(
'echo "version" | ' .
" tsql " .
" -H '%s' " .
" -p '%s' " .
" -U '%s' " .
" -P '%s' " .
" -o q | " .
"cut -d ' ' -f4 ",
escapeshellarg($dbHost),
escapeshellarg($dbPort),
escapeshellarg($dbUser),
escapeshellarg($dbPass)
);
$ver = (float)shell_exec($cmd);
return $ver;
}
?>
----
Server IP: 208.69.120.55
Probable Submitter: 98.149.129.107
----
Manual Page -- http://www.php.net/manual/en/mssql.configuration.php
Edit -- https://master.php.net/note/edit/97495
Del: integrated -- https://master.php.net/note/delete/97495/integrated
Del: useless -- https://master.php.net/note/delete/97495/useless
Del: bad code -- https://master.php.net/note/delete/97495/bad+code
Del: spam -- https://master.php.net/note/delete/97495/spam
Del: non-english -- https://master.php.net/note/delete/97495/non-english
Del: in docs -- https://master.php.net/note/delete/97495/in+docs
Del: other reasons-- https://master.php.net/note/delete/97495
Reject -- https://master.php.net/note/reject/97495
Search -- https://master.php.net/manage/user-notes.php