From: Frank S. <fra...@rn...> - 2003-07-07 12:36:54
|
(Apologies, Nick, for accidentally replying off-list) I wasn't quite sure what you were getting at in your point 5, so I hope this answers your problem: I changed index.php, commenting out the setting of $DBParams. Instead I have a small php script that sets up just those values I want changed. I run a WikiFarm, and this is just the simplest thing to do, in my situation. Anyway, in that small setup script I have mysql> select host, user from user where user='wiki'; +-----------+------+ | host | user | +-----------+------+ | % | wiki | | 127.0.0.1 | wiki | +-----------+------+ and $DBParams = array( 'dbtype' => 'SQL', 'dsn' => 'mysql://wiki@localhost/wiki', 'timeout' => 20, ); I've just checked on my wiki at home (running on FreeBSD), and there I have mysql> select host, user from user where user='wiki'; +-----------+------+ | host | user | +-----------+------+ | % | wiki | | localhost | wiki | +-----------+------+ and $DBParams = array( 'dbtype' => 'SQL', 'dsn' => 'mysql://wiki:password@localhost/' . WIKI_NAME, 'timeout' => 20, ); where WIKI_NAME is the database name ('frank' in this case). In most cases, you'd just set the $DBParams in index.php, of course. frank > >>> "nh...@lu..." 07/07/03 12:38 >>> > > Ok well in that case. With this install I just used the > doc/INSTALL.mysql file to install phpwiki. Here are the steps I did. > > 1: mysqladmin -uuser -ppassword create phpwiki > 2: mysql -uuser -ppassword phpwiki > 3: GRANT select, insert, update, delete, lock tables > ON phpwiki.* > TO phpwiki@localhost > IDENTIFIED BY 'password'; > ( I am using mysql 4.0.13 ) > 4: mysql -uuser -ppassword phpwiki <schemas/mysql.sql > 5: Edit $DBParams in index.php to reflect your settings. > > a) $DBParams['dbtype'] should be set to 'SQL'. > b) $DBParams['dsn'] should be set to something like > 'mysql://username:password@host/phpwiki'. > in the file it was more like this: > 'dsn' => 'mysql://username:password@host/phpwiki' > > With doing that and following just the install directions in > doc/INSTALL.mysql > I get the following error on my webpage, as you can see for > yourself at > http://www.deepfog.net/phpwiki > > > lib/WikiDB/backend/PearDB.php:681: Fatal[256]: wikidb_backend_mysql: > fatal database error > > * DB Error: unknown error > * (LOCK TABLES page WRITE,version WRITE,link WRITE,recent > WRITE,nonempty WRITE [nativecode=1044 ** Access > denied for user: > 'phpwiki@localhost' to database 'phpwiki']) > > lib/config.php:276: Notice[8]: Undefined variable: SCRIPT_NAME > > > lib/config.php:381: Notice[1024]: The admin password cannot be empty. > Please update your /index.php > > > > This is my following the directions in doc/INSTALL.mysql and also the > directions to install on mysql 4.0.x in the FAQ on the webpage. Both > looked exactly the same except for the fact that I had to set the lock > tables perm. Also what is weird is that when I set up the > perms for the > database I also created a user for the database, phpwiki, well looks > like for some reason the user phpwiki cannot access the database even > though I set up the perms for that user like its telling me > to. As far > as I know I am doing what it says, please let me know if I am doing > anything wrong here. > > Thanks > > Nick > > > > > On Mon, 2003-07-07 at 03:51, Frank Shearar wrote: > > I'm a bit confused here - if you're using mysql, why are > you moving gdbms > > around? > > > > Which install instructions did you follow? ./INSTALL or > ./doc/INSTALL.mysql? > > > > The ./INSTALL file describes the procedure for installing a > gdbm backend, > > the default database (if I recall correctly). Seeing as a > gdbm is a binary > > file, that would explain why you're getting crap on your page. > > > > Which backend do you want to use? > > > > frank > > > > > >>> "nh...@lu..." 07/05/03 22:35 >>> > > > > > > Ok well that worked I guess, I got the main startup page > for the wiki > > > where it can the commands from the pgsrc directory and it > said it was > > > completed. Now I have another problem. I did what the > install file > > > said to do which was create a pages directory and have it > put the dbm > > > file there. I moved the wiki_pagedb.gdbm file from /tmp to > > > phpwiki/pages. I did a chown nobody:root pages and a chmod > > > 755 pages. > > > Now when I try to start the home page I get all the crap on > > > my page, it > > > looks to be encoded. If you wish to look here it is > > > http://www.deepfog.net/phpwiki . |