Can't get phpwiki 1.3.10 to work with mysql.

Help
Anonymous
2004-05-21
2012-10-11
  • Anonymous - 2004-05-21

    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[256]: 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[2]: connect(DB/.php): failed to open stream: No such file or directory

    lib/pear/DB.php:282: Warning[2]: connect(): Failed opening 'DB/.php' for inclusion (include_path='.:/home/fishman/pablo-zurita/phpwiki:/home/fishman/pablo-zurita/phpwiki/lib/pear')

    lib/WikiDB/backend/PearDB.php:34: Fatal[256]: Can't connect to database: wikidb_backend_peardb: fatal database error

        * DB Error: not found
        * (Unable to include the DB/.php file for `')
        *

    I really don't know what else to do, I have tried to install it 4 times already.

     
    • Anonymous - 2004-05-21

      BTW, the username and password for the database is right, and it has access to read and write.

       
    • eeyore

      eeyore - 2004-05-21

      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.

       
      • Anonymous - 2004-05-21

        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"

         
    • Mike Pullen

      Mike Pullen - 2004-05-28

      I have better luck using

      DATABASE_TYPE = ADODB

      ____________
      Mike P

       
    • Keith McCreery

      Keith McCreery - 2004-06-10

      You will need to chagne the following...

      \phpwiki-1.3.10\lib\ikiDB\backend\pearDB.php...
      require_once('DB.php'); // Always favor use our local pear copy
      ...to...
      require_once('lib/pear/DB.php'); // Always favor use our local pear copy

      phpwiki-1.3.10\lib\pear\DB\mysql.php...
      require_once "DB/common.php";
      ...to...
      require_once "common.php";

      and if you have not made this change yet, consider it...
      i
      phpwiki-1.3.10\index.php...
      if (SCRIPT_FILENAME == __FILE__)
          include(dirname(__FILE__)."/lib/main.php");
      ...to...
      //if (SCRIPT_FILENAME == __FILE__)
          include(dirname(__FILE__)."/lib/main.php");

      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.

       
      • Mike Allbutt

        Mike Allbutt - 2004-06-24

        These instructions got my wiki up and running on OSX! Ta.

         
      • oualid

        oualid - 2004-10-05

        I get the following error:

        lib/WikiDB/backend/PearDB.php:778: Fatal[256]: 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?

         
        • Reini Urban

          Reini Urban - 2004-10-05

          no. but you set the prefix "phpwiki" for your database,
          but didn't create the tables with this prefix.

           
          • oualid

            oualid - 2004-10-06

            I commented out the DATABASE_PREFIX = phpwiki_ entry in config.ini and it works fine now.

            Thanks!

             
    • HaArD

      HaArD - 2004-11-24

      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

       
    • HaArD

      HaArD - 2004-11-25

      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 :-(

       
      • Dan F

        Dan F - 2005-01-07

        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.

        Dan

         
        • Reini Urban

          Reini Urban - 2005-01-07

          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.

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

Sign up for the SourceForge newsletter:





No, thanks