History of SetupMSSQL

Comparing versions
Version 4Current version
UNDER DEVELOPMENT

You should first read How to unstall Bitweaver under IIS 5

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

Firstly, create a new database in Enterprise Manager (SQL Server) or another tool (MSDE does not ship with Enterprise Manager). A good, free one is DBA Manager 2k. It can be called anything you like, I called mine 'BitWeaver'.

Create a new login in your database with the same name as the IIS anonymous user (default is 'servername\IUSR_servername'). Give that user the sysadmin server role and db_owner role on the database you just created.

Some modifications were made to the following files to get BitWeaver working:

in /util/phpsniff/phpSniff.class.php, change line 188 from:
{CODE()}$UA = ( $pv0 > 3 && $pv1 > 0 ) ? $_SERVERHTTP_USER_AGENT>'HTTP_USER_AGENT' : $HTTP_SERVER_VARSHTTP_USER_AGENT>'HTTP_USER_AGENT';{CODE}
to
{CODE()}$UA = ( $pv0 > 3 && $pv1 > 0 ) ? $_SERVERHTTP_USER_AGENT>'HTTP_USER_AGENT' : $_SERVERHTTP_USER_AGENT>'HTTP_USER_AGENT';{CODE}

added this below "case "mssql"" in "function convertQuery" (about line 552, /kernel/BitDb.php):
{CODE()}
$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;
{CODE}
changed this function in /user/BitUser.php (about line 1003):
{CODE()}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;
}{CODE}
 
You should first read How to install Bitweaver under IIS 5 (SetupIIS).

This guide assumes (and has been tested on):
  • Windows 2000 Server
  • IIS 5.0
  • MS-SQL Server 2000 or MS-SQL Server 2000 Desktop Edition (MSDE)
  • Bitweaver 1.0.3+
  • PHP 4.3+ or 5.0.4+

  1. SetupIIS
    • I had to set up IIS to use ISAPI - don't remember atm if this was a MSSQL-specific thing or just a Windows / IIS specific thing - cruggles
  2. Setup PHP (with ISAPI)
    • Download the PHP 4.x.x or PHP 5.x.x zip package
    • Extract php-x.x.x-Win32\extensions\ php_mssql.dll to C:\ PHP
    • Uncomment extension=php_mssql.dll to the extensions section of php.ini
    • PHP5: Add php5isapi.dll against ".php" to Application extension mappings
  3. Setup DB
    • TIP: To set up the databases you can use Enterprise Manager (for SQL Server) or another tool (MSDE does not ship with Enterprise Manager). A good, free one is DBA Manager 2k. The new SQL Server 2005 Express release can also be used, and there is a tool on the Microsoft site which allows you to browse your databases (you have to use SQL to make any changes though).
    • In Enterprise Manager, right-click on the database server, and select Properties
      • Change to the Security tab, and change Authentication to SQL Server and Windows
      • Press OK - you will be prompted to restart the SQL Server service.
    • Expand folders until you see the Security / Logins folder
      • Right-click and select New login...
      • Enter database user name eg bitweaver
      • For Authentication, select SQL Server Authentication
      • Enter a password
      • Switch to the Server Roles tab, and check the System Administrators checkbox
      • Press OK and confirm your password
    • Right-click on the Databases folder and select New Database...
      • Enter a Name eg bitweaver
      • Press OK
    • Right-click on the newly created database, and select __New / Database User..._
      • For Login name, select previously created user eg bitweaver
      • Check the db_owner checkbox
      • Press OK
  4. Visit your homepage http://localhost/bitweaver/install/install.php
  5. Follow the step and when prompted for database connection details, enter the information as created above.
  6. If you are unsuccessful at installing, you may need to do the following to get it to work- cruggles:
    1. Change /util/phpsniff/phpSniff.class.php line 188 HTTP_SERVER_VARS to _SERVER
    2. Change /util/adodb/drivers/adodb-mssql.inc.php line 661 - 666 from:

{CODE()}if ($len > 4000 ) {
// NVARCHAR is max 4000 chars. Let's use NTEXT
$decl .= "@P$i NTEXT";
} else {
$decl .= "@P$i NVARCHAR($len)";
}
$params .= "@P$i=N". (strncmp($v,"'",1)==0? $v : $this->qstr($v));{CODE}
to:
{CODE()}$decl .= "@P$i VARCHAR($len)";
$params .= "@P$i=". (strncmp($v,"'",1)==0? $v : $this->qstr($v));{CODE}
Can this be adjusted from PHP.INI? - wolff_borg:
; Valid range 0 - 2147483647. Default = 4096.
;mssql.textlimit = 4096

; Valid range 0 - 2147483647. Default = 4096.
;mssql.textsize = 4096


Outstanding issues:
  • Concatenates wiki body text (assuming at 255 chars)
I think this is a general IE bug? SF#1258034 - wolff_borg

Page History
Date/CommentUserIPVersion
28 Aug 2005 (10:31 UTC)
Added step by step instructions
Stephan Borg218.214.1.11320
Current • Source
Stephan Borg218.214.1.11318
View • Compare • Difference • Source
Stephan Borg218.214.1.11317
View • Compare • Difference • Source
Stephan Borg218.214.1.11316
View • Compare • Difference • Source
Stephan Borg218.214.1.11315
View • Compare • Difference • Source
Stephan Borg218.214.1.11314
View • Compare • Difference • Source
Chris Ruggles202.138.208.1989
View • Compare • Difference • Source
Chris Ruggles202.138.208.1985
View • Compare • Difference • Source
Chris Ruggles202.138.208.1984
View • Compare • Difference • Source
Chris Ruggles202.138.208.1981
View • Compare • Difference • Source