Running 1.2.1 successfully with Mac OS X, Apache & php406.
I decided to try 1.3.1 (also tried the latest CVS) on a second database but can't get it to work, index.php produces the error below in my browser.
----
lib/FileFinder.php:82: Fatal[256]: DB.php: file not found
WikiFatalError
lib/FileFinder.php:82: Fatal[256]: DB.php: file not found
----
I created a second database called "phpwiki131" and entered the new schema for 1.3.1. MySQL permissions seem fine, I'm using the same userid "wikiuser" and "password" as I am for my 1.2 database which is named "phpwiki".
Directory permissions are all fine, identical for both 1.2 and 1.3 directories.
index.php [colon] is actually just a : I saw how Sourceforge messed up the dsn in another thread.
// 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
// 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
);
----
The error says file DB.php not found, indeed there is no such file (Should it be looking for SQL.db instead?)
Maybe the mySQL support isn't really working yet for 1.3.1? I've tried with 1.3.1, and updated from the CVS a few times since Oct 31, still no go.
Thank you for any suggestions,
Carsten
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
DB.php is part of the Pear library of PHP code (which ships with PHP4, at least since PHP 4.04). It is used by phpwiki 1.3.1 to access SQL databases in a (relatively) generic manner.
I suspect that either: PHP's include_path is not configured so that PHP can find the Pear code,
or your installation of PHP code doesn't include the Pear code.
On my (Linux Redhat) computer the pear code is installed in /usr/share/php/. That directory contains 'PEAR.php', 'DB.php', a subdirectory named 'DB' as well as a bunch of other php source files. Search your computer for 'PEAR.php' or 'DB.php' and see if you can find it.
Assuming you can find the pear code on your computer, you then need to set PHP's include_path so that PHP can find the Pear code. The simplest way to do this is to edit (Phpwiki's) index.php (near the top, in "part zero"). Something like:
ini_set('include_path', '.:/usr/share/php');
should do the trick.
(Your config settings look fine...)
If you can't find the Pear code on your computer, get back to me.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I 'locate'd the DB.php & PEAR.php files as you suggested, they were there but I had to include this in index.php:
ini_set('include_path', '.:/System/Library/PHP');
Mac OS X does come with the PHP support files installed in the above directory, but I installed the newer version 4.0.6 of the php so module for Apache. For some reason the rest of it wasn't installed in /usr/share/php, but Wiki 1.3 seems to be working fine now with the Apple-supplied support files in /System/Library/PHP.
In any case it remains to be seen why my system couldn't find the files on it's own, either there is a problem with the Apple default configuration or else I somehow messed up the update, I suspect the latter.
Thanks again,
Carsten
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm glad you got it working. I'll try to remember to add a note to the install docs tomorrow.
On my system (again, Redhat Linux), the PHP include_path is set in the site wide PHP file, /etc/php.ini, which contains the line:
include_path = ".:/usr/share/php"
You could also set the include path in the apache site config file (on my system: /etc/http/conf/http.conf) with something like:
php_value include_path .:/usr/share/php
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Running 1.2.1 successfully with Mac OS X, Apache & php406.
I decided to try 1.3.1 (also tried the latest CVS) on a second database but can't get it to work, index.php produces the error below in my browser.
----
lib/FileFinder.php:82: Fatal[256]: DB.php: file not found
WikiFatalError
lib/FileFinder.php:82: Fatal[256]: DB.php: file not found
----
I created a second database called "phpwiki131" and entered the new schema for 1.3.1. MySQL permissions seem fine, I'm using the same userid "wikiuser" and "password" as I am for my 1.2 database which is named "phpwiki".
Directory permissions are all fine, identical for both 1.2 and 1.3 directories.
index.php [colon] is actually just a : I saw how Sourceforge messed up the dsn in another thread.
$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
'dsn' => 'mysql[colon]//wikiuser[colon]password@localhost/phpwiki131',
// 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
);
----
The error says file DB.php not found, indeed there is no such file (Should it be looking for SQL.db instead?)
Maybe the mySQL support isn't really working yet for 1.3.1? I've tried with 1.3.1, and updated from the CVS a few times since Oct 31, still no go.
Thank you for any suggestions,
Carsten
Hi Carsten,
DB.php is part of the Pear library of PHP code (which ships with PHP4, at least since PHP 4.04). It is used by phpwiki 1.3.1 to access SQL databases in a (relatively) generic manner.
I suspect that either: PHP's include_path is not configured so that PHP can find the Pear code,
or your installation of PHP code doesn't include the Pear code.
On my (Linux Redhat) computer the pear code is installed in /usr/share/php/. That directory contains 'PEAR.php', 'DB.php', a subdirectory named 'DB' as well as a bunch of other php source files. Search your computer for 'PEAR.php' or 'DB.php' and see if you can find it.
Assuming you can find the pear code on your computer, you then need to set PHP's include_path so that PHP can find the Pear code. The simplest way to do this is to edit (Phpwiki's) index.php (near the top, in "part zero"). Something like:
ini_set('include_path', '.:/usr/share/php');
should do the trick.
(Your config settings look fine...)
If you can't find the Pear code on your computer, get back to me.
Thank you! Wiki 1.3 works now!!!
I 'locate'd the DB.php & PEAR.php files as you suggested, they were there but I had to include this in index.php:
ini_set('include_path', '.:/System/Library/PHP');
Mac OS X does come with the PHP support files installed in the above directory, but I installed the newer version 4.0.6 of the php so module for Apache. For some reason the rest of it wasn't installed in /usr/share/php, but Wiki 1.3 seems to be working fine now with the Apple-supplied support files in /System/Library/PHP.
In any case it remains to be seen why my system couldn't find the files on it's own, either there is a problem with the Apple default configuration or else I somehow messed up the update, I suspect the latter.
Thanks again,
Carsten
I'm glad you got it working. I'll try to remember to add a note to the install docs tomorrow.
On my system (again, Redhat Linux), the PHP include_path is set in the site wide PHP file, /etc/php.ini, which contains the line:
include_path = ".:/usr/share/php"
You could also set the include path in the apache site config file (on my system: /etc/http/conf/http.conf) with something like:
php_value include_path .:/usr/share/php