New to wikis. Feel very lost.

  • Peter Jay Salzman

    Newbie alert.

    I apt-got ewiki from Debian/testing and feel very lost.  I feel like the readme files aren't answering my question.  Platform is LAMP.  DocumentRoot is /www.

    To configure Debian readme told me to navigate to:


    and click on "initialize database", which I did.  Now I'm not quite sure what to do.

    It seems logical that ewiki should be making a database table in MySQL, but I can't figure out how to do this.  How do I create the MySQL database for an ewiki installation?

    Also, suppose I want two separate instances of ewiki: one in /www/foo ( and another one in /www/bar (
    Clearly I need to "mkdir /www/foo /www/bar".  But then what?  What files should populate these directories?


    • Andy Fundinger

      Andy Fundinger - 2006-05-02

      I'll try to give you a leg up then :-)

      1.  Did initialize database work?  It should have filled the wiki with some starter pages and made the button go away.  If so, it did indeed make a table in MySQL's test database.  This is good to get started, but not really a permanent home.

      You should see the settings for what database to connect to in config.php.  If you point it at an empty database where the database user has rights it will create the table it needs.

      2.  There are two places you may/will want to seperate data and code:
      2a.  Code - You can copy the whole ewiki directory  if you like, but I would suggest just copying the /ewiki folder and sym linking the sub-directories.  There are other ways, but that's the single simplest.
      2b.  Data - Set a constant in config.php for EWIKI_DB_TABLE_NAME in at least one install so that it uses a different table.  Probably you'll want lines like:

      define("EWIKI_DB_TABLE_NAME", "foo");
      - and -
      define("EWIKI_DB_TABLE_NAME", "bar");

      Please post if you need more detail or have more questions.  Milky and I will try to help however we can.

    • Peter Jay Salzman

      1. Yup!  Sure enough, there is a table called ewiki in the test database.

      2a. I accomplished this via:

      // Make the directory relative to DocumentRoot
      $ mkdir /www/salsa

      // Copy the ewiki non-directory files (omitting -r
      // will copy everything but directories
      $ cp /usr/share/ewiki/* /www/salsa/
      cp: omitting directory `/usr/share/ewiki/examples'
      cp: omitting directory `/usr/share/ewiki/fragments'
      cp: omitting directory `/usr/share/ewiki/init-pages'
      cp: omitting directory `/usr/share/ewiki/plugins'
      cp: omitting directory `/usr/share/ewiki/spages'
      cp: omitting directory `/usr/share/ewiki/tools'

      // Go into the newly formed directory
      $ cd /www/salsa

      // Link all files.  Won't link files on top of
      // pre-existing files, so it effectively only
      // links the directories.
      $ ln -s /usr/share/ewiki/* .
      ln: `./CHANGES': File exists
      ln: `./config.php': File exists
      ln: `./CREDITS': File exists
      ln: `./example-1.css': File exists
      ln: `./example-1.php': File exists
      ln: `./index.php': File exists
      ln: `./INSTALL': File exists
      ln: `./patch-stamp': File exists
      ln: `./README': File exists
      ln: `./README.config': File exists
      ln: `./': File exists
      ln: `./README.fragments': File exists
      ln: `./README.plugins': File exists
      ln: `./README.programming': File exists
      ln: `./setup.php': File exists
      ln: `./squirrel.jpeg': File exists
      ln: `./tlogo.png': File exists
      ln: `./UPGRADE': File exists
      ln: `./wiki.css': File exists
      ln: `./z.php': File exists

      So far so good!  Unfortunately, step 2b doesn't work for me.  I added this to /www/salsa/config.php:

      define("EWIKI_DB_TABLE_NAME", "salsa");

      I reload the page, but no database name salsa appears in mysql.

      Also, when I click on "database / admin" or
      "WikiCommander" in the side navbar, it says "permission denied".  Presumably, there's some way to log in.  How can I authenticate myself?  I don't see a login form.

      Thanks!  I'm actually surprised I made it this far!  :-)


      • Andy Fundinger

        Andy Fundinger - 2006-05-02

        Here's the SQL to manually create the Salsa table:

        CREATE TABLE salsa
                 (pagename VARCHAR(160) NOT NULL,
                 version INTEGER UNSIGNED NOT NULL DEFAULT 0,
                 flags INTEGER UNSIGNED DEFAULT 0,
                 content MEDIUMTEXT,
                 author VARCHAR(100) DEFAULT 'ewiki',
                 created INTEGER UNSIGNED DEFAULT ".time().",
                 lastmodified INTEGER UNSIGNED DEFAULT 0,
                 refs MEDIUMTEXT,
                 meta MEDIUMTEXT,
                 hits INTEGER UNSIGNED DEFAULT 0,
                 PRIMARY KEY id (pagename, version) )

        As for the Admin password, you can create an admin account in  or define() the EWIKI_ADMIN_PW constant to set one.  Without either of those you won't have access to the admin tools.

        Take Care

    • Peter Jay Salzman

      Progress.  New database and table were made.  My config.php looks like (passwd changed, of course):

      define("EWIKI_DB_TABLE_NAME", "salsa");
      define("EWIKI_ADMIN_PW", "foo");

      but when I click on "WikiCommander" I see the following error:

      Restricted Access
      Please first create an admin account in '.../fragments/funcs/auth.php' or define() the 'EWIKI_ADMIN_PW' constant.

      But that constant /is/ defined in config.php.  Is there another place I need to define that constant?

      Also, when I point my browser to:

      I get a ton of PHP "undefined offset" warnings.  When I try to save a config.php or ewiki.ini, it again has hundreds of undefined offset warnings.  Doesn't appear to save anything to file.  I think it spits the file to screen rather than save it to a disk file.

      Is the Debian ewiki package known to be broken?  This seems much harder than it should be.  :(

      • Andy Fundinger

        Andy Fundinger - 2006-05-09

        There's a tools config under tools, try defining the constant there?


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