#13 freebsd dbm support

1.3.x
open
nobody
None
5
2012-10-11
2001-11-08
Anonymous
No

i get failed dba_open calls when i try to use dbm
storage for any revision of phpwiki with or without
gdbm installed on a freebsd 4.4-stable box. any ideas?

Discussion

  • Geoffrey T. Dairiki

    Logged In: YES
    user_id=45814

    Does the httpd user have sufficient permissions to the write
    the dbm files?

    Does your PHP have dba support compiled in? (If not maybe
    it has dbm support -- try the 'dbm' backend rather than
    the 'dba' backend.)

    Does your PHP's dba support the 'gdbm' driver? If not
    maybe it has support for the 'db2' driver? (Currently you
    have to edit the dba_open line lib/dbalib.php to change
    this.)

    If this hasn't helped, please provide more specific
    information. (What exact error message do you get? Perhaps
    give us a URL to your broken PhpWiki. Also a URL to a
    phpinfo script would be useful.)

    (A phpinfo script in a file somewhere in the htdoc tree
    named, say, 'phpinfo.php' which contains a single line:
    <?php phpinfo(); ?>
    When browsed, this script produces a large tabulation of
    information regarding the confiuration of your PHP interpreter.)

     
  • Nobody/Anonymous

    Logged In: NO

    the permissions are definitely ok.

    'Fatal error: Call to undefined function: dba_open()
    in /usr/local/www/phpwiki/lib/DbaDatabase.php on line 32'
    is the error i get even when i specify --with-gdbm manually
    to the php4 compile (with gdbm installed before php). if i
    change dba to dbm, i get the error 'Fatal error: Cannot
    instantiate non-existent class: wikidb_dbm
    in /usr/local/www/phpwiki/lib/WikiDB.php on line 76'.

     
  • Geoffrey T. Dairiki

    Logged In: YES
    user_id=45814

    Oh. You're using 1.3 not 1.2. (Somehow I was assuming 1.2).

    PHP4 supports (depending on compile-time options) to
    different APIs for accessing dbm style databases: the dbm()
    family of functions and the dba_
    () family of functions.

    The dbm() family of functions are deprecated, and are
    included only for compatibility with PHP3. The dba_
    API is
    more flexible, and is (I thought) the default for PHP4.

    Phpwiki 1.2 supports either the dbm or the dba APIs.

    Phpwiki 1.3 does not (at least at this point) have support
    for the dbm* API. Since this is a deprecated API in PHP4,
    and since phpwiki 1.3 does not run under PHP3, I doubt
    support will be added (though it wouldn't be too difficult
    --- if you really want it, I could be talked into adding it.)

    You should figure out how to compile PHP4 with support for
    the dba_* API.

    I'm not sure, off the top of head, how to do this. (I
    thought it was enabled by default.) I see that there is and
    --enable-dba argument to configure. (I think you want
    --with-gdbm too.)

    Maybe someone else can chime in here with more details. Or,
    if you're still stuck, say so, and I'll see what I can
    figure out.

     
  • Nobody/Anonymous

    Logged In: NO

    to enable dba_* and gdbm in php on FreeBsd, you have to
    portinstall/portupdate mod_php4 (assuming you use mod_php)
    and check "dba" and "gdbm" in the menu of options to check
    (make sure you check other modules you already had before)

     

Log in to post a comment.

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

Sign up for the SourceForge newsletter:





No, thanks