Commit Graph

136 Commits

Author SHA1 Message Date
Marcus Boerger
f14a65c7b9 CS 2003-03-20 19:54:22 +00:00
Marcus Boerger
f5a7a1c094 Use stream locking support
# needs more testing
2003-03-04 23:45:48 +00:00
Marcus Boerger
238abf8c7f fix dba by fixing key_len retrieval 2003-03-04 19:56:35 +00:00
Marcus Boerger
d737741329 allow keys as array(group, name) for handler inifile 2003-02-26 22:07:50 +00:00
Marcus Boerger
8ab1924ca3 @Added dba handler inifiles to support ini files. (Marcus) 2003-02-22 17:20:06 +00:00
Marcus Boerger
037986db20 Fix proto 2003-01-31 19:12:23 +00:00
Ilia Alshanetsky
a7b91019e9 Removed pointless memory allocation checks. 2003-01-18 19:49:28 +00:00
Edin Kadribasic
59b37a5ce4 Fixed win32 build. 2003-01-06 01:08:59 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Marcus Boerger
4d2f7207c0 Add info function to handlers and return handler info when dba_handlers is
called with optional parameter full_info set true.
2002-12-30 13:07:30 +00:00
Marcus Boerger
a213c71735 2nd part of the patch 2002-12-30 11:43:18 +00:00
Marcus Boerger
4b9e8fc899 -better parameter names for DBA_HND macros
-remove unnecessary notice
2002-12-30 11:32:37 +00:00
Marcus Boerger
9b22813c4d Add a default handler that makes handler parameter to open functions
optional.
@Improved dba extension (Marcus)
@-Made handler parameter of dba_(p)open() optional.
@-Added php.ini option 'dba.default_handler' to specify a default handler.
2002-12-29 15:31:00 +00:00
Andrei Zmievski
ddea2a190f Alias dba_popen() to dba_open() until persistent STDIO streams are
implemented.
2002-12-21 01:09:27 +00:00
Marcus Boerger
efd314e767 -Fix memory handling of persistent dba connections.
-Update tests.
# cdb and flatfile still FAIL for dba_popen since the known streams problem
2002-12-20 17:47:58 +00:00
Andrei Zmievski
c45f76112f At least this problem exposed some leaks.. 2002-12-20 16:45:34 +00:00
Marcus Boerger
e0c983a013 Warnings and Notices when lock modifiers for dba_(p)open are used wrong.
This finally closes bug #20828 (and i hope it must not be reopened)
2002-12-11 10:37:38 +00:00
Marcus Boerger
a6e9674bfd add missing comment 2002-12-10 22:51:09 +00:00
Marcus Boerger
b94e0d9eac LOCK_EX is not allowed in read mode -> try using existing .lck file in read
only mode only when in read mode.
2002-12-10 22:49:33 +00:00
Marcus Boerger
17117063ce -remove second attempt to close lock file
-default to lock on db file instead on .lck file.
-try to use existing .lck file and only create it on failure (allows ro access)
2002-12-10 22:02:52 +00:00
Marcus Boerger
ba534ac7c8 Added open modifier '-' to skip/ignore locking. See bug #20828, #20858 2002-12-09 17:54:13 +00:00
Marcus Boerger
579e3ca96b Add Berkeley db4 support 2002-11-26 12:05:59 +00:00
Marcus Boerger
e7d20a0422 Make magic_quotes_runtime work bidirectional for dba 2002-11-22 15:47:48 +00:00
Marcus Boerger
a14bc7685d Add magic_quotes_runtime support 2002-11-14 21:09:41 +00:00
Marcus Boerger
5ec9375760 Fix locking behaviour: On some systems read during write is permitted but
most libraries are not capable of that. GDBM is system dependant so there
we only test  that we do not deadlock.
2002-11-14 14:32:39 +00:00
Marcus Boerger
759e4b10e8 Use php_flock instead of flock 2002-11-11 20:53:41 +00:00
Marcus Boerger
c4e57b182e -fix file open mode when modifier 'd' is used
#Add my name to authors
2002-11-11 12:04:12 +00:00
Marcus Boerger
b8f3b83511 Emit a warning when open mode modifier t is used wrong. 2002-11-10 23:07:35 +00:00
Marcus Boerger
705a4e251c -Centralise open stream for builtin modules that use streams
-If locks work on database file then only one stream open call is used
2002-11-10 17:58:46 +00:00
Marcus Boerger
224e530ee1 finish work on locking
-all but gdbm do internal locking now since only gdbm has internal locking
-you can force locking on database or lck file (with gdbm this makes no
 sense so a notice is generated)
