I can't get phpwiki to work, I have set up everything in the config file, but I get this:
lib/WikiDB/backend/PearDB.php:34: Fatal: Can't connect to database: wikidb_backend_peardb: fatal database error
* DB Error: not found
* (Unable to include the DB/.php file for `')
lib/pear/DB.php:282: Warning: connect(DB/.php): failed to open stream: No such file or directory
lib/pear/DB.php:282: Warning: connect(): Failed opening 'DB/.php' for inclusion (include_path='.:/home/fishman/pablo-zurita/phpwiki:/home/fishman/pablo-zurita/phpwiki/lib/pear')
I really don't know what else to do, I have tried to install it 4 times already.
BTW, the username and password for the database is right, and it has access to read and write.
I'm new to php & phpwiki, but looking at the code in PearDB.php, it looks like phpwiki cannot figure out what type of database you are using from your database dsn. It tries to find the type, and gets the empty string "" and then tries to open the file whose name is ".php" from the DB directory, I think it should be getting type "mysql" and then opening "mysql.php". I would check the settings of DATABASE_TYPE and DATABSE_DSN in the config file.
DATABASE_TYPE = SQL
DATABASE_DSN = "mysql://<my username>:<my password>@<my host>/<my db>"
Everything seems right.
I also have the following line to make sure that it can find the DB.php and PEAR.php
INCLUDE_PATH = ".:/usr/share/php"
I have better luck using
DATABASE_TYPE = ADODB
You will need to chagne the following...
require_once('DB.php'); // Always favor use our local pear copy
require_once('lib/pear/DB.php'); // Always favor use our local pear copy
and if you have not made this change yet, consider it...
if (SCRIPT_FILENAME == __FILE__)
//if (SCRIPT_FILENAME == __FILE__)
Oohhh... and don't forget to update your mysql DB with the new tables and table changes.
FYI... I have found 1.3.10 to be very buggy and have reveret to 1.3.9.
These instructions got my wiki up and running on OSX! Ta.
I get the following error:
lib/WikiDB/backend/PearDB.php:778: Fatal: wikidb_backend_mysql: fatal database error
DB Error: no such table
(SELECT phpwiki_page.id as id, phpwiki_page.pagename as pagename, phpwiki_page.hits as hits, phpwiki_page.pagedata as pagedata FROM phpwiki_page WHERE pagename='global_data' [nativecode=1146 ** Table 'phpwiki.phpwiki_page' doesn't exist])
It seems that the phpwiki_page table doesn't exist in the database.
I used schemas/mysql.sql file to install the tables in the database.
Is mysql.sql file incompete?
no. but you set the prefix "phpwiki" for your database,
but didn't create the tables with this prefix.
I commented out the DATABASE_PREFIX = phpwiki_ entry in config.ini and it works fine now.
Well... Thanks Keith McCreery, that helped... I am now getting a different error message, so that is progress.... :-)
Anyone got any ideas how to move past this one?
Fatal error: Failed opening required '/lib/pear/DB.php' (include_path='.:/usr/local/lib/php') in ....../wiki/lib/WikiDB/backend/PearDB.php on line 7
Well I got that figured out too... extra '/' should have been 'lib/pear/DB.php'
So now I get no errors... just a blank page :-(
If you get a blank page, check out the comment in index.php near the end:
// If your lib/main.php is not loaded, comment that out, and
// uncomment the include "lib/main.php" line below.
I forgot exactly why this happens sometimes.
We need it to support farms/version with simple starter scripts overriding theme, lang, db, options, ...
It fails sometimes because of php problems with the underlying webserver.
SCRIPT_FILENAME (from apache) != FILE (from php)
Normally it should be the same, but sometimes apache fools SCRIPT_FILENAME.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.