This discussion is archived
1 2 Previous Next 21 Replies Latest reply: Jun 2, 2010 10:16 AM by Oracle, Sandra Whitman RSS

Berkeley DB XML and PHP 5.3

737935 Newbie
Currently Being Moderated
Hi,

I'm trying to compile BDB XML for PHP 5.3 on openSUSE 11.2. When trying to compile the db4 PHP module, I get (the output goes on with warnings about the string -> char* conversion, I skipped them here)

g++ -I. -I/build/dbxml-2.5.13/db-4.8.24/php_db4 -DPHP_ATOM_INC -I/build/dbxml-2.5.13/db-4.8.24/php_db4/include -I/build/dbxml-2.5.13/db-4.8.24/php_db4/main -I/build/dbxml-2.5.13/db-4.8.24/php_db4 -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/opt/bdbxml/include -DHAVE_CONFIG_H -g -O2 -c /build/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp -fPIC -DPIC -o .libs/db4.o
/build/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp:193: warning: deprecated conversion from string constant to 'char*'
/build/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp:342: error: 'second_arg_force_ref' was not declared in this scope
/build/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp:342: error: 'second_arg_force_ref' was not declared in this scope
/build/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp:351: error: too many initializers for 'zend_function_entry'
...

The dbxml module does not compile either:

g++ -I. -I/build/dbxml-2.5.13/dbxml/src/php -DPHP_ATOM_INC -I/build/dbxml-2.5.13/dbxml/src/php/include -I/build/dbxml-2.5.13/dbxml/src/php/main -I/build/dbxml-2.5.13/dbxml/src/php -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -I/opt/bdbxml/include -I/build/dbxml-2.5.13/db-4.8.24/php_db4 -I/include -DHAVE_CONFIG_H -g -O2 -c /build/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp -fPIC -DPIC -o .libs/php_dbxml.o
In file included from /build/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp:10:
/build/dbxml-2.5.13/dbxml/src/php/php_dbxml_int.hpp: In function 'void hackthe_method_table(zend_function_entry*)':
/build/dbxml-2.5.13/dbxml/src/php/php_dbxml_int.hpp:221: error: invalid conversion from 'const char*' to 'char*'
/build/dbxml-2.5.13/dbxml/src/php/php_dbxml_int.hpp:221: error: initializing argument 1 of 'void zend_str_tolower(char*, unsigned int)'
...

Is this a known limitation of the current release or am I doing anything wrong? Is there a patch available fixing the PHP integration?

Thanks!

