From: Jean-Christian I. <jea...@mi...> - 2004-08-09 04:50:53
|
I'm trying to get phpwiki up and running with a postgres database and I'm finding the documentation a bit sparse ... Here are my questions/comments so far: #1 Do I need to initdb with any special encoding? (I'm hoping that phpwiki creates all the tables it needs and with the correct encoding but I might be wrong). I want to use UTF-8, and have set config.ini to utf-8 but I am worried that I need to initialize my DB with UTF-8 encoding too ... In a perfect world phpwiki would create the tables using the encoding given in config.ini regardless of what initdb did. #2 How does one describe a DSN in the config file for a postgres DB running on the same machine as phpwiki? The config.ini file suggests: dbtype(dbsyntax)://username:password@protocol+hostspec/database But what is dbtype for postgres? pgsql? postgres? postgresql? And what is the 'protocol+hostspec' string? Adding more examples of DSN strings to the config file would be very useful for first time installers like myself. #3 From the above example for a DSN I assume that I need to create the DB myself? I didn't see anywhere in the documentation that said I needed to create a DB ... why can't phpwiki create the DB itself? Thanks! -- Jean-Christian Imbeault Assistant Manager Technology Department _____________________________________ Mizuho Securities Co, Ltd. Tel: (03) 5208-2932 (direct) |
From: Reini U. <ru...@x-...> - 2004-08-09 10:41:44
|
Jean-Christian Imbeault schrieb: > I'm trying to get phpwiki up and running with a postgres database and > I'm finding the documentation a bit sparse ... > > Here are my questions/comments so far: > > #1 Do I need to initdb with any special encoding? yes. > (I'm hoping that > phpwiki creates all the tables it needs and with the correct encoding > but I might be wrong). I want to use UTF-8, and have set config.ini to > utf-8 but I am worried that I need to initialize my DB with UTF-8 > encoding too ... > > In a perfect world phpwiki would create the tables using the encoding > given in config.ini regardless of what initdb did. phpwiki does not create the database and does not create any tables. The rest of your questions are not phpwiki specific at all. You have to make your own decisions, based on other (external) libraries and modules. If not, use the default gdbm. > #2 How does one describe a DSN in the config file for a postgres DB > running on the same machine as phpwiki? The config.ini file suggests: > > dbtype(dbsyntax)://username:password@protocol+hostspec/database > > But what is dbtype for postgres? pgsql > pgsql? postgres? postgresql? And what > is the 'protocol+hostspec' string? My dsn is "pgsql://rurban:@localhost/template1" But this is for cygwin, which doesn't run well over sockets. Postgres doesn't use TCP per default, just a socket. so it might something like: "pgsql://user:password@unix+localhost(/var/postgresql/data/postgresql.sock)/template1?persistent=0" Please google for any database documentation on DSN strings. This is not phpwiki specific. See esp. the Pear::DB documentation. * + phptype: Database backend used in PHP (mysql, odbc etc.) * + dbsyntax: Database used with regards to SQL syntax etc. * + protocol: Communication protocol to use (tcp, unix etc.) * + hostspec: Host specification (hostname[:port]) * + database: Database to use on the DBMS server * + username: User name for login * + password: Password for login * The format of the supplied DSN is in its fullest form: * <code> * phptype(dbsyntax)://username:password@protocol+hostspec/database?option=8&another=true * </code> * * Most variations are allowed: * <code> * phptype://username:password@protocol+hostspec:110//usr/db_file.db?mode=0644 * phptype://username:password@hostspec/database_name * phptype://username:password@hostspec * phptype://username@hostspec * phptype://hostspec/database * phptype://hostspec * phptype(dbsyntax) * phptype * </code> > Adding more examples of DSN strings to the config file would be very > useful for first time installers like myself. This was taken from lib/pear/DB.php > #3 From the above example for a DSN I assume that I need to create the > DB myself? I didn't see anywhere in the documentation that said I needed > to create a DB ... why can't phpwiki create the DB itself? Because we have no installer yet. And we didn't want to store the DB root password anywhere. There's a Makefile which you might find useful. You need to set the root name and password though. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: Jean-Christian I. <jea...@mi...> - 2004-08-10 00:35:30
|
Reini Urban wrote: > > phpwiki does not create the database and does not create any tables. Huh? If phpwiki does not create the tables, who does? The install docs don't mention the need to create any tables ... > The rest of your questions are not phpwiki specific at all. Sure they are, without it I can't get phpwiki up and running :) I'm trying to install phpwiki and the installation documentation doesn't cover my specific installation platform very well and I need help. > You have to make your own decisions, based on other (external) libraries > and modules. > If not, use the default gdbm. gdbm not installed and I don't have root access. > Please google for any database documentation on DSN strings. This is not > phpwiki specific. See esp. the Pear::DB documentation. > > * + phptype: Database backend used in PHP (mysql, odbc etc.) > * + dbsyntax: Database used with regards to SQL syntax etc. > * + protocol: Communication protocol to use (tcp, unix etc.) > * + hostspec: Host specification (hostname[:port]) > * + database: Database to use on the DBMS server > * + username: User name for login > * + password: Password for login Ah ... much better. Now *that* (or a link to it) in the installation docs would be of great help to future new users. >> #3 From the above example for a DSN I assume that I need to create the >> DB myself? I didn't see anywhere in the documentation that said I needed >> to create a DB ... why can't phpwiki create the DB itself? > > Because we have no installer yet. > And we didn't want to store the DB root password anywhere. Couldn't phpwiki ask for the password once, just to create the DB and necessary tables? > There's a Makefile which you might find useful. > You need to set the root name and password though. I assume that's a Makefile for creating the db stuff? I'll try and find it and see what I can make of it. Unfortunately phpwiki won't run on my php5 installation b/c of some fatal errors. I'll check to make sure I have the most recent version of phpwiki but if it won't run on php5 getting a connection to postgresql might be moot :( That would be a shame as we were hoping to use it as our internal wiki Thanks for the helpful info! -- Jean-Christian Imbeault Assistant Manager Technology Department _____________________________________ Mizuho Securities Co, Ltd. Tel: (03) 5208-2932 (direct) |
From: Jim C. <ji...@iN...> - 2004-08-10 00:58:44
|
Jean-Christian Imbeault wrote: > Reini Urban wrote: >> phpwiki does not create the database and does not create any tables. > > Huh? If phpwiki does not create the tables, who does? The install docs > don't mention the need to create any tables ... The person doing the install creates the tables. See doc/INSTALL.mysql, for example. Basically, phpwiki comes with the instructions needed to create the table structure, but has chosen to not run them in automatically. I guess it would make upgrading difficult :-) >>> #3 From the above example for a DSN I assume that I need to create the >>> DB myself? I didn't see anywhere in the documentation that said I needed >>> to create a DB ... why can't phpwiki create the DB itself? If you don't have the doc/INSTALL.* files, perhaps something in your original download is broken or missing. I had a quick glance at SF's CVS web interface, and didn't see the doc files, so are you perhaps trying to install a CVS version? (sorry, I hadn't read much of the preceding thread). Take a copy of the 1.3.10 tar file, and look in there. > Unfortunately phpwiki won't run on my php5 installation b/c of some > fatal errors. php5 is "really new". It's a shame that you are constrained to only use php5. -jim |
From: Reini U. <ru...@x-...> - 2004-08-10 09:52:27
|
Jean-Christian Imbeault schrieb: > Reini Urban wrote: > >> >> phpwiki does not create the database and does not create any tables. > > > Huh? If phpwiki does not create the tables, who does? The install docs > don't mention the need to create any tables ... see the appropriate INSTALL.<database> files. >> The rest of your questions are not phpwiki specific at all. > > Sure they are, without it I can't get phpwiki up and running :) I'm > trying to install phpwiki and the installation documentation doesn't > cover my specific installation platform very well and I need help. Before you can run install you have to install and configure some prerequisites. If you choose postgres be sure you understand the configuration of your database and PHP database backend (Pear::Db or ADODB). In both cases the DSN is the same. >> You have to make your own decisions, based on other (external) >> libraries and modules. >> If not, use the default gdbm. > > > gdbm not installed and I don't have root access. > >> Please google for any database documentation on DSN strings. This is >> not phpwiki specific. See esp. the Pear::DB documentation. >> >> * + phptype: Database backend used in PHP (mysql, odbc etc.) >> * + dbsyntax: Database used with regards to SQL syntax etc. >> * + protocol: Communication protocol to use (tcp, unix etc.) >> * + hostspec: Host specification (hostname[:port]) >> * + database: Database to use on the DBMS server >> * + username: User name for login >> * + password: Password for login > > Ah ... much better. Now *that* (or a link to it) in the installation > docs would be of great help to future new users. admitted. >>> #3 From the above example for a DSN I assume that I need to create the >>> DB myself? I didn't see anywhere in the documentation that said I needed >>> to create a DB ... why can't phpwiki create the DB itself? >> >> Because we have no installer yet. >> And we didn't want to store the DB root password anywhere. > > Couldn't phpwiki ask for the password once, just to create the DB and > necessary tables? Because we have no installer yet. >> There's a Makefile which you might find useful. >> You need to set the root name and password though. > > I assume that's a Makefile for creating the db stuff? I'll try and find > it and see what I can make of it. See the targets. make install-database is a good tip, but it needs some Makefile settings. I would advise to read before writing, though I have to admit that asking is quite easy. > Unfortunately phpwiki won't run on my php5 installation b/c of some > fatal errors. > > I'll check to make sure I have the most recent version of phpwiki but if > it won't run on php5 getting a connection to postgresql might be moot :( > That would be a shame as we were hoping to use it as our internal wiki Only the latest CVS version will run unpatched with php5-RC2. Other versions need some fixes in the errorhandler (make E_STRICT non-fatal) or need a patch for lib/WikiUserNew.php. I know of one other wikiengine which runs (only) on php5: "cowiki" -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |