Lines Matching refs:archive

1183 	if (phar_obj->arc.archive) {
1257 phar_obj->arc.archive = phar_data;
1276 phar_obj->arc.archive->is_data = is_data;
1279 …R_GLOBALS->phar_persist_map, (const char *) phar_obj->arc.archive, sizeof(phar_obj->arc.archive), …
1406 if (!phar_obj->arc.archive) { \
1419 if (phar_obj->arc.archive && phar_obj->arc.archive->is_persistent) {
1420 …AR_GLOBALS->phar_persist_map, (const char *) phar_obj->arc.archive, sizeof(phar_obj->arc.archive));
1744 …if (!(data = phar_get_or_create_entry_data(phar_obj->arc.archive->fname, phar_obj->arc.archive->fn…
1821 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
1835 …ion, 0 TSRMLS_CC, "Unable to instantiate directory iterator for %s", phar_obj->arc.archive->fname);
1861 …ion, 0 TSRMLS_CC, "Unable to instantiate directory iterator for %s", phar_obj->arc.archive->fname);
1883 …ception, 0 TSRMLS_CC, "Unable to instantiate regex iterator for %s", phar_obj->arc.archive->fname);
1904 …ception, 0 TSRMLS_CC, "phar \"%s\" unable to create temporary file", phar_obj->arc.archive->fname);
1908 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
1914 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
1925 phar_obj->arc.archive->ufp = pass.fp;
1926 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
1963 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
1973 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
1974 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
1988 …eption, 0 TSRMLS_CC, "phar \"%s\": unable to create temporary file", phar_obj->arc.archive->fname);
1993 phar_obj->arc.archive->ufp = pass.fp;
1994 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
2016 RETURN_LONG(zend_hash_num_elements(&phar_obj->arc.archive->manifest));
2035 RETURN_BOOL(phar_obj->arc.archive->is_tar);
2037 RETURN_BOOL(phar_obj->arc.archive->is_zip);
2039 RETURN_BOOL(!phar_obj->arc.archive->is_tar && !phar_obj->arc.archive->is_zip);
2465 if (phar_obj->arc.archive->is_tar) {
2467 } else if (phar_obj->arc.archive->is_zip) {
2485 flags = phar_obj->arc.archive->flags & PHAR_FILE_COMPRESSION_MASK;
2526 is_data = phar_obj->arc.archive->is_data;
2527 phar_obj->arc.archive->is_data = 0;
2528 ret = phar_convert_to_other(phar_obj->arc.archive, format, ext, flags TSRMLS_CC);
2529 phar_obj->arc.archive->is_data = is_data;
2562 if (phar_obj->arc.archive->is_tar) {
2564 } else if (phar_obj->arc.archive->is_zip) {
2587 flags = phar_obj->arc.archive->flags & PHAR_FILE_COMPRESSION_MASK;
2628 is_data = phar_obj->arc.archive->is_data;
2629 phar_obj->arc.archive->is_data = 1;
2630 ret = phar_convert_to_other(phar_obj->arc.archive, format, ext, flags TSRMLS_CC);
2631 phar_obj->arc.archive->is_data = is_data;
2653 if (phar_obj->arc.archive->flags & PHAR_FILE_COMPRESSED_GZ) {
2657 if (phar_obj->arc.archive->flags & PHAR_FILE_COMPRESSED_BZ2) {
2677 if (!phar_obj->arc.archive->is_writeable) {
2681 if (SUCCESS != php_stream_stat_path(phar_obj->arc.archive->fname, &ssb)) {
2682 if (phar_obj->arc.archive->is_brandnew) {
2704 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
2714 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
2715 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
2718 if (zend_hash_exists(&phar_obj->arc.archive->manifest, fname, (uint) fname_len)) {
2719 …if (SUCCESS == zend_hash_find(&phar_obj->arc.archive->manifest, fname, (uint) fname_len, (void**)&…
2726 phar_obj->arc.archive->is_modified = 1;
2734 phar_flush(phar_obj->arc.archive, NULL, 0, 0, &error TSRMLS_CC);
2755 if (phar_obj->arc.archive->alias && phar_obj->arc.archive->alias != phar_obj->arc.archive->fname) {
2756 RETURN_STRINGL(phar_obj->arc.archive->alias, phar_obj->arc.archive->alias_len, 1);
2772 RETURN_STRINGL(phar_obj->arc.archive->fname, phar_obj->arc.archive->fname_len, 1);
2788 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
2798 if (phar_obj->arc.archive->is_data) {
2799 if (phar_obj->arc.archive->is_tar) {
2810 …if (alias_len == phar_obj->arc.archive->alias_len && memcmp(phar_obj->arc.archive->alias, alias, a…
2825 "Invalid alias \"%s\" specified for phar \"%s\"", alias, phar_obj->arc.archive->fname);
2829 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
2830 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
2833 …_obj->arc.archive->alias_len && SUCCESS == zend_hash_find(&(PHAR_GLOBALS->phar_alias_map), phar_ob…
2834 …d_hash_del(&(PHAR_GLOBALS->phar_alias_map), phar_obj->arc.archive->alias, phar_obj->arc.archive->a…
2838 oldalias = phar_obj->arc.archive->alias;
2839 oldalias_len = phar_obj->arc.archive->alias_len;
2840 old_temp = phar_obj->arc.archive->is_temporary_alias;
2843 phar_obj->arc.archive->alias = estrndup(alias, alias_len);
2845 phar_obj->arc.archive->alias = NULL;
2848 phar_obj->arc.archive->alias_len = alias_len;
2849 phar_obj->arc.archive->is_temporary_alias = 0;
2850 phar_flush(phar_obj->arc.archive, NULL, 0, 0, &error TSRMLS_CC);
2853 phar_obj->arc.archive->alias = oldalias;
2854 phar_obj->arc.archive->alias_len = oldalias_len;
2855 phar_obj->arc.archive->is_temporary_alias = old_temp;
2858 …GLOBALS->phar_alias_map), oldalias, oldalias_len, (void*)&(phar_obj->arc.archive), sizeof(phar_arc…
2864 …zend_hash_add(&(PHAR_GLOBALS->phar_alias_map), alias, alias_len, (void*)&(phar_obj->arc.archive), …
2888 RETURN_STRING(phar_obj->arc.archive->version, 1);
2903 phar_obj->arc.archive->donotflush = 1;
2918 RETURN_BOOL(phar_obj->arc.archive->donotflush);
2935 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
2941 phar_obj->arc.archive->donotflush = 0;
2942 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
2964 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
2970 if (phar_obj->arc.archive->is_data) {
2971 if (phar_obj->arc.archive->is_tar) {
2988 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
2989 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
2992 phar_flush(phar_obj->arc.archive, (char *) &zstub, len, 0, &error TSRMLS_CC);
3003 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
3004 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3007 phar_flush(phar_obj->arc.archive, stub, stub_len, 0, &error TSRMLS_CC);
3041 if (phar_obj->arc.archive->is_data) {
3042 if (phar_obj->arc.archive->is_tar) {
3056 if (ZEND_NUM_ARGS() > 0 && (phar_obj->arc.archive->is_tar || phar_obj->arc.archive->is_zip)) {
3067 if (!phar_obj->arc.archive->is_tar && !phar_obj->arc.archive->is_zip) {
3082 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
3083 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3086 phar_flush(phar_obj->arc.archive, stub, stub_len, 1, &error TSRMLS_CC);
3116 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3137 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
3138 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3141 phar_obj->arc.archive->sig_flags = algo;
3142 phar_obj->arc.archive->is_modified = 1;
3146 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
3170 if (phar_obj->arc.archive->signature) {
3175 …add_assoc_stringl(return_value, "hash", phar_obj->arc.archive->signature, phar_obj->arc.archive->s…
3176 switch(phar_obj->arc.archive->sig_flags) {
3193 unknown_len = spprintf(&unknown, 0, "Unknown (%u)", phar_obj->arc.archive->sig_flags);
3214 RETURN_BOOL(phar_obj->arc.archive->is_modified);
3293 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3299 if (phar_obj->arc.archive->is_zip) {
3332 if (phar_obj->arc.archive->is_tar) {
3333 ret = phar_convert_to_other(phar_obj->arc.archive, PHAR_FORMAT_TAR, ext, flags TSRMLS_CC);
3335 ret = phar_convert_to_other(phar_obj->arc.archive, PHAR_FORMAT_PHAR, ext, flags TSRMLS_CC);
3360 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3366 if (phar_obj->arc.archive->is_zip) {
3372 if (phar_obj->arc.archive->is_tar) {
3373 …ret = phar_convert_to_other(phar_obj->arc.archive, PHAR_FORMAT_TAR, ext, PHAR_FILE_COMPRESSED_NONE…
3375 …ret = phar_convert_to_other(phar_obj->arc.archive, PHAR_FORMAT_PHAR, ext, PHAR_FILE_COMPRESSED_NON…
3402 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3432 if (phar_obj->arc.archive->is_tar) {
3438 if (!pharobj_cancompress(&phar_obj->arc.archive->manifest TSRMLS_CC)) {
3449 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
3450 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3453 pharobj_set_compression(&phar_obj->arc.archive->manifest, flags TSRMLS_CC);
3454 phar_obj->arc.archive->is_modified = 1;
3455 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
3476 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3482 if (!pharobj_cancompress(&phar_obj->arc.archive->manifest TSRMLS_CC)) {
3488 if (phar_obj->arc.archive->is_tar) {
3491 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
3492 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3495 pharobj_set_compression(&phar_obj->arc.archive->manifest, PHAR_ENT_COMPRESSED_NONE TSRMLS_CC);
3498 phar_obj->arc.archive->is_modified = 1;
3499 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
3526 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3535 …to file \"%s\", cannot copy Phar meta-file in %s", oldfile, newfile, phar_obj->arc.archive->fname);
3542 …file \"%s\", cannot copy to Phar meta-file in %s", oldfile, newfile, phar_obj->arc.archive->fname);
3546 …hash_exists(&phar_obj->arc.archive->manifest, oldfile, (uint) oldfile_len) || SUCCESS != zend_hash…
3548 …copied to file \"%s\", file does not exist in %s", oldfile, newfile, phar_obj->arc.archive->fname);
3552 if (zend_hash_exists(&phar_obj->arc.archive->manifest, newfile, (uint) newfile_len)) {
3553 …if (SUCCESS == zend_hash_find(&phar_obj->arc.archive->manifest, newfile, (uint) newfile_len, (void…
3555 …e \"%s\", file must not already exist in phar %s", oldfile, newfile, phar_obj->arc.archive->fname);
3562 …nnot be copied from \"%s\" in phar %s", newfile, pcr_error, oldfile, phar_obj->arc.archive->fname);
3566 if (phar_obj->arc.archive->is_persistent) {
3567 if (FAILURE == phar_copy_on_write(&(phar_obj->arc.archive) TSRMLS_CC)) {
3568 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3572 zend_hash_find(&phar_obj->arc.archive->manifest, oldfile, (uint) oldfile_len, (void**)&oldentry);
3609 phar_obj->arc.archive->is_modified = 1;
3610 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
3636 if (zend_hash_exists(&phar_obj->arc.archive->manifest, fname, (uint) fname_len)) {
3637 …if (SUCCESS == zend_hash_find(&phar_obj->arc.archive->manifest, fname, (uint) fname_len, (void**)&…
3650 if (zend_hash_exists(&phar_obj->arc.archive->virtual_dirs, fname, (uint) fname_len)) {
3674 …if (!(entry = phar_get_entry_info_dir(phar_obj->arc.archive, fname, fname_len, 1, &error, 0 TSRMLS…
3678 …t get stub \".phar/stub.php\" directly in phar \"%s\", use getStub", phar_obj->arc.archive->fname);
3683 …et alias \".phar/alias.txt\" directly in phar \"%s\", use getAlias", phar_obj->arc.archive->fname);
3688 …directly get any files or directories in magic \".phar\" directory", phar_obj->arc.archive->fname);
3697 fname_len = spprintf(&fname, 0, "phar://%s/%s", phar_obj->arc.archive->fname, fname);
3812 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3823 …t set stub \".phar/stub.php\" directly in phar \"%s\", use setStub", phar_obj->arc.archive->fname);
3828 …et alias \".phar/alias.txt\" directly in phar \"%s\", use setAlias", phar_obj->arc.archive->fname);
3833 … "Cannot set any files or directories in magic \".phar\" directory", phar_obj->arc.archive->fname);
3837 phar_add_file(&(phar_obj->arc.archive), fname, fname_len, cont_str, cont_len, zresource TSRMLS_CC);
3851 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
3860 if (zend_hash_exists(&phar_obj->arc.archive->manifest, fname, (uint) fname_len)) {
3861 …if (SUCCESS == zend_hash_find(&phar_obj->arc.archive->manifest, fname, (uint) fname_len, (void**)&…
3867 if (phar_obj->arc.archive->is_persistent) {
3868 if (FAILURE == phar_copy_on_write(&(phar_obj->arc.archive) TSRMLS_CC)) {
3869 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3873 zend_hash_find(&phar_obj->arc.archive->manifest, fname, (uint) fname_len, (void **)&entry);
3878 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
3912 phar_mkdir(&phar_obj->arc.archive, dirname, dirname_len TSRMLS_CC);
3956 phar_add_file(&(phar_obj->arc.archive), fname, fname_len, NULL, 0, zresource TSRMLS_CC);
3976 …phar_add_file(&(phar_obj->arc.archive), localname, localname_len, cont_str, cont_len, NULL TSRMLS_…
3997 if (phar_obj->arc.archive->is_tar || phar_obj->arc.archive->is_zip) {
3999 …if (SUCCESS == zend_hash_find(&(phar_obj->arc.archive->manifest), ".phar/stub.php", sizeof(".phar/…
4000 …if (phar_obj->arc.archive->fp && !phar_obj->arc.archive->is_brandnew && !(stub->flags & PHAR_ENT_C…
4001 fp = phar_obj->arc.archive->fp;
4003 if (!(fp = php_stream_open_wrapper(phar_obj->arc.archive->fname, "rb", 0, NULL))) {
4004 …lueException, 0 TSRMLS_CC, "phar error: unable to open phar \"%s\"", phar_obj->arc.archive->fname);
4016 …le to read stub of phar \"%s\" (cannot create %s filter)", phar_obj->arc.archive->fname, phar_deco…
4036 len = phar_obj->arc.archive->halt_offset;
4038 if (phar_obj->arc.archive->fp && !phar_obj->arc.archive->is_brandnew) {
4039 fp = phar_obj->arc.archive->fp;
4041 fp = php_stream_open_wrapper(phar_obj->arc.archive->fname, "rb", 0, NULL);
4055 if (fp != phar_obj->arc.archive->fp) {
4069 if (fp != phar_obj->arc.archive->fp) {
4085 RETURN_BOOL(phar_obj->arc.archive->metadata != NULL);
4100 if (phar_obj->arc.archive->metadata) {
4101 if (phar_obj->arc.archive->is_persistent) {
4103 …char *buf = estrndup((char *) phar_obj->arc.archive->metadata, phar_obj->arc.archive->metadata_len…
4105 phar_parse_metadata(&buf, &ret, phar_obj->arc.archive->metadata_len TSRMLS_CC);
4109 RETURN_ZVAL(phar_obj->arc.archive->metadata, 1, 0);
4124 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
4133 …if (phar_obj->arc.archive->is_persistent && FAILURE == phar_copy_on_write(&(phar_obj->arc.archive)…
4134 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
4137 if (phar_obj->arc.archive->metadata) {
4138 zval_ptr_dtor(&phar_obj->arc.archive->metadata);
4139 phar_obj->arc.archive->metadata = NULL;
4142 MAKE_STD_ZVAL(phar_obj->arc.archive->metadata);
4143 ZVAL_ZVAL(phar_obj->arc.archive->metadata, metadata, 1, 0);
4144 phar_obj->arc.archive->is_modified = 1;
4145 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
4163 if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
4168 if (phar_obj->arc.archive->metadata) {
4169 zval_ptr_dtor(&phar_obj->arc.archive->metadata);
4170 phar_obj->arc.archive->metadata = NULL;
4171 phar_obj->arc.archive->is_modified = 1;
4172 phar_flush(phar_obj->arc.archive, 0, 0, 0, &error TSRMLS_CC);
4403 …fp = php_stream_open_wrapper(phar_obj->arc.archive->fname, "rb", IGNORE_URL|STREAM_MUST_SEEK, &act…
4407 "Invalid argument, %s cannot be found", phar_obj->arc.archive->fname);
4475 …if (FAILURE == zend_hash_find(&phar_obj->arc.archive->manifest, Z_STRVAL_PP(zval_file), Z_STRLEN_P…
4477 … non-existent file \"%s\" from phar \"%s\"", Z_STRVAL_PP(zval_file), phar_obj->arc.archive->fname);
4481 "Extraction from phar \"%s\" failed: %s", phar_obj->arc.archive->fname, error);
4494 …if (FAILURE == zend_hash_find(&phar_obj->arc.archive->manifest, filename, filename_len, (void **)&…
4496 …ted to extract non-existent file \"%s\" from phar \"%s\"", filename, phar_obj->arc.archive->fname);
4502 "Extraction from phar \"%s\" failed: %s", phar_obj->arc.archive->fname, error);
4509 phar = phar_obj->arc.archive;
5260 ZEND_ARG_INFO(0, archive)