Philipp
  • 1. Re: Berkeley DB XML and PHP 5.3
    Oracle, Sandra Whitman Journeyer
    Currently Being Moderated
    Hello,

    I'll try to reproduce these compilation errors. Can you post the exact steps you used, so I can follow exactly the same steps.

    Thanks,
    Sandra
  • 2. Re: Berkeley DB XML and PHP 5.3
    737935 Newbie
    Currently Being Moderated
    Hello Sandra,

    thanks for your reply. I uploaded a complete typescript at http://philipp.wagner.name/temp/typescript-edited.txt (edited for readability). Here some information on my system:

    user@host:~> uname -a
    Linux poweramy 2.6.31.5-0.1-default #1 SMP 2009-10-26 15:49:03 +0100 x86_64 x86_64 x86_64 GNU/Linux

    user@host:~> cat /etc/SuSE-release
    openSUSE 11.2 (x86_64)
    VERSION = 11.2

    user@host:~> rpm -qa 'php5-*'
    php5-mbstring-5.3.0-2.4.3.x86_64
    php5-sqlite-5.3.0-2.4.3.x86_64
    php5-hash-5.3.0-2.4.3.x86_64
    php5-curl-5.3.0-2.4.3.x86_64
    php5-tokenizer-5.3.0-2.4.3.x86_64
    php5-pear-5.3.0-2.4.3.noarch
    php5-mcrypt-5.3.0-2.4.3.x86_64
    php5-ctype-5.3.0-2.4.3.x86_64
    php5-mysql-5.3.0-2.4.3.x86_64
    php5-iconv-5.3.0-2.4.3.x86_64
    php5-zlib-5.3.0-2.4.3.x86_64
    php5-devel-5.3.0-2.4.3.x86_64
    php5-dom-5.3.0-2.4.3.x86_64
    php5-xmlreader-5.3.0-2.4.3.x86_64
    php5-tidy-5.3.0-2.4.3.x86_64
    php5-bz2-5.3.0-2.4.3.x86_64
    php5-xmlwriter-5.3.0-2.4.3.x86_64
    php5-pdo-5.3.0-2.4.3.x86_64
    php5-xsl-5.3.0-2.4.3.x86_64
    php5-json-5.3.0-2.4.3.x86_64
    php5-gd-5.3.0-2.4.3.x86_64

    I'll be happy to provide any additional information.

    Philipp
  • 3. Re: Berkeley DB XML and PHP 5.3
    Oracle, Sandra Whitman Journeyer
    Currently Being Moderated
    Hello,

    I installed php 5.3 and tried following your instructions. I'm not seeing the compilation error. Do you know what I'm missing here?

    cd
    dbxml-2.5.13/db-4.8.24/php_db4
    phpize
    Configuring for:
    PHP Api Version: 20090626
    Zend Module Api No: 20090626
    Zend Extension Api No: 220090626

    cd
    dbxml-2.5.13/dbxml/src/php
    phpize
    Configuring for:
    PHP Api Version: 20090626
    Zend Module Api No: 20090626
    Zend Extension Api No: 220090626


    Thanks,
    Sandra
  • 4. Re: Berkeley DB XML and PHP 5.3
    737935 Newbie
    Currently Being Moderated
    Hello Sandrea,

    which distribution and version and which exact PHP version did you use?

    Philipp
  • 5. Re: Berkeley DB XML and PHP 5.3
    Oracle, Sandra Whitman Journeyer
    Currently Being Moderated
    Hello,

    I used: php-5.3.0.tar.gz and the version looks to be 5.3.0. Is there something else I need to check? To build this I just ran ./configure and then from the build directory make all, make install.

    Thanks,
    Sandra
  • 6. Re: Berkeley DB XML and PHP 5.3
    737628 Newbie
    Currently Being Moderated
    I have what appears to be the same problem as the previous post and at the same locations. Is this a problem of conflicting versions of php or libraries? Python, perl both work fine. Thanks for taking a look..JC

    php-config
    Usage: /usr/bin/php-config [OPTION]
    Options:
    --prefix            [usr]
    --includes          [-I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib]
    --ldflags           [ -L/usr/local/lib -L/usr/local/mysql-6.0.7-alpha-linux-i686-glibc23/lib -L/usr/lib/mysql -L/opt/PostgreSQL/8.3/lib]
    --libs              [-lcrypt   -lcrypt -lreadline -lncurses -lpq -lrt -lpq -lmysqlclient -lmcrypt -lltdl -lfreetype -lpng -lz -ldb-4 -lbz2 -lz -lm -ldl -lnsl  -lm -licui18n -licuuc -licudata -lm -licuio -lxml2 -lz -lm -lssl -lcrypto -ldl -lxml2 -lz -lm -lmysqlclient -lz -lrt -lcrypt -lnsl -lm -lmysqlclient -lz -lrt -lcrypt -lnsl -lm -lmygcc -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt -lxml2 -lz -lm -lxml2 -lz -lm -lxml2 -lz -lm -lcrypt ]
    --extension-dir     [usr/lib/php/extensions/no-debug-non-zts-20070729]
    --include-dir       [usr/include/php]
    --php-binary        [usr/bin/php]
    --php-sapis         [cli apache2handler]
    --configure-options [--prefix=/usr --sysconfdir=/etc --with-apxs2=/usr/local/apache2/bin/apxs --disable-ipv6 --with-zlib --with-gettext --with-pcre-regex --enable-mbstring --enable-bcmath --enable-calendar --with-bz2 --with-openssl --enable-force-cgi-redirect --enable-gd-native-ttf --enable-exif --with-gd --with-ncurses --with-readline --with-db4=/usr/local/dbxml-2.5.13/db-4.8.24/build_unix --with-mysql=/usr/local/mysql-6.0.7-alpha-linux-i686-glibc23 --with-pgsql=/opt/PostgreSQL/8.3 --enable-sockets --with-pear=/usr/local/lib/php --enable-cli --disable-cgi --with-imap-ssl --enable-soap --with-mcrypt --with-mysqli=/usr/bin/mysql_config --with-pdo-pgsql=/opt/PostgreSQL/8.3 --with-pdo-mysql=/usr/local/mysql-6.0.7-alpha-linux-i686-glibc23 --with-config-file-path=/etc --with-mysql-sock=/var/run/mysql --with-freetype-dir=/usr/local/freetype-2.3.11]
    --version           [6.0.0-dev]                                              
    --vernum            [60000]  


    ldd `which php`
    linux-gate.so.1 => (0xffffe000)
    libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7fda000)
    libreadline.so.4 => /opt/PostgreSQL/8.3/lib/libreadline.so.4 (0x05932000)
    libncurses.so.5 => /lib/libncurses.so.5 (0xb7f90000)
    libpq.so.5 => /opt/PostgreSQL/8.3/lib/libpq.so.5 (0xb7f76000)
    librt.so.1 => /lib/i686/librt.so.1 (0xb7f6d000)
    libmcrypt.so.4 => /usr/lib/libmcrypt.so.4 (0xb7f40000)
    libltdl.so.3 => /usr/lib/libltdl.so.3 (0xb7f39000)
    libdl.so.2 => /lib/libdl.so.2 (0xb7f35000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7ebe000)
    libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7e93000)
    libm.so.6 => /lib/i686/libm.so.6 (0xb7e6d000)
    libdb-4.8.so => /usr/local/lib/libdb-4.8.so (0xb7cb4000)
    libnsl.so.1 => /lib/libnsl.so.1 (0xb7c9d000)
    libicui18n.so.40 => /usr/local/lib/libicui18n.so.40 (0xb7b2f000)
    libicuuc.so.40 => /usr/local/lib/libicuuc.so.40 (0xb79fe000)
    libicudata.so.40 => /usr/local/lib/libicudata.so.40 (0xb6cb9000)
    libicuio.so.40 => /usr/local/lib/libicuio.so.40 (0xb6caf000)
    libssl.so.0.9.8 => /usr/lib/libssl.so.0.9.8 (0xb6c6d000)
    libcrypto.so.0.9.8 => /usr/lib/libcrypto.so.0.9.8 (0xb6b36000)
    libmysqlclient.so.16 => /usr/local/mysql-6.0.7-alpha-linux-i686-glibc23/lib/libmysqlclient.so.16 (0xb6934000)
    libpthread.so.0 => /lib/i686/libpthread.so.0 (0xb691c000)
    libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb67cb000)
    libc.so.6 => /lib/i686/libc.so.6 (0xb667c000)
    libresolv.so.2 => /lib/libresolv.so.2 (0xb6669000)
    libssl.so.4 => /opt/PostgreSQL/8.3/lib/libssl.so.4 (0x05cc6000)
    libcrypto.so.4 => /opt/PostgreSQL/8.3/lib/libcrypto.so.4 (0x05fd0000)
    libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xb65c3000)
    /lib/ld-linux.so.2 (0xb8042000)
    libz.so.1 => /lib/libz.so.1 (0xb65ae000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb64bd000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb64af000)
    libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xb6480000)
    libcom_err.so.2 => /lib/libcom_err.so.2 (0xb647d000)
    libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xb6455000)
    libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0xb644c000)


    MAKE OF php_db4

    /usr/local/dbxml-2.5.13/db-4.8.24/php_db4
    make
    /bin/sh /usr/local/dbxml-2.5.13/db-4.8.24/php_db4/libtool --mode=compile g++  -I. -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4 -DPHP_ATOM_INC -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4/include -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4/main -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/BerkeleyDB.4.7/include  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp -o db4.lo            
    g++ -I. -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4 -DPHP_ATOM_INC -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4/include -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4/main -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/BerkeleyDB.4.7/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp -fPIC -DPIC -o .libs/db4.o
    /usr/local/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp:193: warning: deprecated conversion from string constant to ‘char*’
    /usr/local/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp:193: warning: deprecated conversion from string constant to ‘char*’
    /usr/local/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp:342: error: ‘second_arg_force_ref’ was not declared in this scope
    /usr/local/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp:342: error: ‘second_arg_force_ref’ was not declared in this scope
    /usr/local/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp: In function ‘int zm_startup_db4(int, int)’:


    MAKE OF php_dbxml.cpp

    /usr/local/dbxml-2.5.13/dbxml/src/php

    make
    /bin/sh /usr/local/dbxml-2.5.13/dbxml/src/php/libtool --mode=compile g++  -I. -I/usr/local/dbxml-2.5.13/dbxml/src/php -DPHP_ATOM_INC -I/usr/local/dbxml-2.5.13/dbxml/src/php/include -I/usr/local/dbxml-2.5.13/dbxml/src/php/main -I/usr/local/dbxml-2.5.13/dbxml/src/php -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/dbxml-2.5.13/db-4.8.24/build_unix/include -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4 -I/usr/local/dbxml-2.5.13/install/include  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp -o php_dbxml.lo                                 
    g++ -I. -I/usr/local/dbxml-2.5.13/dbxml/src/php -DPHP_ATOM_INC -I/usr/local/dbxml-2.5.13/dbxml/src/php/include -I/usr/local/dbxml-2.5.13/dbxml/src/php/main -I/usr/local/dbxml-2.5.13/dbxml/src/php -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/dbxml-2.5.13/db-4.8.24/build_unix/include -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4 -I/usr/local/dbxml-2.5.13/install/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp -fPIC -DPIC -o .libs/php_dbxml.o
    In file included from /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp:10:
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml_int.hpp: In function ‘void hackthe_method_table(zend_function_entry*)’:
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml_int.hpp:222: error: invalid conversion from ‘const char*’ to ‘char*’
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml_int.hpp:222: error: initializing argument 1 of ‘void zend_str_tolower(char*, unsigned int)’
  • 7. Re: Berkeley DB XML and PHP 5.3
    Oracle, Sandra Whitman Journeyer
    Currently Being Moderated
    Well, as I mentioned, I built and installed php 5.3. However if I go to:
    dbxml-2.5.13/db-4.8.24/php_db4 I can run phpize but not make so I'm not getting to the compilation step. If you know what I'm missing for that I'll investigate the compilation errors. I get:
    phpize
    Configuring for:
    PHP Api Version: 20090626
    Zend Module Api No: 20090626
    Zend Extension Api No: 220090626
    make
    make: *** No targets specified and no makefile found. Stop.

    Do I need to run php-config or something else?

    Thanks,
    Sandra
  • 8. Re: Berkeley DB XML and PHP 5.3
    737628 Newbie
    Currently Being Moderated
    Sorry Sandra,

    I ran the configure script before the make:

    ./configure --with-db4=/usr/local/dbxml-2.5.13/db-4.8.24

    then the make
  • 9. Re: Berkeley DB XML and PHP 5.3
    Oracle, Sandra Whitman Journeyer
    Currently Being Moderated
    Thanks, I can reproduce the compilation errors. As a workaround you can try the following:

    1.dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp

    Here is the error:
    /build/dbxml-2.5.13/db-4.8.24/php_db4/db4.cpp:342: error: 'second_arg_force_ref' was not declared in this scope

    The reason is that db4.cpp has:
    #if PHP_MAJOR_VERSION <= 4
    unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE };
    unsigned char third_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE };
    #endif

    But then:
    static zend_function_entry Db4_functions[] = {
    ...
    ZEND_NAMED_FE(pget, wrapdb_pget, second_arg_force_ref)
    ...
    };

    You can try:
    static zend_function_entry Db4_functions[] = {
    ...
    #if PHP_MAJOR_VERSION <= 4
    ZEND_NAMED_FE(pget, wrapdb_pget, second_arg_force_ref)
    #endif
    ...
    };


    2. dbxml-2.5.13/dbxml/src/php/php_dbxml_int.hpp

    Here is the error:
    ./php_dbxml_int.hpp:221: error: invalid conversion from 'const char*' to 'char*'
    /mnt/external/bdb/bdbxml/dbxml-2.5.13/dbxml/src/php/php_dbxml_int.hpp:221: error: initializing argument 1 of 'void zend_str_tolower(char*, unsigned int)'

    The reason is that in php-5.3.0/Zend/zend_operators.c there is:

    ZEND_API void zend_str_tolower(char str, unsigned int length) / {{{ */
    { ...

    so in php_dbxml_int.hpp try:
    static inline void hackthe_method_table(zend_function_entry *fe)
    {
    int i;
    for(i = 0; fe.handler; i++) {
    fe[i].fname = strdup(fe[i].fname);
    zend_str_tolower((char*)fe[i].fname, (unsigned int)strlen(fe[i].fname));
    }
    }

    i.e. cast fe[i].fname to (char*)

    Thanks again,
    Sandra
  • 10. Re: Berkeley DB XML and PHP 5.3
    737628 Newbie
    Currently Being Moderated
    Thanks Sandra, I'm very happy to have your help and I'm greatly appreciative.

    I made the suggested changes to db4.cpp and got good and clean results.


    However, in adding changes to php_dbxml_int.hpp (which I am still working on) I
    ran into the following problems in the program php_dbxml.cpp.

    I was was wondering if you were able to get a clean compile making changes to this
    header?

    Btw, In static inline void hackthe_method_table(zend_function_entry *fe)
    {

    I added subscripts.


    When I ran the changes a large number of errors were produced in:

    php_dbxml.cpp


    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp: In function ‘int zm_startup_dbxml(int, int)’:
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp:101: error: cannot convert ‘zstr’ to ‘char*’ for argument ‘1’ to ‘void zend_str_tolower(char*, unsigned int)’
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp:101: warning: deprecated conversion from string constant to ‘char*’
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp:102: error: cannot convert ‘zstr’ to ‘char*’ for argument ‘1’ to ‘void zend_str_tolower(char*, unsigned int)’
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp:102: warning: deprecated conversion from string constant to ‘char*’
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp:103: error: cannot convert ‘zstr’ to ‘char*’ for argument ‘1’ to ‘void zend_str_tolower(char*, unsigned int)’
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp:103: warning: deprecated conversion from string constant to ‘char*’
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml.cpp:107: error: cannot convert ‘zstr’ to ‘char*’ for argument ‘1’ to ‘void zend_str_tolower(char*, unsigned int)’


    I'll double check my changes and continue to tinker around with this today and maybe I can get it working, thanks again for your help, Jim Charles
  • 11. Re: Berkeley DB XML and PHP 5.3
    Oracle, Sandra Whitman Journeyer
    Currently Being Moderated
    Hello,

    With this diff:
    221c221
    < zend_str_tolower((char*)fe.fname, (unsigned int)strlen(fe[i].fname));
    ---
    zend_str_tolower(fe.fname, (unsigned int)strlen(fe[i].fname));

    I get a clean compile for php_dbxml.cpp. I just added the cast to (char *).

    One thing I have had some problems with is picking up all the correct include files. Is there some way to configure such that I can easily get the compilation to pickup all the appropriate include files? I imagine I'd just run the configure script in the dbxml-2.5.13/dbxml/src/php with some option and then do make in that directory.

    Thanks,
    Sandra
  • 12. Re: Berkeley DB XML and PHP 5.3
    737628 Newbie
    Currently Being Moderated
    Sandra, here's my final attempt. I ran out of time and had to move on..

    [root@acer1 php]# make
    /bin/sh /usr/local/dbxml-2.5.13/dbxml/src/php/libtool --mode=compile g++  -I. -I/usr/local/dbxml-2.5.13/dbxml/src/php -DPHP_ATOM_INC -I/usr/local/dbxml-2.5.13/dbxml/src/php/include -I/usr/local/dbxml-2.5.13/dbxml/src/php/main -I/usr/local/dbxml-2.5.13/dbxml/src/php -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/BerkeleyDB.4.8/include -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4 -I/usr/local/dbxml-2.5.13/install/include  -DHAVE_CONFIG_H  -g -O2   -c /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml_manager.cpp -o php_dbxml_manager.lo                                                                        
    g++ -I. -I/usr/local/dbxml-2.5.13/dbxml/src/php -DPHP_ATOM_INC -I/usr/local/dbxml-2.5.13/dbxml/src/php/include -I/usr/local/dbxml-2.5.13/dbxml/src/php/main -I/usr/local/dbxml-2.5.13/dbxml/src/php -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/BerkeleyDB.4.8/include -I/usr/local/dbxml-2.5.13/db-4.8.24/php_db4 -I/usr/local/dbxml-2.5.13/install/include -DHAVE_CONFIG_H -g -O2 -c /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml_manager.cpp -fPIC -DPIC -o .libs/php_dbxml_manager.o
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml_manager.cpp: In function ‘void zim_XmlManager_XmlManager(int, zval*, zval**, zval*, int)’:
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml_manager.cpp:25: error: ‘db_env_ce_get’ was not declared in this scope
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml_manager.cpp:30: warning: deprecated conversion from string constant to ‘char*’
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml_manager.cpp:32: warning: deprecated conversion from string constant to ‘char*’
    /usr/local/dbxml-2.5.13/dbxml/src/php/php_dbxml_manager.cpp:37: error: ‘php_db4_getDbEnvFromObj’ was not declared in this scope

    In addition to the ln 221 (char*) fix, also in that header, line 24 #include "ext/db4/php_db4.h" I believe is in
    error for my install of php places headers in ext/dba/, not ext/db4.

    The above scope errors: db_env_ce_get and, php_db4_getDbEnvFromObj have caused problems in the past and were patched in 2006.
    see: http://old.nabble.com/-patch--PHP-implementation-(bugfix-and-uninmplemented-method)-td4939661.html

    I finally gave up trying to get dbxml.so compiled though I did get db4.so. I may check back from time to time to see if any of these problems have been run down by someone better equipped than myself to handle them. I was able to get all the samples run with java, python, perl and c++ however. Thanks Sandra for you help and good luck...JC
  • 13. Re: Berkeley DB XML and PHP 5.3
    Oracle, Sandra Whitman Journeyer
    Currently Being Moderated
    For the include file problem, you can also edit that manually. I did not hit these two:
    db_env_ce_get and, php_db4_getDbEnvFromObj but I will investigate them further. I will be opening an internal SR for the entire compilation issue so that it does get resolved. And I'll post any information I find out about db_env_ce_get and php_db4_getDbEnvFromObj.

    Thanks again,
    Sandra
  • 14. Re: Berkeley DB XML and PHP 5.3
    cscetbon Newbie
    Currently Being Moderated
    Hello,

    why the sources have not been cleaned to compile with success since 2009 ?
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points