#7 WikiWords exceeding a certain length bad

MySQL (31)

Because of the way pages are stored in mSQL, WikiWords over a certain length (I believe set in config.php) will exceed the line length of the page store.

The solution is probably to detect this and split the word somehow (in a way that is transparent to the user).


  • Steve Wainstead

    Steve Wainstead - 2001-02-28

    Logged In: YES

    mSQL support will probably be dropped going forward from
    1.3.x. I added it for a personal project, and only one other
    user exists that uses mSQL that I know of,

  • Geoffrey T. Dairiki

    Logged In: YES

    Currently both the mysql and pgsql backends silently
    truncate pagenames longer than 100 characters. (This limit
    could trivially be extended to 255 characters, at least for
    MySQL --- it would take a bit more work to remove this
    restriction completely.)

    Do we care?

    Either way (care or not) there are some inconsistencies
    which should probably be cleaned up which result from this

    For example, currently if you try to save a page with a name
    longer than 100 characters, it gets saved, but under the
    truncated name. If you then try to edit that page it will
    appear to be a non-existing page (because there is no page
    with the original untruncated name in the database). (When
    you save your edits, you overwrite the truncated-name page.)

    I would suggest the following solution:

    Agree on a PhpWiki-wide (backend-independent) maximum page
    name length. Then generate an error upon any attempt to
    view or edit a page with a too-long name.


  • Steve Wainstead

    Steve Wainstead - 2001-03-09

    Logged In: YES

    I agree: PhpWiki sets the limit of the name length. I didn't
    know it would be truncated in the other back ends.

    Coming from the world of Perl as I have, I've been infected
    with this notion of "no limits": use all memory available,
    allow any length file or string or regexp, etc. I suppose
    it's an impracticle philosophy (though it works for Perl!)

    I just know someone will want to paste in a whole page of
    text and then surround it with [brackets]. Hmm. Perhaps we
    should have a hashing scheme for link names instead? That
    would make the code harder though... page names in the
    database would look like gibberish... unless... we allow
    unlimited length link names but just truncate them for the
    primary key?

  • Kyle Hamilton

    Kyle Hamilton - 2002-10-29

    Logged In: YES

    Would suggest that maximum WikiWord length be set
    depending on the back-end database library, and not
    necessarily make the implementation transparent. At the
    least give a consistent error message when it is detected as
    too long -- phpwiki's limits should be set according to the
    administrator, not unlimited by the will of the developer.


Log in to post a comment.

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

Sign up for the SourceForge newsletter:

No, thanks