2002-11-10 16:03:17 +00:00
Marcus Boerger
95018fc5c0 -lock support moved from dba_flatfile.c to dba.c
-flatfile, cdb, cdb_make use locking now
#locking is blocking per default use 'rt', 'wt', ct' or 'nt' for non blocking alias
#test access to a database file.
#locking uses flock() which will be emulated or warned if that is not eally
#possible in ext/standard/flock_compat.c
2002-11-08 01:03:53 +00:00
Sascha Schumann
3037b35b31 emalloc never returns 0, so we can simplify the code paths.
also replace ecalloc with emalloc+memset, so that the latter can be inlined.
2002-11-06 17:59:03 +00:00
Marcus Boerger
88af7e9897 Use the the name 'flatfile' correctly so the handler support can be built now.
#I do not like the lock solution since a crashed php would leave the *lck
#file locked now.
2002-11-06 09:17:51 +00:00
Marcus Boerger
4be50925ad move newly introduced flatfile support from dbm to new flatfile handler
# do not make the same mistake as with ext/db where it was not clear
# which format was used.
2002-11-06 04:16:18 +00:00
Marcus Boerger
77858f7fcd -use of emalloc functions
-info was not initialised fulle due to memset parameters
 now that the whole structure is initialised we can stop putting 0 in it.
2002-11-05 15:01:20 +00:00
Marcus Boerger
177b24a44e Why did open fail? 2002-11-05 14:46:36 +00:00
Marcus Boerger
5be5c7f14f incorporate cdb-0.75 as suggested by D. J. Bernstein
#dba now supports cdb_make
2002-11-04 17:53:04 +00:00
Marcus Boerger
9d0c4b7bc5 passing around TSRM
#going to add CDB_MAKE support
2002-11-04 12:27:13 +00:00
Marcus Boerger
aaf5911b16 cdb now allows multiple key-value pairs with same key 2002-11-03 16:43:07 +00:00
Marcus Boerger
a5968cf369 php_error -> php_error_docref 2002-11-01 14:15:24 +00:00
Marcus Boerger
63cffd7eae Implemented dba_list() that returns an array rsrcid=>filename and a test. 2002-10-25 10:06:35 +00:00
Marcus Boerger
82b96d99f3 implemented dba_handlers()
@Added dba_handlers() that lists all installed handlers in an array. (marcus)
2002-10-24 20:43:03 +00:00
foobar
135a1c64c4 Made this extension to use the resource stuff 2002-08-23 22:24:02 +00:00
Derick Rethans
f57306cdd9 Unify error messages 2002-06-26 07:54:00 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Stig Bakken
689252082c * zend_module_entry change: apino, debug and zts are moved first,
see README.EXTENSIONS file for upgrade help.
@Introduced extension version numbers (Stig)
2001-10-11 23:33:59 +00:00
Jeroen van Wolffelaar
6cfba2a3ea 2nd phase in back-substitution those macro's
I've got pretty much everything now...
2001-09-25 22:49:04 +00:00
Derick Rethans
78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
foobar
442669055b Another TSRMLS_FETCH() nuke. 2001-08-14 05:44:33 +00:00
Zeev Suraski
f6f6c4d7e6 Whitespace 2001-08-11 16:39:07 +00:00
Zeev Suraski
aa1772ca72 More TSRMLS_FETCH annihilation 2001-07-31 05:44:11 +00:00
Rasmus Lerdorf
81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf
25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Stig Bakken
1beda9ee1e * include "config.h" if HAVE_CONFIG_H is defined (for standalone dso build) 2001-05-24 10:07:29 +00:00
Andi Gutmans
9fbd0a24ba - How did CVS let me commit this? Probably it confused with the branch
merge
2000-12-16 21:01:21 +00:00
Andi Gutmans
86a1cace27 - Make all places use MAXPATHLEN in the same way. It includes the
terminating NULL.
2000-12-16 20:52:43 +00:00
Sascha Schumann
e052f9f575 Handle the case of no-handlers properly and make handlers a proper C "string". 2000-12-04 10:22:46 +00:00
Sascha Schumann
8476f5b29e Please avoid potential buffer overflows in new code. If you deal
with strings, consider storing the string length along with the string
data. That will make your life easier.
2000-12-01 12:29:29 +00:00
foobar
744f1a34ef Beautifying of phpinfo(). 2000-12-01 01:25:36 +00:00
Sascha Schumann
e937eeb2e5 Run through conv_z_macros 2000-11-22 21:47:15 +00:00
Andrei Zmievski
26f5fe6375 Fix dba after resources patch. 2000-10-26 17:38:01 +00:00
Andrei Zmievski
f1dcb32c9f Use zend_register_list_destructors_ex() instead. 2000-10-25 17:44:02 +00:00
Rasmus Lerdorf
04f0f0b12c Gremlins? 2000-10-21 12:03:09 +00:00
Andrei Zmievski
7b4983c8f8 Mega-patch to get better resource information for modules.
* Fixed a bug in zend_rsrc_list_get_rsrc_type()
  * Switched register_list_destructors() to use
    zend_register_list_destructors_ex() instead
  * Updated all relevant modules to provide the resource type name
    to register_list_destructors() call
  * Updated var_dump() to output resource type name instead of number

