Lines Matching refs:entry
55 if (entry->name_length == 14) { in ZEND_INI_MH()
76 if (entry->name_length == 14) { in ZEND_INI_MH()
85 if (entry->name_length == 14) { in ZEND_INI_MH()
340 phar_entry_info *entry = (phar_entry_info *) pDest; in phar_tmpclose_apply() local
342 if (entry->fp_type != PHAR_TMP) { in phar_tmpclose_apply()
346 if (entry->fp && !entry->fp_refcount) { in phar_tmpclose_apply()
347 php_stream_close(entry->fp); in phar_tmpclose_apply()
348 entry->fp = NULL; in phar_tmpclose_apply()
384 phar_entry_info *entry = (phar_entry_info *)pDest; in destroy_phar_manifest_entry() local
387 if (entry->cfp) { in destroy_phar_manifest_entry()
388 php_stream_close(entry->cfp); in destroy_phar_manifest_entry()
389 entry->cfp = 0; in destroy_phar_manifest_entry()
392 if (entry->fp) { in destroy_phar_manifest_entry()
393 php_stream_close(entry->fp); in destroy_phar_manifest_entry()
394 entry->fp = 0; in destroy_phar_manifest_entry()
397 if (entry->metadata) { in destroy_phar_manifest_entry()
398 if (entry->is_persistent) { in destroy_phar_manifest_entry()
399 if (entry->metadata_len) { in destroy_phar_manifest_entry()
401 free(entry->metadata); in destroy_phar_manifest_entry()
403 zval_internal_ptr_dtor(&entry->metadata); in destroy_phar_manifest_entry()
406 zval_ptr_dtor(&entry->metadata); in destroy_phar_manifest_entry()
408 entry->metadata_len = 0; in destroy_phar_manifest_entry()
409 entry->metadata = 0; in destroy_phar_manifest_entry()
412 if (entry->metadata_str.c) { in destroy_phar_manifest_entry()
413 smart_str_free(&entry->metadata_str); in destroy_phar_manifest_entry()
414 entry->metadata_str.c = 0; in destroy_phar_manifest_entry()
417 pefree(entry->filename, entry->is_persistent); in destroy_phar_manifest_entry()
419 if (entry->link) { in destroy_phar_manifest_entry()
420 pefree(entry->link, entry->is_persistent); in destroy_phar_manifest_entry()
421 entry->link = 0; in destroy_phar_manifest_entry()
424 if (entry->tmp) { in destroy_phar_manifest_entry()
425 pefree(entry->tmp, entry->is_persistent); in destroy_phar_manifest_entry()
426 entry->tmp = 0; in destroy_phar_manifest_entry()
655 phar_entry_info entry; local
1053 memset(&entry, 0, sizeof(phar_entry_info));
1054 entry.phar = mydata;
1055 entry.fp_type = PHAR_FP;
1056 entry.is_persistent = mydata->is_persistent;
1063 PHAR_GET_32(buffer, entry.filename_len);
1065 if (entry.filename_len == 0) {
1069 if (entry.is_persistent) {
1070 entry.manifest_pos = manifest_index;
1073 if (entry.filename_len + 20 > endbuffer - buffer) {
1077 …if ((manifest_ver & PHAR_API_VER_MASK) >= PHAR_API_MIN_DIR && buffer[entry.filename_len - 1] == '/…
1078 entry.is_dir = 1;
1080 entry.is_dir = 0;
1083 phar_add_virtual_dirs(mydata, buffer, entry.filename_len TSRMLS_CC);
1084 entry.filename = pestrndup(buffer, entry.filename_len, entry.is_persistent);
1085 buffer += entry.filename_len;
1086 PHAR_GET_32(buffer, entry.uncompressed_filesize);
1087 PHAR_GET_32(buffer, entry.timestamp);
1090 mydata->min_timestamp = entry.timestamp;
1091 mydata->max_timestamp = entry.timestamp;
1093 if (mydata->min_timestamp > entry.timestamp) {
1094 mydata->min_timestamp = entry.timestamp;
1095 } else if (mydata->max_timestamp < entry.timestamp) {
1096 mydata->max_timestamp = entry.timestamp;
1100 PHAR_GET_32(buffer, entry.compressed_filesize);
1101 PHAR_GET_32(buffer, entry.crc32);
1102 PHAR_GET_32(buffer, entry.flags);
1104 if (entry.is_dir) {
1105 entry.filename_len--;
1106 entry.flags |= PHAR_ENT_PERM_DEF_DIR;
1110 if (entry.is_persistent) {
1111 entry.metadata_len = len;
1113 entry.metadata_len = 0;
1116 pefree(entry.filename, entry.is_persistent);
1119 if (phar_parse_metadata(&buffer, &entry.metadata, len TSRMLS_CC) == FAILURE) {
1120 pefree(entry.filename, entry.is_persistent);
1125 entry.offset = entry.offset_abs = offset;
1126 offset += entry.compressed_filesize;
1128 switch (entry.flags & PHAR_ENT_COMPRESSION_MASK) {
1131 if (entry.metadata) {
1132 if (entry.is_persistent) {
1133 free(entry.metadata);
1135 zval_ptr_dtor(&entry.metadata);
1138 pefree(entry.filename, entry.is_persistent);
1144 if (entry.metadata) {
1145 if (entry.is_persistent) {
1146 free(entry.metadata);
1148 zval_ptr_dtor(&entry.metadata);
1151 pefree(entry.filename, entry.is_persistent);
1156 if (entry.uncompressed_filesize != entry.compressed_filesize) {
1157 if (entry.metadata) {
1158 if (entry.is_persistent) {
1159 free(entry.metadata);
1161 zval_ptr_dtor(&entry.metadata);
1164 pefree(entry.filename, entry.is_persistent);
1170 manifest_flags |= (entry.flags & PHAR_ENT_COMPRESSION_MASK);
1172 entry.is_crc_checked = (manifest_flags & PHAR_HDR_SIGNATURE ? 1 : 0);
1173 phar_set_inode(&entry TSRMLS_CC);
1174 …zend_hash_add(&mydata->manifest, entry.filename, entry.filename_len, (void*)&entry, sizeof(phar_en…
2257 int phar_split_fname(char *filename, int filename_len, char **arch, int *arch_len, char **entry, in… argument
2304 *entry = estrndup(ext_str+ext_len, *entry_len);
2306 phar_unixify_path_separators(*entry, *entry_len);
2308 *entry = phar_fix_filepath(*entry, entry_len, 0 TSRMLS_CC);
2311 *entry = estrndup("/", 1);
2410 phar_entry_info *entry = idata->internal_file; local
2416 if (entry->is_zip && process_zip > 0) {
2422 … archive \"%s\" to verify local file header for file \"%s\"", idata->phar->fname, entry->filename);
2425 …php_stream_seek(phar_get_entrypfp(idata->internal_file TSRMLS_CC), entry->header_offset, SEEK_SET);
2429 …phar \"%s\" (cannot read local file header for file \"%s\")", idata->phar->fname, entry->filename);
2436 entry->header_offset + sizeof(local) +
2439 entry->compressed_filesize, SEEK_SET);
2442 … \"%s\" (cannot read local data descriptor for file \"%s\")", idata->phar->fname, entry->filename);
2453 …entry->filename_len != PHAR_ZIP_16(local.filename_len) || entry->crc32 != PHAR_ZIP_32(local.crc32)…
2454 …cal header of file \"%s\" does not match central directory)", idata->phar->fname, entry->filename);
2459 entry->offset = entry->offset_abs =
2460 …sizeof(local) + entry->header_offset + PHAR_ZIP_16(local.filename_len) + PHAR_ZIP_16(local.extra_l…
2462 if (idata->zero && idata->zero != entry->offset_abs) {
2463 idata->zero = entry->offset_abs;
2480 entry->is_crc_checked = 1;
2483 …l corruption of phar \"%s\" (crc32 mismatch on file \"%s\")", idata->phar->fname, entry->filename);
2503 phar_entry_info *entry = (phar_entry_info *)data; local
2505 if (entry->fp_refcount <= 0 && entry->is_deleted) {
2571 phar_entry_info *entry, *newentry; local
2759 if (zend_hash_get_current_data(&phar->manifest, (void **)&entry) == FAILURE) {
2762 if (entry->cfp) {
2764 php_stream_close(entry->cfp);
2765 entry->cfp = 0;
2767 if (entry->is_deleted || entry->is_mounted) {
2771 if (!entry->is_modified && entry->fp_refcount) {
2773 switch (entry->fp_type) {
2785 phar_add_virtual_dirs(phar, entry->filename, entry->filename_len TSRMLS_CC);
2787 if (entry->is_dir) {
2791 if (entry->metadata) {
2792 if (entry->metadata_str.c) {
2793 smart_str_free(&entry->metadata_str);
2795 entry->metadata_str.c = 0;
2796 entry->metadata_str.len = 0;
2798 php_var_serialize(&entry->metadata_str, &entry->metadata, &metadata_hash TSRMLS_CC);
2801 if (entry->metadata_str.c) {
2802 smart_str_free(&entry->metadata_str);
2804 entry->metadata_str.c = 0;
2805 entry->metadata_str.len = 0;
2809 …offset += 4 + entry->filename_len + sizeof(entry_buffer) + entry->metadata_str.len + (entry->is_di…
2812 if ((oldfile && !entry->is_modified) || entry->is_dir) {
2813 if (entry->fp_type == PHAR_UFP) {
2815 entry->fp_type = PHAR_FP;
2819 if (!phar_get_efp(entry, 0 TSRMLS_CC)) {
2821 newentry = phar_open_jit(phar, entry, error TSRMLS_CC);
2828 entry = newentry;
2830 file = phar_get_efp(entry, 0 TSRMLS_CC);
2831 if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 1 TSRMLS_CC)) {
2837 … "unable to seek to start of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->f…
2842 mytime = entry->uncompressed_filesize;
2846 entry->crc32 = ~newcrc32;
2847 entry->is_crc_checked = 1;
2848 if (!(entry->flags & PHAR_ENT_COMPRESSION_MASK)) {
2850 entry->compressed_filesize = entry->uncompressed_filesize;
2853 filter = php_stream_filter_create(phar_compress_filter(entry, 0), NULL, 0 TSRMLS_CC);
2859 if (entry->flags & PHAR_ENT_COMPRESSED_GZ) {
2861 …spprintf(error, 0, "unable to gzip compress file \"%s\" to new phar \"%s\"", entry->filename, phar…
2865 …spprintf(error, 0, "unable to bzip2 compress file \"%s\" to new phar \"%s\"", entry->filename, pha…
2874 entry->cfp = php_stream_fopen_tmpfile();
2875 if (!entry->cfp) {
2886 if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 0 TSRMLS_CC)) {
2892 … "unable to seek to start of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->f…
2896 php_stream_filter_append((&entry->cfp->writefilters), filter);
2897 if (SUCCESS != phar_stream_copy_to_stream(file, entry->cfp, entry->uncompressed_filesize, NULL)) {
2903 … compressed file contents of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->f…
2908 php_stream_flush(entry->cfp);
2910 php_stream_seek(entry->cfp, 0, SEEK_END);
2911 entry->compressed_filesize = (php_uint32) php_stream_tell(entry->cfp);
2913 php_stream_rewind(entry->cfp);
2914 entry->old_flags = entry->flags;
2915 entry->is_modified = 1;
2916 global_flags |= (entry->flags & PHAR_ENT_COMPRESSION_MASK);
3002 if (zend_hash_get_current_data(&phar->manifest, (void **)&entry) == FAILURE) {
3006 if (entry->is_deleted || entry->is_mounted) {
3011 if (entry->is_dir) {
3013 phar_set_32(entry_buffer, entry->filename_len + 1);
3015 phar_set_32(entry_buffer, entry->filename_len);
3019 || entry->filename_len != php_stream_write(newfile, entry->filename, entry->filename_len)
3020 || (entry->is_dir && 1 != php_stream_write(newfile, "/", 1))) {
3026 if (entry->is_dir) {
3027 …le to write filename of directory \"%s\" to manifest of new phar \"%s\"", entry->filename, phar->f…
3029 …"unable to write filename of file \"%s\" to manifest of new phar \"%s\"", entry->filename, phar->f…
3045 phar_set_32(entry_buffer, entry->uncompressed_filesize);
3047 phar_set_32(entry_buffer+8, entry->compressed_filesize);
3048 phar_set_32(entry_buffer+12, entry->crc32);
3049 phar_set_32(entry_buffer+16, entry->flags);
3050 phar_set_32(entry_buffer+20, entry->metadata_str.len);
3053 …|| entry->metadata_str.len != php_stream_write(newfile, entry->metadata_str.c, entry->metadata_str…
3061 … write temporary manifest of file \"%s\" to manifest of new phar \"%s\"", entry->filename, phar->f…
3090 if (zend_hash_get_current_data(&phar->manifest, (void **)&entry) == FAILURE) {
3094 if (entry->is_deleted || entry->is_dir || entry->is_mounted) {
3098 if (entry->cfp) {
3099 file = entry->cfp;
3102 file = phar_get_efp(entry, 0 TSRMLS_CC);
3103 if (-1 == phar_seek_efp(entry, 0, SEEK_SET, 0, 0 TSRMLS_CC)) {
3109 … "unable to seek to start of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->f…
3121 … "unable to seek to start of file \"%s\" while creating new phar \"%s\"", entry->filename, phar->f…
3127 entry->offset = entry->offset_abs = offset;
3128 offset += entry->compressed_filesize;
3129 if (phar_stream_copy_to_stream(file, newfile, entry->compressed_filesize, &wrote) == FAILURE) {
3137 …spprintf(error, 0, "unable to write contents of file \"%s\" to new phar \"%s\"", entry->filename, …
3143 entry->is_modified = 0;
3145 if (entry->cfp) {
3146 php_stream_close(entry->cfp);
3147 entry->cfp = NULL;
3150 if (entry->fp_type == PHAR_MOD) {
3152 if (entry->fp_refcount == 0 && entry->fp != phar->fp && entry->fp != phar->ufp) {
3153 php_stream_close(entry->fp);
3156 entry->fp = NULL;
3157 entry->fp_type = PHAR_FP;
3158 } else if (entry->fp_type == PHAR_UFP) {
3159 entry->fp_type = PHAR_FP;
3183 …ite contents of file \"%s\" to new phar \"%s\" with requested hash type", entry->filename, phar->f…
3435 char *arch, *entry; local
3439 entry = (char *) filename;
3440 if (!IS_ABSOLUTE_PATH(entry, strlen(entry)) && !strstr(entry, "://")) {
3449 …if (SUCCESS == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, 1, 0 TSRML…
3455 efree(entry);
3460 if (!(entry = phar_find_in_include_path((char *) filename, strlen(filename), NULL TSRMLS_CC))) {
3465 if (SUCCESS == phar_orig_zend_open(entry, handle TSRMLS_CC)) {
3467 handle->opened_path = entry;
3469 if (entry != filename) {
3475 if (entry != filename) {
3476 efree(entry);