1 Note: this is the email I got when the files were contributed. I cannot test
2 the code, since I don't have access to mssql, so ymmv. The files referenced
6 admin/translate_mysql.pl (you probably won't need this)
8 The code for lib/config.php has already been added.
13 From: Andrew.Pearson@barclayscapital.com
15 Cc: phpwiki-talk@lists.sourceforge.net
16 Subject: PHPWiki with Microsoft SQL-Server
17 Date: Tue, 1 May 2001 16:26:50 +0100
21 My colleague John Clayton set up PHPWiki for our development team using
22 Apache and MySQL on Windows NT 4. He then left, and I was asked to port
23 this to IIS and SQLServer. Please note this is not a reflection of the
24 Apache and MySQL products, which were performing the task admirably, but had
25 more to do with consistency of our environment. Since PHP does work with
26 SQL-Server, the whole migration took about a day. Here are the steps I
29 1. Wrote a sql-server library called mssql.php to reside in wiki\lib.
31 2. Added the following clause to wiki\lib\config.php
32 // MS SQLServer settings
33 } elseif ($WhichDatabase == 'mssql') {
34 $WikiPageStore = "wiki";
35 $ArchivePageStore = "archive";
36 $WikiLinksStore = "wikilinks";
37 $WikiScoreStore = "wikiscore";
38 $HitCountStore = "hitcount";
39 $mssql_server = 'servername';
40 $mssql_user = 'wikiweb';
41 $mssql_pwd = 'wikiweb';
43 include "lib/mssql.php";
46 3. Set $WhichDatabase='mssql' in config.php
48 4. Dumped out the mysql wiki database (mysqldump --user=john
49 --host=localhost wiki) and wrote the following perl script to convert to
50 sql-server compatible sql
51 <<translate_mysql.pl>>
53 5. Loaded the translated db script into SQL-Server and granted relevant
54 permissions/logins etc.
56 6. Set "magic_quotes_sybase=On" in php.ini to handle embedded quote
57 characters in strings. This is because SQL-Server, like Sybase, uses ''
58 instead of \' within strings to cope with embedded quotes.
60 We had some problems initially with the PHP extension dll for sql-server,
61 but I installed a newer version from http://www.mm4.de. In fact I unpacked
62 their whole php4.0.5-rc1 distribution.
64 I make no claims about all this working 100%, but our existing site seems to
65 work okay in its new IIS/SQL-Server home :-)
73 --------------------------------------------------------------------------------------
74 For more information about Barclays Capital, please
75 visit our web site at http://www.barcap.com.
78 Internet communications are not secure and therefore the Barclays Group
79 does not accept legal responsibility for the contents of this message.
80 Any views or opinions presented are solely those of the author and do
81 not necessarily represent those of the Barclays Group unless otherwise
84 --------------------------------------------------------------------------------------