History of SetupMSSQL
Version 1
SetupMSSQL
Instructions on how to setup BitWeaver on Microsoft SQL Server
Created by: Chris Ruggles, Last modification: 02 Aug 2005 (04:45 UTC) by Chris Ruggles
UNDER DEVELOPMENT
This guide assumes (and has been tested on):
in /util/phpsniff/phpSniff.class.php, change line 188 from:
$UA = ( $pv0 > 3 && $pv1 > 0 ) ? $_SERVERHTTP_USER_AGENT>'HTTP_USER_AGENT' : $HTTP_SERVER_VARSHTTP_USER_AGENT>'HTTP_USER_AGENT';
to
$UA = ( $pv0 > 3 && $pv1 > 0 ) ? $_SERVERHTTP_USER_AGENT>'HTTP_USER_AGENT' : $_SERVERHTTP_USER_AGENT>'HTTP_USER_AGENT';
added this below "case "mssql"" in "function convertQuery" (about line 552, /kernel/BitDb.php):
$pQuery = preg_replace("/`/", "", $pQuery);
$pQuery = str_replace("AS user,", "AS user_login,", $pQuery);
$pQuery = str_replace("=? ASC", " ASC", $pQuery);
$pQuery = str_replace("=? DESC", " DESC", $pQuery);
break;
changed this function in /user/BitUser.php (about line 1003):
function isPasswordDue() {
$ret = FALSE;
if( $this->isRegistered() ) {
// get user_id to avoid NULL and zero confusion
$query = "SELECT `user_id`, `pass_due`
FROM `".BIT_DB_PREFIX."users_users`
WHERE `pass_due` IS NOT NULL AND `login`=? ";
$due = $this->GetAssoc( $query, array( (string) $this->mUserId ) );
if( !empty( $dueuser_id>'user_id' ) ) {
$ret = $duepass_due>'pass_due' <= date("U");
}
}
return $ret;
}
This guide assumes (and has been tested on):
- Windows 2000 Server
- IIS 5.0
- MSDE (SQL Server 2000 Desktop Edition)
- Bitweaver 1.0.1
- PHP 5.0.4
in /util/phpsniff/phpSniff.class.php, change line 188 from:
$UA = ( $pv0 > 3 && $pv1 > 0 ) ? $_SERVERHTTP_USER_AGENT>'HTTP_USER_AGENT' : $HTTP_SERVER_VARSHTTP_USER_AGENT>'HTTP_USER_AGENT';
to
$UA = ( $pv0 > 3 && $pv1 > 0 ) ? $_SERVERHTTP_USER_AGENT>'HTTP_USER_AGENT' : $_SERVERHTTP_USER_AGENT>'HTTP_USER_AGENT';
added this below "case "mssql"" in "function convertQuery" (about line 552, /kernel/BitDb.php):
$pQuery = preg_replace("/`/", "", $pQuery);
$pQuery = str_replace("AS user,", "AS user_login,", $pQuery);
$pQuery = str_replace("=? ASC", " ASC", $pQuery);
$pQuery = str_replace("=? DESC", " DESC", $pQuery);
break;
changed this function in /user/BitUser.php (about line 1003):
function isPasswordDue() {
$ret = FALSE;
if( $this->isRegistered() ) {
// get user_id to avoid NULL and zero confusion
$query = "SELECT `user_id`, `pass_due`
FROM `".BIT_DB_PREFIX."users_users`
WHERE `pass_due` IS NOT NULL AND `login`=? ";
$due = $this->GetAssoc( $query, array( (string) $this->mUserId ) );
if( !empty( $dueuser_id>'user_id' ) ) {
$ret = $duepass_due>'pass_due' <= date("U");
}
}
return $ret;
}