[PHP 4.4.6] BerkeleyDB or equivalent?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gilles Ganault

    [PHP 4.4.6] BerkeleyDB or equivalent?

    Hi

    If possible, I'd like to use a file-based, simpler alternative to
    MySQL such as BerkeleyDB to manage a two-column database (phone number
    -name), but I'm not sure my hoster supports this kind of thing:

    ---------------
    Configure Command ./configure --with-mysql=/usr/local/mysql
    --with-config-file-path=/opt3/local/apache/conf --with-gd
    --enable-gd-native-ttf --enable-gd-imgstrttf
    --with-jpeg-dir=/usr/local --with-ttf=/usr
    --with-freetype-dir=/usr/local --with-zlib-dir=/usr/local
    --with-zlib=/usr/local --with-imap=/usr/local/imap-2006g
    --with-imap-ssl=/usr/local/ssl --without-kerberos
    --with-dom=/usr/local --with-sablot=/usr/local --enable-xslt
    --with-xslt-sablot --with-png-dir=/usr/local --with-pdflib=/usr/local
    --with-curl=/usr/local/ --with-mcrypt=/usr/local
    --with-ming=/usr/local --with-gettext=/usr/local
    --with-apxs=/opt3/local/apache/bin/apxs --enable-track-vars
    --with-regex=system --with-pear --enable-ftp --enable-bcmath
    --enable-mbstring --enable-exif --enable-calendar
    --enable-memory-limit --enable-trans-sid --enable-libgcc
    --enable-inline-optimization --disable-debug

    Apache
    Loaded Modules mod_php4, mod_setenvif, mod_so, mod_headers,
    mod_expires, mod_proxy, mod_auth, mod_access, mod_rewrite, mod_alias,
    mod_speling, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir,
    mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation ,
    mod_mime, mod_mime_magic, mod_log_config, mod_env, http_core
    ---------------

    If not, is there some PHP source file that I can include in my script?

    Thank you.
  • gosha bine

    #2
    Re: [PHP 4.4.6] BerkeleyDB or equivalent?

    Gilles Ganault wrote:
    Hi
    >
    If possible, I'd like to use a file-based, simpler alternative to
    MySQL such as BerkeleyDB to manage a two-column database (phone number
    -name), but I'm not sure my hoster supports this kind of thing:
    >
    ---------------
    Configure Command ./configure --with-mysql=/usr/local/mysql
    --with-config-file-path=/opt3/local/apache/conf --with-gd
    --enable-gd-native-ttf --enable-gd-imgstrttf
    --with-jpeg-dir=/usr/local --with-ttf=/usr
    --with-freetype-dir=/usr/local --with-zlib-dir=/usr/local
    --with-zlib=/usr/local --with-imap=/usr/local/imap-2006g
    --with-imap-ssl=/usr/local/ssl --without-kerberos
    --with-dom=/usr/local --with-sablot=/usr/local --enable-xslt
    --with-xslt-sablot --with-png-dir=/usr/local --with-pdflib=/usr/local
    --with-curl=/usr/local/ --with-mcrypt=/usr/local
    --with-ming=/usr/local --with-gettext=/usr/local
    --with-apxs=/opt3/local/apache/bin/apxs --enable-track-vars
    --with-regex=system --with-pear --enable-ftp --enable-bcmath
    --enable-mbstring --enable-exif --enable-calendar
    --enable-memory-limit --enable-trans-sid --enable-libgcc
    --enable-inline-optimization --disable-debug
    >
    Apache
    Loaded Modules mod_php4, mod_setenvif, mod_so, mod_headers,
    mod_expires, mod_proxy, mod_auth, mod_access, mod_rewrite, mod_alias,
    mod_speling, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir,
    mod_autoindex, mod_include, mod_info, mod_status, mod_negotiation ,
    mod_mime, mod_mime_magic, mod_log_config, mod_env, http_core
    ---------------
    >
    If not, is there some PHP source file that I can include in my script?
    >
    Thank you.
    How big is your DB? If it is small enough to fit into memory, you can
    simply store it in a php file:

    file db.php

    <? $DB=array('Bob' =>'bobs phone','Tom'=>' toms phone' etc);

    file main.php:


    include 'db.php';

    // manipulate $DB array
    .....

    // save
    file_put_conten ts('db.php', '<?$DB=' . var_export($DB, 1));


    --
    gosha bine

    extended php parser ~ http://code.google.com/p/pihipi
    blok ~ http://www.tagarga.com/blok

    Comment

    • Schraalhans Keukenmeester

      #3
      Re: [PHP 4.4.6] BerkeleyDB or equivalent?

      At Tue, 08 May 2007 07:38:58 +0200, Gilles Ganault let his monkeys type:
      Hi
      >
      If possible, I'd like to use a file-based, simpler alternative to
      MySQL such as BerkeleyDB to manage a two-column database (phone number
      -name), but I'm not sure my hoster supports this kind of thing:
      >
      >
      Thank you.
      Use phpinfo() to see what's supported by your host.
      I wonder what makes you want to go BerkelyDB instead of MySQL though.

      Sh.

      Comment

      • ELINTPimp

        #4
        Re: BerkeleyDB or equivalent?

        Try sqlite. You'll need to reconfigure PHP with the extention, but I
        think it's what you're looking for.


        Comment

        • Gilles Ganault

          #5
          Re: [PHP 4.4.6] BerkeleyDB or equivalent?

          On Tue, 08 May 2007 09:13:51 +0200, gosha bine <stereofrog@gma il.com>
          wrote:
          >How big is your DB? If it is small enough to fit into memory, you can
          >simply store it in a php file:
          Thanks. I'll give it a shot.

          Comment

          • Mike P2

            #6
            Re: BerkeleyDB or equivalent?

            On May 8, 1:38 am, Gilles Ganault <nos...@nospam. comwrote:
            Hi
            >
            If possible, I'd like to use a file-based, simpler alternative to
            MySQL such as BerkeleyDB to manage a two-column database (phone number
            -name), but I'm not sure my hoster supports this kind of thing
            MySQL does have a BerkelyDB interface, but I'm not sure if this is
            relevant in your case



            -Mike PII

            Comment

            Working...