From: [EMAIL PROTECTED]
Operating system: NetBSD
PHP version: 4.0.6
PHP Bug Type: DBM/DBA related
Bug description: Not possible to build DBA as shared extension
If php is configured and installed on a system without any
db libraries, then a db library, e.g. gdbm, is installed
afterwards, it's not possible to separately build the DBA
module as a shared extension. The problem occurs because
when a db library is not found when php is configured, the
php_config.h file written out contains the line:
#define HAVE_DBA 0
Later, when the DBA module is phpize'd and configured, the
HAVE_DBA definition from php_config.h overrides the value
set in the local config.h file, which causes all of the
code to be ifdef'd out. Even when this problem is fixed,
the various dba_<db>.c files that implement the PHP
functions for a particular db library will have all of
their code ifdef'd out since the DBA_<DB> definitions in
the local config.h file aren't used.
The complete fix is simple:
1) Remove the line "AC_DEFINE(HAVE_DBA, 0, [ ])" from
ext/dba/config.m4.
2) For each dba_<db>.c file, add at the top before
php.h is included the following lines:
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
I have a patch relative to the php-4.0.6 source tree that
makes the above changes, located at:
http://jgrind.org/~jlam/patch.dba-4.0.6
--
Edit bug report at: http://bugs.php.net/?id=13876&edit=1
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]