Menu

Help! Pear DB Error - Oracle 10.2.0.2 &MySQL

Help
umfan866
2006-07-31
2012-10-11
  • 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@131.35.144.80/pwiki)
    *
    

    I am using the following:

    RHEL4 with SELinux turned off
    Apache httpd-2.0.52-22
    php-4.3.9-3-15
    php-pear-4.3.9-3.15

    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.

     
    • 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"

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

        For Oracle the DSN that works is
        DATABASE_DSN= "oci8://phpwiki:phpwiki@192.168.0.1:1521/pwiki"

        both are using DATABASE_TYPE=ADODB

         

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.