1 diff --git a/API.txt b/API.txt
2 index b2c690e..6895062 100644
5 @@ -31,7 +31,8 @@ Classes:
9 - * ArchiveReader __construct (string filename[, int format[, int compression]])
10 + * ArchiveReader __construct (string filename[, int format[, int
11 + * compression [, int block_size]]])
13 * You need to specify format & compression params *only* if you need
14 * to support only these particular formats/compressions.
15 diff --git a/archive.c b/archive.c
16 index 045adfc..6239edd 100644
20 | obtain it through the world-wide-web, please send a note to |
21 | license@php.net so we can mail you a copy immediately. |
22 +----------------------------------------------------------------------+
23 - | Author: Antony Dovgal <antony@zend.com> |
24 + | Author: Antony Dovgal <tony2001@php.net> |
25 +----------------------------------------------------------------------+
29 #include "archive_clbk.h"
30 #include "php_archive_entry.h"
32 +#if (PHP_MAJOR_VERSION == 5) && (PHP_MINOR_VERSION < 2)
33 #define archive_ce_Exception zend_exception_get_default()
35 +#define archive_ce_Exception zend_exception_get_default(TSRMLS_C)
38 /* {{{ archive_functions[]
40 -function_entry archive_functions[] = {
41 +zend_function_entry archive_functions[] = {
45 @@ -56,7 +60,7 @@ zend_module_entry archive_module_entry = {
48 #if ZEND_MODULE_API_NO >= 20010901
50 + PHP_ARCHIVE_VERSION,
52 STANDARD_MODULE_PROPERTIES
54 @@ -65,9 +69,9 @@ zend_module_entry archive_module_entry = {
55 #ifdef COMPILE_DL_ARCHIVE
56 ZEND_GET_MODULE(archive)
60 static void _archive_desc_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC);
63 /* {{{ _archive_entries_hash_dtor
65 void _archive_entries_hash_dtor(void *data)
66 @@ -83,20 +87,20 @@ void _archive_entries_hash_dtor(void *data)
68 static void _archive_desc_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
70 - archive_file_t *arch = (archive_file_t *)rsrc->ptr;
71 + archive_file_t *arch = (archive_file_t *)rsrc->ptr;
73 if (arch->mode == PHP_ARCHIVE_READ_MODE) {
74 - archive_read_finish(arch->arch);
75 + archive_read_free(arch->arch);
77 else if (arch->mode == PHP_ARCHIVE_WRITE_MODE) {
78 archive_write_close(arch->arch);
79 - archive_write_finish(arch->arch);
80 + archive_write_free(arch->arch);
85 php_stream_close(arch->stream);
90 efree(arch->filename);
92 @@ -116,12 +120,12 @@ static void _archive_desc_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC)
93 int _archive_get_rsrc_id(zval *this TSRMLS_DC)
97 - if (zend_hash_find(Z_OBJPROP_P(this), "fd", sizeof("fd"), (void **)&prop) == FAILURE) {
98 - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find archive file descriptor");
103 + if (zend_hash_find(Z_OBJPROP_P(this), "fd", sizeof("fd"), (void **)&prop) == FAILURE) {
104 + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find archive file descriptor");
108 return Z_LVAL_PP(prop);
111 @@ -131,7 +135,7 @@ int _archive_get_rsrc_id(zval *this TSRMLS_DC)
112 int _archive_get_fd(zval *this, archive_file_t **arch TSRMLS_DC)
114 int resource_id, type;
118 if ((resource_id = _archive_get_rsrc_id(this TSRMLS_CC))) {
119 *arch = (archive_file_t *) zend_list_find(resource_id, &type);
120 @@ -149,12 +153,12 @@ int _archive_get_fd(zval *this, archive_file_t **arch TSRMLS_DC)
121 PHP_MINIT_FUNCTION(archive)
123 zend_class_entry tmp_ce_ArchiveException;
126 le_archive = zend_register_list_destructors_ex(_archive_desc_dtor, NULL, "archive descriptor", module_number);
129 INIT_CLASS_ENTRY(tmp_ce_ArchiveException, "ArchiveException", NULL);
130 ce_ArchiveException = zend_register_internal_class_ex(&tmp_ce_ArchiveException, archive_ce_Exception, NULL TSRMLS_CC);
133 PHP_MINIT(archive_entry)(INIT_FUNC_ARGS_PASSTHRU);
134 PHP_MINIT(archive_reader)(INIT_FUNC_ARGS_PASSTHRU);
136 @@ -174,7 +178,7 @@ PHP_MINIT_FUNCTION(archive)
138 REGISTER_LONG_CONSTANT("ARCH_COMPRESSION_COMPRESS", PHP_ARCHIVE_COMPRESSION_COMPRESS, CONST_CS | CONST_PERSISTENT);
139 REGISTER_LONG_CONSTANT("ARCH_COMPRESSION_NONE", PHP_ARCHIVE_COMPRESSION_NONE, CONST_CS | CONST_PERSISTENT);
145 @@ -185,7 +189,8 @@ PHP_MINFO_FUNCTION(archive)
147 php_info_print_table_start();
148 php_info_print_table_header(2, "archive support", "enabled");
149 - php_info_print_table_row(2, "libarchive version", archive_version());
150 + php_info_print_table_row(2, "extension version", PHP_ARCHIVE_VERSION);
151 + php_info_print_table_row(2, "libarchive version", archive_version());
152 php_info_print_table_end();
155 diff --git a/archive_clbk.c b/archive_clbk.c
156 index 3034e0a..3b09d8b 100644
160 | obtain it through the world-wide-web, please send a note to |
161 | license@php.net so we can mail you a copy immediately. |
162 +----------------------------------------------------------------------+
163 - | Author: Antony Dovgal <antony@zend.com> |
164 + | Author: Antony Dovgal <tony2001@php.net> |
165 +----------------------------------------------------------------------+
168 @@ -32,7 +32,6 @@ ssize_t _archive_read_clbk(struct archive *a, void *client_data, const void **bu
170 archive_file_t *arch = (archive_file_t *)client_data;
175 if (arch->stream == NULL) {
176 @@ -40,7 +39,7 @@ ssize_t _archive_read_clbk(struct archive *a, void *client_data, const void **bu
180 - if ((len = php_stream_read(arch->stream, arch->buf, PHP_ARCHIVE_BUF_LEN))) {
181 + if ((len = php_stream_read(arch->stream, arch->buf, arch->block_size))) {
185 @@ -49,11 +48,10 @@ ssize_t _archive_read_clbk(struct archive *a, void *client_data, const void **bu
187 /* {{{ _archive_write_clbk
189 -ssize_t _archive_write_clbk(struct archive *a, void *client_data, void *buff, size_t buf_len)
190 +ssize_t _archive_write_clbk(struct archive *a, void *client_data, const void *buff, size_t buf_len)
192 archive_file_t *arch = (archive_file_t *)client_data;
197 if (arch->stream == NULL) {
198 @@ -67,12 +65,58 @@ ssize_t _archive_write_clbk(struct archive *a, void *client_data, void *buff, si
202 +/* {{{ _archive_skip_clbk
204 +off_t _archive_skip_clbk(struct archive *a, void *client_data, off_t request)
206 + archive_file_t *arch = (archive_file_t *)client_data;
216 + size = (request/arch->block_size) * arch->block_size;
217 + if(size == 0){ /*do not break a block*/
220 + /*TODO maybe lasy seek is a better idea for performance
221 + * refer: libarchive archive_read_open_filename.c file_skip_lseek
223 + r = php_stream_seek(arch->stream, size, SEEK_CUR);
233 +/* {{{ _archive_seek_clbk
235 +ssize_t _archive_seek_clbk(struct archive *a, void *client_data, off_t offset, int whence)
238 + archive_file_t *arch = (archive_file_t *)client_data;
241 + r = php_stream_seek(arch->stream, offset, whence);
244 + return php_stream_tell(arch->stream);
249 /* {{{ _archive_open_clbk
251 int _archive_open_clbk(struct archive *a, void *client_data)
253 archive_file_t *arch = (archive_file_t *)client_data;
257 if (arch->mode == PHP_ARCHIVE_WRITE_MODE) {
258 @@ -80,8 +124,17 @@ int _archive_open_clbk(struct archive *a, void *client_data)
259 } else if (arch->mode == PHP_ARCHIVE_READ_MODE) {
260 arch->stream = php_stream_open_wrapper_ex(arch->filename, "r", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, NULL);
265 + /* Use libarchive to manage buffer
266 + * here we set non-buffer of php stream
268 + arch->stream->flags |= PHP_STREAM_FLAG_NO_BUFFER;
269 + if((arch->stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0){
270 + archive_read_set_skip_callback(arch->arch, _archive_skip_clbk);
271 + /*TODO it is usually not a good idea to support seek
272 + * archive_read_set_seek_callback(arch->arch, _archive_seek_clbk);*/
277 @@ -93,7 +146,6 @@ int _archive_open_clbk(struct archive *a, void *client_data)
278 int _archive_close_clbk(struct archive *a, void *client_data)
280 archive_file_t *arch = (archive_file_t *)client_data;
285 diff --git a/archive_clbk.h b/archive_clbk.h
286 index 6196a29..626a5ad 100644
290 | obtain it through the world-wide-web, please send a note to |
291 | license@php.net so we can mail you a copy immediately. |
292 +----------------------------------------------------------------------+
293 - | Author: Antony Dovgal <antony@zend.com> |
294 + | Author: Antony Dovgal <tony2001@php.net> |
295 +----------------------------------------------------------------------+
299 ssize_t _archive_read_clbk(struct archive *, void *, const void **);
300 int _archive_open_clbk(struct archive *, void *);
301 int _archive_close_clbk(struct archive *, void *);
302 -ssize_t _archive_write_clbk(struct archive *, void *, void *, size_t);
303 +off_t _archive_skip_clbk(struct archive *, void *, off_t);
304 +ssize_t _archive_seek_clbk(struct archive *, void *, off_t, int);
305 +ssize_t _archive_write_clbk(struct archive *, void *, const void *, size_t);
307 #endif /* ARCHIVE_CLBK_H */
309 diff --git a/archive_entry.c b/archive_entry.c
310 index 2cc511b..df9c657 100644
311 --- a/archive_entry.c
312 +++ b/archive_entry.c
314 | obtain it through the world-wide-web, please send a note to |
315 | license@php.net so we can mail you a copy immediately. |
316 +----------------------------------------------------------------------+
317 - | Author: Antony Dovgal <antony@zend.com> |
318 + | Author: Antony Dovgal <tony2001@php.net> |
319 +----------------------------------------------------------------------+
323 #include "php_archive.h"
324 #include "php_archive_entry.h"
326 -/* function_entry funcs_ArchiveEntry {{{ */
327 -function_entry funcs_ArchiveEntry[] = {
328 +/* zend_function_entry funcs_ArchiveEntry {{{ */
329 +zend_function_entry funcs_ArchiveEntry[] = {
330 ZEND_ME(ArchiveEntry, __construct, NULL, 0)
331 ZEND_ME(ArchiveEntry, isDir, NULL, 0)
332 ZEND_ME(ArchiveEntry, isFile, NULL, 0)
333 @@ -50,12 +50,13 @@ function_entry funcs_ArchiveEntry[] = {
334 static void _archive_entry_desc_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC);
336 #define PHP_ENTRY_GET_STRUCT \
337 - php_set_error_handling(EH_THROW, ce_ArchiveException TSRMLS_CC); \
338 + zend_error_handling error_handling; \
339 + zend_replace_error_handling(EH_THROW, ce_ArchiveException, &error_handling TSRMLS_CC); \
340 if(!_archive_get_entry_struct(this, &entry TSRMLS_CC)) { \
341 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC); \
342 + zend_restore_error_handling(&error_handling TSRMLS_CC); \
345 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
346 + zend_restore_error_handling(&error_handling TSRMLS_CC);
348 /* {{{ _archive_entry_desc_dtor
350 @@ -98,10 +99,10 @@ int _archive_get_entry_rsrc_id(zval *this TSRMLS_DC)
354 - if (zend_hash_find(Z_OBJPROP_P(this), "entry", sizeof("entry"), (void **)&prop) == FAILURE) {
355 - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find entry descriptor");
358 + if (zend_hash_find(Z_OBJPROP_P(this), "entry", sizeof("entry"), (void **)&prop) == FAILURE) {
359 + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find entry descriptor");
363 return Z_LVAL_PP(prop);
365 @@ -149,27 +150,30 @@ ZEND_METHOD(ArchiveEntry, __construct)
366 archive_entry_t *entry;
367 struct stat *stat_sb;
368 php_stream_statbuf ssb;
370 - php_set_error_handling(EH_THROW, ce_ArchiveException TSRMLS_CC);
371 + zend_error_handling error_handling;
373 + zend_replace_error_handling(EH_THROW, ce_ArchiveException, &error_handling TSRMLS_CC);
375 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) {
376 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
377 + zend_restore_error_handling(&error_handling TSRMLS_CC);
381 +#if PHP_API_VERSION < 20100412
382 if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
383 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
384 + zend_restore_error_handling(&error_handling TSRMLS_CC);
390 if (php_check_open_basedir(filename TSRMLS_CC)) {
391 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
392 + zend_restore_error_handling(&error_handling TSRMLS_CC);
397 if (php_stream_stat_path_ex((char *)filename, PHP_STREAM_URL_STAT_LINK, &ssb, NULL)) {
398 php_error_docref(NULL TSRMLS_CC, E_WARNING, "stat failed for %s", filename);
399 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
400 + zend_restore_error_handling(&error_handling TSRMLS_CC);
404 @@ -177,18 +181,18 @@ ZEND_METHOD(ArchiveEntry, __construct)
406 entry = (archive_entry_t *) emalloc(sizeof(archive_entry_t));
407 entry->resolved_filename = NULL;
410 #if (!defined(__BEOS__) && !defined(NETWARE) && HAVE_REALPATH) || defined(ZTS)
411 if (S_ISLNK(stat_sb->st_mode)) {
412 char resolved_path_buff[MAXPATHLEN];
414 if (VCWD_REALPATH(filename, resolved_path_buff)) {
415 -/* TODO figure out if we need this check */
416 + /* TODO figure out if we need this check */
417 #if 0 && defined(ZTS)
418 if (VCWD_ACCESS(resolved_path_buff, F_OK)) {
420 php_error_docref(NULL TSRMLS_CC, E_WARNING, "stat failed for %s", filename);
421 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
422 + zend_restore_error_handling(&error_handling TSRMLS_CC);
426 @@ -211,7 +215,7 @@ ZEND_METHOD(ArchiveEntry, __construct)
427 resource_id = zend_list_insert(entry,le_archive_entry);
428 add_property_resource(this, "entry", resource_id);
430 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
431 + zend_restore_error_handling(&error_handling TSRMLS_CC);
435 diff --git a/archive_reader.c b/archive_reader.c
436 index 0673a83..b0f070a 100644
437 --- a/archive_reader.c
438 +++ b/archive_reader.c
440 | obtain it through the world-wide-web, please send a note to |
441 | license@php.net so we can mail you a copy immediately. |
442 +----------------------------------------------------------------------+
443 - | Author: Antony Dovgal <antony@zend.com> |
444 + | Author: Antony Dovgal <tony2001@php.net> |
445 +----------------------------------------------------------------------+
449 zend_class_entry *ce_ArchiveReader;
450 zend_class_entry *ce_ArchiveReaderInterface;
452 -/* function_entry funcs_ArchiveReaderInterface {{{ */
453 -function_entry funcs_ArchiveReaderInterface[] = {
454 +/* zend_function_entry funcs_ArchiveReaderInterface {{{ */
455 +zend_function_entry funcs_ArchiveReaderInterface[] = {
456 ZEND_ABSTRACT_ME(ArchiveReader, __construct, NULL)
457 ZEND_ABSTRACT_ME(ArchiveReader, getNextEntry, NULL)
458 ZEND_ABSTRACT_ME(ArchiveReader, getCurrentEntryData, NULL)
459 @@ -43,8 +43,8 @@ function_entry funcs_ArchiveReaderInterface[] = {
463 -/* function_entry funcs_ArchiveReader {{{ */
464 -function_entry funcs_ArchiveReader[] = {
465 +/* zend_function_entry funcs_ArchiveReader {{{ */
466 +zend_function_entry funcs_ArchiveReader[] = {
467 ZEND_ME(ArchiveReader, __construct, NULL, 0)
468 ZEND_ME(ArchiveReader, getNextEntry, NULL, 0)
469 ZEND_ME(ArchiveReader, getCurrentEntryData, NULL, 0)
470 @@ -83,24 +83,30 @@ ZEND_METHOD(ArchiveReader, __construct)
471 zval *this = getThis();
472 const char *error_string = NULL;
474 - int error_num, filename_len, result, format = 0, compression = 0;
475 + long error_num, filename_len, result, format = 0, compression = 0, block_size = 0;
476 + zend_error_handling error_handling;
478 - php_set_error_handling(EH_THROW, ce_ArchiveException TSRMLS_CC);
479 + zend_replace_error_handling(EH_THROW, ce_ArchiveException, &error_handling TSRMLS_CC);
481 - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ll", &filename, &filename_len, &format, &compression) == FAILURE) {
482 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
483 + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|lll", &filename, &filename_len, &format, &compression, &block_size) == FAILURE) {
484 + zend_restore_error_handling(&error_handling TSRMLS_CC);
488 +#if PHP_API_VERSION < 20100412
489 if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
490 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
491 + zend_restore_error_handling(&error_handling TSRMLS_CC);
496 if (php_check_open_basedir(filename TSRMLS_CC)) {
497 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
498 + zend_restore_error_handling(&error_handling TSRMLS_CC);
502 + if(block_size <= 0){
503 + block_size = PHP_ARCHIVE_BUF_LEN;
506 arch = (archive_file_t *) emalloc(sizeof(archive_file_t));
508 @@ -108,69 +114,53 @@ ZEND_METHOD(ArchiveReader, __construct)
509 arch->current_entry = NULL;
510 arch->entries = NULL;
511 arch->struct_state = ARCHIVE_OK;
512 + arch->block_size = block_size;
513 arch->mode = PHP_ARCHIVE_READ_MODE;
514 - arch->buf = emalloc(PHP_ARCHIVE_BUF_LEN + 1);
515 + arch->buf = emalloc(arch->block_size + 1);
516 arch->filename = estrndup(filename, filename_len);
517 arch->arch = archive_read_new();
520 - _php_archive_read_support_compression_all(arch->arch);
523 - /* support all by default */
524 - archive_read_support_format_all(arch->arch);
527 - if (format & PHP_ARCHIVE_FORMAT_TAR) {
528 - archive_read_support_format_tar(arch->arch);
531 - if (format & PHP_ARCHIVE_FORMAT_CPIO) {
532 - archive_read_support_format_cpio(arch->arch);
535 + archive_read_support_filter_all(arch->arch);
537 + case PHP_ARCHIVE_FORMAT_TAR:
538 + archive_read_support_format_tar(arch->arch);
540 + case PHP_ARCHIVE_FORMAT_CPIO:
541 + archive_read_support_format_cpio(arch->arch);
544 + archive_read_support_format_all(arch->arch);
548 - if (compression == 0) {
549 - /* support all possible compression types by default */
550 - _php_archive_read_support_compression_all(arch->arch);
553 - if (compression & PHP_ARCHIVE_COMPRESSION_NONE) {
557 - if (compression & PHP_ARCHIVE_COMPRESSION_GZIP) {
559 - archive_read_support_compression_gzip(arch->arch);
561 + switch(compression){
562 + case PHP_ARCHIVE_COMPRESSION_NONE:
564 + case PHP_ARCHIVE_COMPRESSION_GZIP:
565 + if(archive_read_support_filter_gzip(arch->arch) != ARCHIVE_OK){
566 efree(arch->filename);
569 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Gzip compression support is not available in this build ");
570 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
575 - if (compression & PHP_ARCHIVE_COMPRESSION_BZIP2) {
577 - archive_read_support_compression_bzip2(arch->arch);
579 + zend_restore_error_handling(&error_handling TSRMLS_CC);
583 + case PHP_ARCHIVE_COMPRESSION_BZIP2:
584 + if(archive_read_support_filter_gzip(arch->arch) != ARCHIVE_OK){
585 efree(arch->filename);
588 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bzip2 compression support is not available in this build ");
589 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
590 + zend_restore_error_handling(&error_handling TSRMLS_CC);
595 - /* compress support is always available */
596 - if (compression & PHP_ARCHIVE_COMPRESSION_COMPRESS) {
597 - archive_read_support_compression_compress(arch->arch);
603 + archive_read_support_filter_all(arch->arch);
607 result = archive_read_open(arch->arch, arch, _archive_open_clbk, _archive_read_clbk, _archive_close_clbk);
610 @@ -188,14 +178,14 @@ ZEND_METHOD(ArchiveReader, __construct)
612 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to open file %s for reading: unknown error %d", filename, result);
614 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
615 + zend_restore_error_handling(&error_handling TSRMLS_CC);
619 resource_id = zend_list_insert(arch,le_archive);
620 add_property_resource(this, "fd", resource_id);
622 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
623 + zend_restore_error_handling(&error_handling TSRMLS_CC);
627 @@ -212,19 +202,20 @@ ZEND_METHOD(ArchiveReader, getNextEntry)
628 zend_bool fetch_entry_data = 0;
629 archive_entry_t *entry;
630 struct archive_entry *current_entry;
635 + zend_error_handling error_handling;
637 - php_set_error_handling(EH_THROW, ce_ArchiveException TSRMLS_CC);
638 + zend_replace_error_handling(EH_THROW, ce_ArchiveException, &error_handling TSRMLS_CC);
640 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|b", &fetch_entry_data) == FAILURE) {
641 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
642 + zend_restore_error_handling(&error_handling TSRMLS_CC);
646 if (!_archive_get_fd(this, &arch TSRMLS_CC)) {
647 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
648 + zend_restore_error_handling(&error_handling TSRMLS_CC);
652 @@ -240,7 +231,7 @@ ZEND_METHOD(ArchiveReader, getNextEntry)
653 arch->current_entry = entry;
656 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
657 + zend_restore_error_handling(&error_handling TSRMLS_CC);
661 @@ -256,14 +247,14 @@ ZEND_METHOD(ArchiveReader, getNextEntry)
663 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to read file %s: unknown error %d", arch->filename, result);
665 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
666 + zend_restore_error_handling(&error_handling TSRMLS_CC);
670 if (result == ARCHIVE_EOF) {
671 arch->current_entry = NULL;
673 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
674 + zend_restore_error_handling(&error_handling TSRMLS_CC);
678 @@ -287,7 +278,7 @@ ZEND_METHOD(ArchiveReader, getNextEntry)
680 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to read file %s: unknown error %d", arch->filename, result);
682 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
683 + zend_restore_error_handling(&error_handling TSRMLS_CC);
687 @@ -297,7 +288,7 @@ ZEND_METHOD(ArchiveReader, getNextEntry)
688 add_property_resource(return_value, "entry", resource_id);
691 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
692 + zend_restore_error_handling(&error_handling TSRMLS_CC);
696 @@ -313,22 +304,23 @@ ZEND_METHOD(ArchiveReader, getCurrentEntryData)
698 const char *error_string;
700 + zend_error_handling error_handling;
702 - php_set_error_handling(EH_THROW, ce_ArchiveException TSRMLS_CC);
703 + zend_replace_error_handling(EH_THROW, ce_ArchiveException, &error_handling TSRMLS_CC);
705 if (!_archive_get_fd(this, &arch TSRMLS_CC)) {
706 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
707 + zend_restore_error_handling(&error_handling TSRMLS_CC);
711 if (arch->current_entry == NULL) {
712 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Current archive entry is not available");
713 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
714 + zend_restore_error_handling(&error_handling TSRMLS_CC);
718 if (arch->current_entry->data) {
719 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
720 + zend_restore_error_handling(&error_handling TSRMLS_CC);
721 RETURN_STRINGL(arch->current_entry->data, arch->current_entry->data_len, 1);
724 @@ -348,11 +340,11 @@ ZEND_METHOD(ArchiveReader, getCurrentEntryData)
726 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to read entry data: unknown error %d", result);
728 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
729 + zend_restore_error_handling(&error_handling TSRMLS_CC);
733 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
734 + zend_restore_error_handling(&error_handling TSRMLS_CC);
735 RETURN_STRINGL(arch->current_entry->data, arch->current_entry->data_len, 1);
738 @@ -366,22 +358,23 @@ ZEND_METHOD(ArchiveReader, extractCurrentEntry)
739 archive_file_t *arch;
740 int result, error_num, flags = 0;
741 const char *error_string;
742 + zend_error_handling error_handling;
744 - php_set_error_handling(EH_THROW, ce_ArchiveException TSRMLS_CC);
745 + zend_replace_error_handling(EH_THROW, ce_ArchiveException, &error_handling TSRMLS_CC);
747 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &flags) == FAILURE) {
748 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
749 + zend_restore_error_handling(&error_handling TSRMLS_CC);
753 if (!_archive_get_fd(this, &arch TSRMLS_CC)) {
754 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
755 + zend_restore_error_handling(&error_handling TSRMLS_CC);
759 if (arch->current_entry == NULL) {
760 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Current archive entry is not available");
761 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
762 + zend_restore_error_handling(&error_handling TSRMLS_CC);
766 @@ -389,7 +382,7 @@ ZEND_METHOD(ArchiveReader, extractCurrentEntry)
767 /* again, rather annoying libarchive limitation: you can't extract or
768 * read entry anymore if it had been extracted/read before.
770 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
771 + zend_restore_error_handling(&error_handling TSRMLS_CC);
775 @@ -406,10 +399,10 @@ ZEND_METHOD(ArchiveReader, extractCurrentEntry)
776 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to extract entry: unknown error %d", result);
779 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
780 + zend_restore_error_handling(&error_handling TSRMLS_CC);
783 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
784 + zend_restore_error_handling(&error_handling TSRMLS_CC);
788 @@ -421,18 +414,19 @@ ZEND_METHOD(ArchiveReader, close)
790 zval *this = getThis();
792 + zend_error_handling error_handling;
794 - php_set_error_handling(EH_THROW, ce_ArchiveException TSRMLS_CC);
795 + zend_replace_error_handling(EH_THROW, ce_ArchiveException, &error_handling TSRMLS_CC);
797 if ((resourse_id = _archive_get_rsrc_id(this TSRMLS_CC))) {
798 add_property_resource(this, "fd", 0);
799 zend_list_delete(resourse_id);
800 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
801 + zend_restore_error_handling(&error_handling TSRMLS_CC);
805 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to close archive file descriptor");
806 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
807 + zend_restore_error_handling(&error_handling TSRMLS_CC);
811 diff --git a/archive_reader.h b/archive_reader.h
812 index ed1c7f9..29d3acc 100644
813 --- a/archive_reader.h
814 +++ b/archive_reader.h
816 | obtain it through the world-wide-web, please send a note to |
817 | license@php.net so we can mail you a copy immediately. |
818 +----------------------------------------------------------------------+
819 - | Author: Antony Dovgal <antony@zend.com> |
820 + | Author: Antony Dovgal <tony2001@php.net> |
821 +----------------------------------------------------------------------+
824 diff --git a/archive_util.c b/archive_util.c
825 index 9838820..5e4c477 100644
829 | obtain it through the world-wide-web, please send a note to |
830 | license@php.net so we can mail you a copy immediately. |
831 +----------------------------------------------------------------------+
832 - | Author: Antony Dovgal <antony@zend.com> |
833 + | Author: Antony Dovgal <tony2001@php.net> |
834 +----------------------------------------------------------------------+
837 @@ -48,11 +48,11 @@ int _archive_pathname_compare(const void *a, const void *b TSRMLS_DC)
838 s = *((Bucket **) b);
840 Z_TYPE(first) = IS_STRING;
841 - Z_STRVAL(first) = f->arKey;
842 + Z_STRVAL(first) = (char *)f->arKey;
843 Z_STRLEN(first) = f->nKeyLength-1;
845 Z_TYPE(second) = IS_STRING;
846 - Z_STRVAL(second) = s->arKey;
847 + Z_STRVAL(second) = (char *)s->arKey;
848 Z_STRLEN(second) = s->nKeyLength-1;
850 if (string_compare_function(&result, &first, &second TSRMLS_CC) != SUCCESS) {
851 diff --git a/archive_util.h b/archive_util.h
852 index c897738..100493d 100644
856 | obtain it through the world-wide-web, please send a note to |
857 | license@php.net so we can mail you a copy immediately. |
858 +----------------------------------------------------------------------+
859 - | Author: Antony Dovgal <antony@zend.com> |
860 + | Author: Antony Dovgal <tony2001@php.net> |
861 +----------------------------------------------------------------------+
864 diff --git a/archive_writer.c b/archive_writer.c
865 index 30647bf..2637633 100644
866 --- a/archive_writer.c
867 +++ b/archive_writer.c
869 | obtain it through the world-wide-web, please send a note to |
870 | license@php.net so we can mail you a copy immediately. |
871 +----------------------------------------------------------------------+
872 - | Author: Antony Dovgal <antony@zend.com> |
873 + | Author: Antony Dovgal <tony2001@php.net> |
874 +----------------------------------------------------------------------+
878 zend_class_entry *ce_ArchiveWriter;
879 zend_class_entry *ce_ArchiveWriterInterface;
881 -/* function_entry funcs_ArchiveWriterInterface {{{ */
882 -function_entry funcs_ArchiveWriterInterface[] = {
883 +/* zend_function_entry funcs_ArchiveWriterInterface {{{ */
884 +zend_function_entry funcs_ArchiveWriterInterface[] = {
885 ZEND_ABSTRACT_ME(ArchiveWriter, __construct, NULL)
886 ZEND_ABSTRACT_ME(ArchiveWriter, addEntry, NULL)
887 ZEND_ABSTRACT_ME(ArchiveWriter, finish, NULL)
888 @@ -44,8 +44,8 @@ function_entry funcs_ArchiveWriterInterface[] = {
892 -/* function_entry funcs_ArchiveWriter {{{ */
893 -function_entry funcs_ArchiveWriter[] = {
894 +/* zend_function_entry funcs_ArchiveWriter {{{ */
895 +zend_function_entry funcs_ArchiveWriter[] = {
896 ZEND_ME(ArchiveWriter, __construct, NULL, 0)
897 ZEND_ME(ArchiveWriter, addEntry, NULL, 0)
898 ZEND_ME(ArchiveWriter, finish, NULL, 0)
899 @@ -83,21 +83,24 @@ ZEND_METHOD(ArchiveWriter, __construct)
900 const char *error_string = NULL;
902 int error_num, filename_len, result, format=0, compression=0;
903 + zend_error_handling error_handling;
905 - php_set_error_handling(EH_THROW, ce_ArchiveException TSRMLS_CC);
906 + zend_replace_error_handling(EH_THROW, ce_ArchiveException, &error_handling TSRMLS_CC);
908 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ll", &filename, &filename_len, &format, &compression) == FAILURE) {
909 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
910 + zend_restore_error_handling(&error_handling TSRMLS_CC);
914 +#if PHP_API_VERSION < 20100412
915 if (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) {
916 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
917 + zend_restore_error_handling(&error_handling TSRMLS_CC);
922 if (php_check_open_basedir(filename TSRMLS_CC)) {
923 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
924 + zend_restore_error_handling(&error_handling TSRMLS_CC);
928 @@ -114,36 +117,28 @@ ZEND_METHOD(ArchiveWriter, __construct)
929 arch->arch = archive_write_new();
931 switch (compression) {
933 case PHP_ARCHIVE_COMPRESSION_GZIP:
934 - archive_write_set_compression_gzip(arch->arch);
935 + if(archive_write_add_filter_gzip(arch->arch) != ARCHIVE_OK){
936 + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Gzip compression is not supported in this build");
937 + zend_restore_error_handling(&error_handling TSRMLS_CC);
942 - case PHP_ARCHIVE_COMPRESSION_GZIP:
943 - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Gzip compression is not supported in this build");
944 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
950 case PHP_ARCHIVE_COMPRESSION_BZIP2:
951 - archive_write_set_compression_bzip2(arch->arch);
954 - case PHP_ARCHIVE_COMPRESSION_BZIP2:
955 - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bzip2 compression is not supported in this build");
956 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
958 + if(archive_write_add_filter_bzip2(arch->arch) != ARCHIVE_OK){
959 + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Bzip2 compression is not supported in this build");
960 + zend_restore_error_handling(&error_handling TSRMLS_CC);
965 case 0: /* default value */
966 case PHP_ARCHIVE_COMPRESSION_NONE:
967 /* always supported */
970 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsupported compression type %d", compression);
971 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
972 + zend_restore_error_handling(&error_handling TSRMLS_CC);
976 @@ -168,7 +163,7 @@ ZEND_METHOD(ArchiveWriter, __construct)
979 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsupported archive format: %d", format);
980 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
981 + zend_restore_error_handling(&error_handling TSRMLS_CC);
985 @@ -190,14 +185,14 @@ ZEND_METHOD(ArchiveWriter, __construct)
987 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to open file %s for writing: unknown error %d", filename, result);
989 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
990 + zend_restore_error_handling(&error_handling TSRMLS_CC);
994 resource_id = zend_list_insert(arch,le_archive);
995 add_property_resource(this, "fd", resource_id);
997 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
998 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1002 @@ -214,27 +209,28 @@ ZEND_METHOD(ArchiveWriter, addEntry)
1005 const struct stat *stat_sb;
1006 + zend_error_handling error_handling;
1008 - php_set_error_handling(EH_THROW, ce_ArchiveException TSRMLS_CC);
1009 + zend_replace_error_handling(EH_THROW, ce_ArchiveException, &error_handling TSRMLS_CC);
1011 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &entry_obj) == FAILURE) {
1012 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1013 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1017 if (!_archive_get_fd(this, &arch TSRMLS_CC)) {
1018 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1019 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1023 if (!instanceof_function(Z_OBJCE_P(entry_obj), ce_ArchiveEntry TSRMLS_CC)) {
1024 php_error_docref(NULL TSRMLS_CC, E_WARNING, "An instance of ArchiveEntry is required");
1025 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1026 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1030 if(!_archive_get_entry_struct(entry_obj, &entry TSRMLS_CC)) {
1031 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1032 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1036 @@ -245,7 +241,7 @@ ZEND_METHOD(ArchiveWriter, addEntry)
1038 if (pathname_len == 0 || pathname[0] == '\0') {
1039 /* user is probably trying to add "./", "/", ".." or ".", ignoring it silently */
1040 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1041 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1045 @@ -265,7 +261,7 @@ ZEND_METHOD(ArchiveWriter, addEntry)
1047 /* ..and add it to the hash */
1048 zend_hash_update(arch->entries, pathname, pathname_len + 1, &entry_copy, sizeof(archive_entry_t), NULL);
1049 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1050 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1054 @@ -284,11 +280,12 @@ ZEND_METHOD(ArchiveWriter, finish)
1055 const char *error_string;
1058 + zend_error_handling error_handling;
1060 - php_set_error_handling(EH_THROW, ce_ArchiveException TSRMLS_CC);
1061 + zend_replace_error_handling(EH_THROW, ce_ArchiveException, &error_handling TSRMLS_CC);
1063 if (!_archive_get_fd(this, &arch TSRMLS_CC)) {
1064 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1065 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1069 @@ -313,7 +310,7 @@ ZEND_METHOD(ArchiveWriter, finish)
1070 result = archive_write_header(arch->arch, (*entry)->entry);
1071 if (result == ARCHIVE_FATAL) {
1072 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to write entry header for file %s: fatal error", (*entry)->filename);
1073 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1074 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1078 @@ -331,7 +328,7 @@ ZEND_METHOD(ArchiveWriter, finish)
1079 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to write file %s: unknown error %d", (*entry)->filename, result);
1081 php_stream_close(stream);
1082 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1083 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1087 @@ -342,7 +339,7 @@ ZEND_METHOD(ArchiveWriter, finish)
1088 result = archive_write_header(arch->arch, (*entry)->entry);
1089 if (result == ARCHIVE_FATAL) {
1090 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to write entry header for file %s: fatal error", (*entry)->filename);
1091 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1092 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1096 @@ -352,12 +349,12 @@ ZEND_METHOD(ArchiveWriter, finish)
1097 if ((resource_id = _archive_get_rsrc_id(this TSRMLS_CC))) {
1098 add_property_resource(this, "fd", 0);
1099 zend_list_delete(resource_id);
1100 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1101 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1105 php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to finish writing of archive file");
1106 - php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
1107 + zend_restore_error_handling(&error_handling TSRMLS_CC);
1111 diff --git a/archive_writer.h b/archive_writer.h
1112 index f87909c..e51b3a4 100644
1113 --- a/archive_writer.h
1114 +++ b/archive_writer.h
1116 | obtain it through the world-wide-web, please send a note to |
1117 | license@php.net so we can mail you a copy immediately. |
1118 +----------------------------------------------------------------------+
1119 - | Author: Antony Dovgal <antony@zend.com> |
1120 + | Author: Antony Dovgal <tony2001@php.net> |
1121 +----------------------------------------------------------------------+
1124 diff --git a/package.xml b/package.xml
1125 index cb319ed..9cefd16 100644
1126 diff --git a/php_archive.h b/php_archive.h
1127 index ad3724b..21094f8 100644
1131 | obtain it through the world-wide-web, please send a note to |
1132 | license@php.net so we can mail you a copy immediately. |
1133 +----------------------------------------------------------------------+
1134 - | Author: Antony Dovgal <antony@zend.com> |
1135 + | Author: Antony Dovgal <tony2001@php.net> |
1136 +----------------------------------------------------------------------+
1140 #include <archive.h>
1141 #include <archive_entry.h>
1143 +#define PHP_ARCHIVE_VERSION "0.3.1-dev"
1145 #define PHP_ARCHIVE_FORMAT_TAR (1<<0)
1146 #define PHP_ARCHIVE_FORMAT_CPIO (1<<1)
1147 @@ -58,33 +59,43 @@ typedef struct archive_file {
1155 #define PHP_ARCHIVE_BUF_LEN 8196
1157 -#if defined(HAVE_BZ2) && defined(HAVE_ZLIB)
1158 -#define _php_archive_read_support_compression_all(arch) \
1159 - archive_read_support_compression_bzip2(arch); \
1160 - archive_read_support_compression_gzip(arch); \
1161 - archive_read_support_compression_compress(arch);
1162 +#if ARCHIVE_VERSION_NUMBER < 3000000
1163 +#define archive_read_free archive_read_finish
1164 +#define archive_write_free archive_write_finish
1166 +#define archive_read_support_filter_all archive_read_support_compression_all
1167 +#define archive_read_support_filter_bzip2 archive_read_support_compression_bzip2
1168 +#define archive_read_support_filter_compress archive_read_support_compression_compress
1169 +#define archive_read_support_filter_gzip archive_read_support_compression_gzip
1170 +#define archive_read_support_filter_lzip archive_read_support_compression_lzip
1171 +#define archive_read_support_filter_lzma archive_read_support_compression_lzma
1172 +#define archive_read_support_filter_none archive_read_support_compression_none
1173 +#define archive_read_support_filter_program archive_read_support_compression_program
1174 +#define archive_read_support_filter_program_signature archive_read_support_compression_program_signature
1175 +#define archive_read_support_filter_rpm archive_read_support_compression_rpm
1176 +#define archive_read_support_filter_uu archive_read_support_compression_uu
1177 +#define archive_read_support_filter_xz archive_read_support_compression_xz
1179 +#define archive_write_add_filter_bzip2 archive_write_set_compression_bzip2
1180 +#define archive_write_add_filter_compress archive_write_set_compression_compress
1181 +#define archive_write_add_filter_gzip archive_write_set_compression_gzip
1182 +#define archive_write_add_filter_lzip archive_write_set_compression_lzip
1183 +#define archive_write_add_filter_lzma archive_write_set_compression_lzma
1184 +#define archive_write_add_filter_none archive_write_set_compression_none
1185 +#define archive_write_add_filter_program archive_write_set_compression_program
1186 +#define archive_write_add_filter_xz archive_write_set_compression_xz
1189 -#if defined(HAVE_BZ2) && !defined(HAVE_ZLIB)
1190 -#define _php_archive_read_support_compression_all(arch) \
1191 - archive_read_support_compression_bzip2(arch); \
1192 - archive_read_support_compression_compress(arch);
1195 -#if !defined(HAVE_BZ2) && defined(HAVE_ZLIB)
1196 -#define _php_archive_read_support_compression_all(arch) \
1197 - archive_read_support_compression_gzip(arch); \
1198 - archive_read_support_compression_compress(arch);
1201 -#if !defined(HAVE_BZ2) && !defined(HAVE_ZLIB)
1202 -#define _php_archive_read_support_compression_all(arch) \
1203 - archive_read_support_compression_compress(arch);
1204 +#if ZEND_MODULE_API_NO < 20090626
1205 +typedef int zend_error_handling;
1206 +#define zend_replace_error_handling(type, exception, current) php_set_error_handling((type), (exception) TSRMLS_CC)
1207 +#define zend_restore_error_handling(exception) php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC)
1210 PHPAPI zend_class_entry *ce_ArchiveException;
1211 diff --git a/php_archive_entry.h b/php_archive_entry.h
1212 index 88479ed..1bb7914 100644
1213 --- a/php_archive_entry.h
1214 +++ b/php_archive_entry.h
1216 | obtain it through the world-wide-web, please send a note to |
1217 | license@php.net so we can mail you a copy immediately. |
1218 +----------------------------------------------------------------------+
1219 - | Author: Antony Dovgal <antony@zend.com> |
1220 + | Author: Antony Dovgal <tony2001@php.net> |
1221 +----------------------------------------------------------------------+