Help! Pear DB Error - Oracle &MySQL

  • umfan866

    umfan866 - 2006-07-31

    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:

    Fatal 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
    * (oci8://phpwiki:XXXXXXXX@

    I am using the following:

    RHEL4 with SELinux turned off
    Apache httpd-2.0.52-22

    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 ( and even ran $ORACLE_HOME/product/install/ 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.

    • C.J.

      C.J. - 2006-11-16
    • Reini Urban

      Reini Urban - 2006-08-01

      Please try ADODB

    • umfan866

      umfan866 - 2006-08-23

      Update --

      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

      DATABASE_DSN="mysql://root:rootpassword @localhost(/var/lib/mysql/mysql.sock)/wiki" 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:phpwiki@" (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/ Error[256]: 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.

      • umfan866

        umfan866 - 2006-08-23

        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
        DATABASE_DSN= "oci8://phpwiki:phpwiki@"

        both are using DATABASE_TYPE=ADODB


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks