php & berkeley dbxml
Results 1 to 2 of 2

Thread: php & berkeley dbxml

  1. #1
    Junior Member
    Join Date
    Apr 2006

    php & berkeley dbxml


    Does anyone here use PHP with the Berkeley DBXML database?

    I am having a problem getting PHP5 to work with dbxml. I have followed the intructions on this page:

    I have successfully compiled dbxml and tested to ensure it is working. I have successfully compiled the two modules and and placed them in the PHP extensions directory. I have added the two following lines to my php.ini file:

    If I comment out the second of these I can successfully restart the apache web server but with the second line in, apache will not work. The message in the apache error log is as follows:

    PHP Fatal error: PHP Startup: your copy Berkeley DB4 is older than required; it must be at least version 4.3 in Unknown on line 0
    PHP Fatal error: Unable to start dbxml module in Unknown on line 0

    When compiling the dbxml module I have used the following command

    ./configure --with-dbxml=/home/michael/dbxml-2.2.13/install --with-berkeleydb=/home/michael/dbxml-2.2.13/install --with-xerces=/home/michael/dbxml-2.2.13/install --with-pathan=/home/michael/dbxml-2.2.13/install --with-xquery=/home/michael/dbxml-2.2.13/install

    Can anyone shed any light on this problem? I am using SUSE Linux (SLES 9) 32 bit using Apache 2 and PHP5. The compiler is g++.

  2. #2
    Senior Member
    Join Date
    Feb 2005
    Ooo! How exciting! There's someone else using this.

    I've just started having a go with it and I'm very keen to re-implement one of my existing Cocoon applications in it. My client wants to use a native XML database and suggested we use eXist. But I've fiddled around with it and its very slow and difficult to install well with Cocoon. And it requires using server Java. Yuk!

    So I suggested that we try DBD XML with PHP and so have been playing around with I was dissapointed to find that there are no decent Debian packages for it, and even more upset when I couldn't get the PHP extensions to install properly first time. However, I managed to sort it out by installing like this:
    $ cd $DB_HOME/db-4.3.29/php_db4
    $ phpize5
    $ ./configure --with-db4=$DB_HOME/install
    $ make
    $ su
    # make install
    # exit
    $ cd $DB_HOME/dbxml/src/php
    $ phpize5
    $ ./configure --with-dbxml=DB_HOME/install
    *) add -I$DB_HOME/db-4.3.29/php_db4 to DB_HOME/dbxml/src/php/Makefile's includes variable
    *) alter '#include "ext/db4/php_db4.h"' to '#include "php_db4.h"' in php_dbxml_int.hpp and php_dbxml_manager.cpp
    $ make
    # make install
    *) add and to php.ini.
    (This was on Debian "unstable" with DBD XML 2.2.13; If you try this method don't forget that $DB_HOME will have to be expanded to, in your case, '/home/michael/dbxml-2.2.13/'.)

    I also tried using the example PHP scripts from Apache. I had to change the names of the containers to a file that PHP was allowed to write to (e.g. "/tmp/test.dbxml").

    Do let me know how you get on and if you have any tips or tricks. And I'll do likewise!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts