a very silly dbm bug (was: Some strange problems with PHP 4 RC 1)

From: Date: Thu, 30 Mar 2000 02:37:50 +0000
Subject: a very silly dbm bug (was: Some strange problems with PHP 4 RC 1)
Groups: php.dev 
Request: Send a blank email to php-dev+get-17377@lists.php.net to get a copy of this message
Jim (and PHP developers), Here's a response to the second of the problems in Jim's "Some strange problems with PHP 4 RC 1" email of two days ago. I made loads of attempts to get the dbm calls running with lots and lots of different options in the configuration and build. Last night, after an incredibly frustrating afternoon I sat down with a friend (The Red Fox) and we worked through the code (reading header files, extracting symbols, etc). Eventually, we discovered that somebody had messed with the php_db.h file and had checked it back in with the phpext_db_ptr #undef'd and then #define'd to NULL ... needless to say, this makes it pretty difficult for the main php library to have access to the dbm functions. Below is the output of "cvs diff php_db.h" with the offending #defs removed After applying the patch below, I was able to compile again with support for the dbm functions ... and they all worked. Cheers Geoff PS Of course, there may be a connection with other bugs (including Bug #3423: dbmopen() not thread-safe) ... but that is not for me to judge right now ... Index: php_db.h =================================================================== RCS file: /repository/php4/ext/db/php_db.h,v retrieving revision 1.4 diff -u -r1.4 php_db.h --- php_db.h 2000/02/05 15:16:09 1.4 +++ php_db.h 2000/03/29 15:15:53 @@ -89,7 +89,4 @@ PHP_FUNCTION(dbmfirstkey); PHP_FUNCTION(dbmnextkey); -#undef phpext_db_ptr -#define phpext_db_ptr NULL - #endif /* _PHP_DB_H */

« previous php.dev (#17377) next »