From: Sandy M. <mat...@bt...> - 2003-01-05 14:38:25
|
I will be setting up multiple WIKIs over the coming few weeks and wonder if someone could advise me as to the best way of doing this. Each WIKI will be entirely separate and under it's own domain. I have an ISP account with DSVR in the UK who allow multiple domains as well as multiple MySQL databases. I intend to set up each WIKI under the root of the relevant domain. Is it best to have a separate MySQL database for each WIKI? I would prefer to have one database with pre-fixes for the table names for each WIKI as this would allow for easy backup. How do you set this up and is these a limit to the number of WIKIs you can support from one database? Also will there be any speed hit with supporting multiple WIKIs on one database? Thanks for your help. Sandy Matheson |
From: Sandy M. <mat...@bt...> - 2003-01-07 12:21:15
|
Not had a reply so I have gone ahead to set up a second WIKI on the same MySQL database and hit a problem. I have set up the database tables fine using a prefix of 'newport_' and in index.php I have enabled 'prefix' => 'newport_' on line 228. When I access the website to set it up I get the error: Parse error: parse error, expecting `')'' in /usr/local/home/httpd/vhtdocs/newportparish.org.uk/index.php on line 228 The full part of this array in index.php is listed below I am using PHPWiki version 1.3.3. Can anyone help, or point me in the right direction? Sandy Matheson _____________________________________ Index.php: $DBParams = array( // Select the database type: 'dbtype' => 'SQL', // 'dbtype' => 'dba', // For SQL based backends, specify the database as a DSN // The most general form of a DSN looks like: // // phptype(dbsyntax)://username:password@protocol+hostspec/database // // For a MySQL database, the following should work: // ///////////////// CHANGE THIS//////////////////////////////////////// 'dsn' => 'mysql://username:password@localhost/databasename' ///////////////// CHANGE THIS//////////////////////////////////////// // // FIXME: My version Pear::DB seems to be broken enough that there // is no way to connect to a mysql server over a socket right now. //'dsn' => 'mysql://guest@:/var/lib/mysql/mysql.sock/test', //'dsn' => 'mysql://guest@localhost/test', //'dsn' => 'pgsql://localhost/test', // Used by all DB types: // prefix for filenames or table names /* * currently you MUST EDIT THE SQL file too (in the schemas/ * directory because we aren't doing on the fly sql generation * during the installation. */ 'prefix' => 'newport_' // Used by 'dba' //'directory' => "/tmp"', //'dba_handler' => 'gdbm', // Either of 'gdbm' or 'db2' work great for me. //'dba_handler' => 'db2', //'dba_handler' => 'db3', // doesn't work at all for me.... //'timeout' => 20, //'timeout' => 5 ); |
From: Bob A. <apt...@cy...> - 2003-01-07 15:56:44
|
On Tue, 7 Jan 2003 12:21:19 -0000 "Sandy Matheson" <mat...@bt...> wrote: > Not had a reply so I have gone ahead to set up a second WIKI on the same > MySQL database and hit a problem. > > I have set up the database tables fine using a prefix of 'newport_' and > in index.php I have enabled 'prefix' => 'newport_' on line 228. > > When I access the website to set it up I get the error: > > Parse error: parse error, expecting `')'' in > /usr/local/home/httpd/vhtdocs/newportparish.org.uk/index.php on line 228 You're missing a comma; strip the comments and all will become clear: > _____________________________________ > > > Index.php: > > $DBParams = array( > 'dbtype' => 'SQL', > 'dsn' => 'mysql://username:password@localhost/databasename' > 'prefix' => 'newport_' > ); Add comma after 'dsn'='mysql...' hth, -- Bob |
From: Sandy M. <mat...@bt...> - 2003-01-07 20:27:55
|
Thanks for the help. Index.php now gets through this OK and starts to load, but locks just after creating the TextFormattingRules page. HOWEVER if I set up an entirely new MySQL database and use the same index.php file (i.e. only altering the 'prefix' part as well as database, username and password), then everything works fine. I can use multiple databases, but backing up will be so much easier with one database using PHPMyAdmin. Any ideas? Thanks, Sandy -----Original Message----- From: php...@li... [mailto:php...@li...] On Behalf Of Bob Apthorpe Sent: 07 January 2003 15:53 To: php...@li... Subject: Re: [Phpwiki-talk] Multiple WIKIs On Tue, 7 Jan 2003 12:21:19 -0000 "Sandy Matheson" <mat...@bt...> wrote: > Not had a reply so I have gone ahead to set up a second WIKI on the same > MySQL database and hit a problem. > > I have set up the database tables fine using a prefix of 'newport_' and > in index.php I have enabled 'prefix' => 'newport_' on line 228. > > When I access the website to set it up I get the error: > > Parse error: parse error, expecting `')'' in > /usr/local/home/httpd/vhtdocs/newportparish.org.uk/index.php on line 228 You're missing a comma; strip the comments and all will become clear: > _____________________________________ > > > Index.php: > > $DBParams = array( > 'dbtype' => 'SQL', > 'dsn' => 'mysql://username:password@localhost/databasename' > 'prefix' => 'newport_' > ); Add comma after 'dsn'='mysql...' hth, -- Bob ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ Phpwiki-talk mailing list Php...@li... https://lists.sourceforge.net/lists/listinfo/phpwiki-talk |
From: Alexandre D. <al...@co...> - 2003-01-14 14:48:12
|
On Tue, 7 Jan 2003, Sandy Matheson wrote: > Thanks for the help. > > Index.php now gets through this OK and starts to load, but locks just > after creating the TextFormattingRules page. > > HOWEVER if I set up an entirely new MySQL database and use the same > index.php file (i.e. only altering the 'prefix' part as well as > database, username and password), then everything works fine. Using prefix in table namespace ? I don't think it's a great idea. Why don't you create a new database ? (For performance & so on... It's also better) > > I can use multiple databases, but backing up will be so much easier with > one database using PHPMyAdmin. I don't know how PHPMyAdmin works. But we have a multitude of wiki on the same machine and we have a comment method for expressing the database name : phpwikidb-XXXX. For the backup, we have a custom script doing a mysqlshow and dumping all the db starting with phpwikidb-. Clean and working like a charm. Have a nice day. adulau -- Alexandre Dulaunoy -- http://www.foo.be/ 3B12 DCC2 82FA 2931 2F5B 709A 09E2 CD49 44E6 CBCD --- AD993-6BONE "People who fight may lose.People who do not fight have already lost." Bertolt Brecht |