Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
Hi I am new to phpwiki. I was able to install phpwiki succesfully using a flatfile, but want
to use it with a database, either Oracle (preferably
or MySQL). When I set it up for oracle, following all instructions, I get this error:
lib/WikiDB/backend/PearDB.php:59: Error: Can't connect to database: wikidb_backend_peardb_oci8: fatal database error
* DB Error: extension not found
I am using the following:
RHEL4 with SELinux turned off
I have tried many things, all sorts
of varision of the DN connect string, with
and without the port, using the Ip instead
of the hostname, etc etc. no luck. I also
made phpinfo.php file and my web server shows
the oci 8 is in enabled in php (even though
the php.ini does not have a section for oracle).
I used the oci8 install instructions/method for phpwiki, and used the latest 10gR2 enterprise edition (10.2.0.2) and even ran $ORACLE_HOME/product/install/changePerm.sh to
loosen up security settings.
I also had a very similar error message when
trying to used MYSQL -- Pear DB error when trying
to connect. In both cases my mysql and oracle datbasses are properly configured with the right users and you can log in as those users. in oracle my listener is up and you can tsnping and login in as the phpwiki user in sql plus.
I have been hacking at this for 2 days now and I
am about to give up and go back to the flat file.
Please help if you have any pointers. Thanks Marvin.
For Oracle patches, see http://sourceforge.net/tracker/index.php?func=detail&aid=1569424&group_id=6121&atid=106121
Please try ADODB
Thanks. For both MySql and Oracle, I am finding
that DATABASE_TYPE = ADODB works better (less errors) than DATABASE_TYPE = SQL.
I was able to get the virgin wiki to load nicely when using DATABASE_TYPE = ADODB and
...so I can stick with mysql and at least have a database and not have to rely on flat files.
For Oracle, I was able to get connectivity working by installing ZendCore for Oracle (basically a pre-compiled and optimized PHP 5).
I also had to unlock the phpwiki user for it to work at all (as sysadmin, "alter user phpwiki account unlock") -- this is a new 10g security feature and so is not in the oci install doc for phpwiki. FOr Oracle my connect string is
DATABASE_DSN="oci8://phpwiki:email@example.com:1521/pwiki" (where the SERVICE_NAME / SID = pwiki, the 1521 is optional as it is the default db port). Also, my oracle tables are pre-pended with phpwiki_ as per the instructions for oci.
I am able to connect to the oracle, but the virgin wiki still does load. It seems to connect, but then shows the following ADODB error:
lib/WikiDB/adodb/adodb-errorhandler.inc.php:76: Error: oci8 error: [911: ORA-00911: invalid character] in EXECUTE("UPDATE phpwiki_page SET hits=?, pagedata=? WHERE pagename=?")
I think that Oracle does not like the question marks, that may be the issue, but not sure how to troubleshoot this further from here.
Correction to above (for some reason I can't edit the message I posted):
For Mysql the DSN that works is:
For Oracle the DSN that works is
both are using DATABASE_TYPE=ADODB