When I tried to install phpWiki with a MySQL database on my virtual server (hosted web site) site, I was a bit unsure what to do in the database section of index.php
And, when I had done what it appeared on first glace that I needed to do, I got an error saying that a ) was expeced on line 201 - which is the line with the mysql database stuff on it.
My server is running MySQL v 3.23.45 and PHP version 4.06
I did create a database revmac_phpwiki and used the mysql.php file in teh schema directory to set up tables, etc.
The precise text of part 2 of my index.php is included here:
/////////////////////////////////////////////////////////////////////
//
// Part Two:
// Database Selection
//
/////////////////////////////////////////////////////////////////////
//
// This array holds the parameters which select the database to use.
//
// Not all of these parameters are used by any particular DB backend.
//
$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:
//
mysql://user:password@host/databasename,
//
// 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' => 'phpwiki_',
// 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
);
----------
I havew no doubts that I am confused with this section. If someone could assist me, I would greatly appreciate it. My email is jmcmanus@ev1.net if someone wants to respond in that manner.
Thanks,
RevMac
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When I tried to install phpWiki with a MySQL database on my virtual server (hosted web site) site, I was a bit unsure what to do in the database section of index.php
And, when I had done what it appeared on first glace that I needed to do, I got an error saying that a ) was expeced on line 201 - which is the line with the mysql database stuff on it.
My server is running MySQL v 3.23.45 and PHP version 4.06
I did create a database revmac_phpwiki and used the mysql.php file in teh schema directory to set up tables, etc.
The precise text of part 2 of my index.php is included here:
/////////////////////////////////////////////////////////////////////
//
// Part Two:
// Database Selection
//
/////////////////////////////////////////////////////////////////////
//
// This array holds the parameters which select the database to use.
//
// Not all of these parameters are used by any particular DB backend.
//
$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:
//
mysql://user:password@host/databasename,
//
// 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' => 'phpwiki_',
// 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
);
----------
I havew no doubts that I am confused with this section. If someone could assist me, I would greatly appreciate it. My email is jmcmanus@ev1.net if someone wants to respond in that manner.
Thanks,
RevMac
Instead of:
mysql://user:password@host/databasename,
you need to put:
'dsn' => 'mysql://user:password@host/databasename',
(And of course you need to put your real
username, password, mysq