@- Made resource type names visible, e.g. var_dump() and
@  get_resource_type() display "file" for file resources. (Andrei)
2000-10-20 18:25:16 +00:00
Egon Schmid
28f38ea4fe Fixed protos. 2000-07-13 18:44:57 +00:00
Sascha Schumann
e8101d4f7b Unify use of my email address 2000-07-10 10:09:15 +00:00
Jouni Ahto
8b8f191e59 # Reverting as requested. 2000-06-27 22:25:27 +00:00
Jouni Ahto
1dfe76f5f6 - dba_[p]open accepts now a new parameter, which kind of database to create
(DBA_BTREE or DBA_HASH), if the handler is either 'db2' or 'db3' and
  mode 'c' or 'n'. It is ignored if mode is 'c' and the db already exists.
# Asked on the list 4 1/2 hours ago if anyone's got to say something to this,
# no response, so I'm assuming it's ok. And yes, I did test this.
2000-06-27 21:36:26 +00:00
Andi Gutmans
3701bc4207 - ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patch 2000-06-05 19:47:54 +00:00
Sascha Schumann
c3d4066b48 Make dba compilable as shared module 2000-05-02 03:38:26 +00:00
Jakub Skopal
ad0f9dbccb Corrected compilation error with wrong number of arguments to
php_info_print_box_start()
2000-04-06 12:26:16 +00:00
Colin Viebrock
731404c0ba phpinfo() prettying
I will get to the rest of the functions later tonight or tomorrow
(i.e. from hyperwave to snmp)
2000-04-05 22:30:19 +00:00
Stig Bakken
d02fe90b00 Change extension names in all extensions' zend_module_entry to their
directory name.
2000-03-06 18:44:01 +00:00
Egon Schmid
0178fb1ab5 More protos. 2000-02-24 16:30:42 +00:00
Zeev Suraski
a1ad2872ee - The tree compiles again 1999-12-18 22:40:35 +00:00
Zeev Suraski
502bb9c746 More php3 cleanup 1999-12-17 21:34:28 +00:00
Zeev Suraski
fb1c77bd4f - Made PHP_VERSION and PHP_OS work again
- More php3_ cleanup
@- Restored the PHP_VERSION and PHP_OS constants (Zeev)
1999-12-17 20:55:31 +00:00
Zeev Suraski
a3c6514332 More php3_ annihilation 1999-12-17 19:51:39 +00:00
Sascha Schumann
5b983c944f Clean up php3.*\.h files. The files itself are renamed, and references in all
.*\.[ch] files were changed. There is a slight chance that my script missed
a few changes, please correct them manually.
1999-12-04 19:19:57 +00:00
Sascha Schumann
9a047652cc add Berkeley DB3 support
@- Added Berkeley DB3 support in DBA (Sascha)
1999-11-20 22:50:42 +00:00
Sascha Schumann
6780b649c6 Convert to Ex API. Does anyone have a better name for it? 1999-09-17 09:56:30 +00:00
Zeev Suraski
3cb1eb0471 Removed '3' from key functions in PHP (maintained compatibility through
php3_compat.h)
1999-08-02 19:17:14 +00:00
Andrey Hristov
c6840056a9 More symbol work. 1999-07-27 17:09:35 +00:00
Sascha Schumann
f78caff762 merge in change from php3 1999-07-21 15:39:28 +00:00
Sascha Schumann
b33d0fd7e7 initial import of DBA 1999-07-21 15:12:32 +00:00