Lines Matching refs:PHAR_G
53 old = PHAR_G(readonly_orig); in ZEND_INI_MH()
55 old = PHAR_G(require_hash_orig); in ZEND_INI_MH()
63 PHAR_G(readonly_orig) = ini; in ZEND_INI_MH()
65 PHAR_G(require_hash_orig) = ini; in ZEND_INI_MH()
72 PHAR_G(readonly) = ini; in ZEND_INI_MH()
73 if (PHAR_G(request_init) && HT_IS_INITIALIZED(&PHAR_G(phar_fname_map))) { in ZEND_INI_MH()
74 zend_hash_apply_with_argument(&(PHAR_G(phar_fname_map)), phar_set_writeable_bit, (void *)&ini); in ZEND_INI_MH()
77 PHAR_G(require_hash) = ini; in ZEND_INI_MH()
96 if (!PHAR_G(cache_list) || !(PHAR_G(cache_list)[0])) { in phar_split_cache_list()
102 tmp = estrdup(PHAR_G(cache_list)); in phar_split_cache_list()
105 PHAR_G(request_init) = 1; in phar_split_cache_list()
109 PHAR_G(has_bz2) = zend_hash_str_exists(&module_registry, "bz2", sizeof("bz2")-1); in phar_split_cache_list()
110 PHAR_G(has_zlib) = zend_hash_str_exists(&module_registry, "zlib", sizeof("zlib")-1); in phar_split_cache_list()
115 …zend_hash_init(&(PHAR_G(phar_fname_map)), sizeof(phar_archive_data*), zend_get_hash_value, destroy… in phar_split_cache_list()
116 …zend_hash_init(&(PHAR_G(phar_alias_map)), sizeof(phar_archive_data*), zend_get_hash_value, NULL, 1… in phar_split_cache_list()
117 PHAR_G(manifest_cached) = 1; in phar_split_cache_list()
118 PHAR_G(persist) = 1; in phar_split_cache_list()
136 PHAR_G(persist) = 0; in phar_split_cache_list()
137 PHAR_G(manifest_cached) = 0; in phar_split_cache_list()
139 zend_hash_destroy(&(PHAR_G(phar_fname_map))); in phar_split_cache_list()
140 HT_INVALIDATE(&PHAR_G(phar_fname_map)); in phar_split_cache_list()
141 zend_hash_destroy(&(PHAR_G(phar_alias_map))); in phar_split_cache_list()
142 HT_INVALIDATE(&PHAR_G(phar_alias_map)); in phar_split_cache_list()
148 PHAR_G(request_init) = 0; in phar_split_cache_list()
153 PHAR_G(persist) = 0; in phar_split_cache_list()
154 PHAR_G(request_init) = 0; in phar_split_cache_list()
158 cached_phars = PHAR_G(phar_fname_map); in phar_split_cache_list()
159 cached_alias = PHAR_G(phar_alias_map); in phar_split_cache_list()
160 HT_INVALIDATE(&PHAR_G(phar_fname_map)); in phar_split_cache_list()
161 HT_INVALIDATE(&PHAR_G(phar_alias_map)); in phar_split_cache_list()
170 PHAR_G(cache_list) = ZSTR_VAL(new_value); in ZEND_INI_MH()
248 if (PHAR_G(request_done) in phar_archive_delref()
249 || zend_hash_str_del(&(PHAR_G(phar_fname_map)), phar->fname, phar->fname_len) != SUCCESS) { in phar_archive_delref()
255 PHAR_G(last_phar) = NULL; in phar_archive_delref()
256 PHAR_G(last_phar_name) = PHAR_G(last_alias) = NULL; in phar_archive_delref()
272 if (zend_hash_str_del(&(PHAR_G(phar_fname_map)), phar->fname, phar->fname_len) != SUCCESS) { in phar_archive_delref()
331 if (PHAR_G(request_ends)) { in destroy_phar_data()
339 zend_hash_apply_with_argument(&(PHAR_G(phar_alias_map)), phar_unalias_apply, phar_data); in destroy_phar_data()
454 pefree(signature, PHAR_G(persist));\
527 …if (PHAR_G(readonly) && NULL == (stub = zend_hash_str_find_ptr(&(phar->manifest), ".phar/stub.php"… in phar_open_parsed_phar()
1028 } else if (PHAR_G(require_hash)) { in phar_parse_pharfile()
1091 mydata = pecalloc(1, sizeof(phar_archive_data), PHAR_G(persist)); in phar_parse_pharfile()
1092 mydata->is_persistent = PHAR_G(persist); in phar_parse_pharfile()
1195 if (!PHAR_G(has_zlib)) { in phar_parse_pharfile()
1202 if (!PHAR_G(has_bz2)) { in phar_parse_pharfile()
1267 if (NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len))) { in phar_parse_pharfile()
1280 zend_hash_add_ptr(&(PHAR_G(phar_alias_map)), str, mydata); in phar_parse_pharfile()
1291 zend_hash_add_ptr(&(PHAR_G(phar_fname_map)), str, mydata); in phar_parse_pharfile()
1348 if (PHAR_G(readonly) && !(*test)->is_data && ((*test)->is_tar || (*test)->is_zip)) { in phar_open_or_create_filename()
1356 if (!PHAR_G(readonly) || (*test)->is_data) { in phar_open_or_create_filename()
1407 if ((*pphar)->is_data || !PHAR_G(readonly)) { in phar_create_or_parse_filename()
1427 if (PHAR_G(readonly) && !is_data) { in phar_create_or_parse_filename()
1477 zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len, mydata); in phar_create_or_parse_filename()
1488 …if (alias && NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len)… in phar_create_or_parse_filename()
1494 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_create_or_parse_filename()
1509 if (NULL == zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, mydata)) { in phar_create_or_parse_filename()
1516 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_create_or_parse_filename()
1668 if (!PHAR_G(has_zlib)) { in phar_open_from_fp()
1729 if (!PHAR_G(has_bz2)) { in phar_open_from_fp()
1814 if (zend_hash_str_exists(&(PHAR_G(phar_fname_map)), realpath, strlen(realpath))) { in phar_analyze_path()
1820 if (PHAR_G(manifest_cached) && zend_hash_str_exists(&cached_phars, realpath, strlen(realpath))) { in phar_analyze_path()
1983 if (zend_hash_str_exists(&(PHAR_G(phar_alias_map)), (char *) filename, pos - filename)) { in phar_detect_phar_fname_ext()
1989 …if (PHAR_G(manifest_cached) && zend_hash_str_exists(&cached_alias, (char *) filename, pos - filena… in phar_detect_phar_fname_ext()
1996 if (zend_hash_num_elements(&(PHAR_G(phar_fname_map))) || PHAR_G(manifest_cached)) { in phar_detect_phar_fname_ext()
2000 …if (NULL != (pphar = zend_hash_str_find_ptr(&(PHAR_G(phar_fname_map)), (char *) filename, filename… in phar_detect_phar_fname_ext()
2020 …if (PHAR_G(manifest_cached) && NULL != (pphar = zend_hash_str_find_ptr(&cached_phars, (char *) fil… in phar_detect_phar_fname_ext()
2027 ZEND_HASH_FOREACH_STR_KEY_PTR(&PHAR_G(phar_fname_map), str_key, pphar) { in phar_detect_phar_fname_ext()
2039 if (PHAR_G(manifest_cached)) { in phar_detect_phar_fname_ext()
2136 if (PHAR_G(cwd_len) && use_cwd && path_length > 2 && path[0] == '.' && path[1] == '/') { in phar_fix_filepath()
2137 newpath_len = PHAR_G(cwd_len); in phar_fix_filepath()
2139 memcpy(newpath, PHAR_G(cwd), newpath_len); in phar_fix_filepath()
2587 if (PHAR_G(readonly)) { in phar_flush()
3351 php_stream_rewind(PHAR_G(cached_fp)[phar->phar_pos].fp) : in phar_compile_file()
3487 if (PHAR_G(manifest_cached)) { in PHP_MSHUTDOWN_FUNCTION()
3499 if (!PHAR_G(request_init)) in phar_request_initialize()
3501 PHAR_G(last_phar) = NULL; in phar_request_initialize()
3502 PHAR_G(last_phar_name) = PHAR_G(last_alias) = NULL; in phar_request_initialize()
3503 PHAR_G(has_bz2) = zend_hash_str_exists(&module_registry, "bz2", sizeof("bz2")-1); in phar_request_initialize()
3504 PHAR_G(has_zlib) = zend_hash_str_exists(&module_registry, "zlib", sizeof("zlib")-1); in phar_request_initialize()
3505 PHAR_G(request_init) = 1; in phar_request_initialize()
3506 PHAR_G(request_ends) = 0; in phar_request_initialize()
3507 PHAR_G(request_done) = 0; in phar_request_initialize()
3508 zend_hash_init(&(PHAR_G(phar_fname_map)), 5, zend_get_hash_value, destroy_phar_data, 0); in phar_request_initialize()
3509 zend_hash_init(&(PHAR_G(phar_persist_map)), 5, zend_get_hash_value, NULL, 0); in phar_request_initialize()
3510 zend_hash_init(&(PHAR_G(phar_alias_map)), 5, zend_get_hash_value, NULL, 0); in phar_request_initialize()
3512 if (PHAR_G(manifest_cached)) { in phar_request_initialize()
3520 PHAR_G(cached_fp) = stuff; in phar_request_initialize()
3523 PHAR_G(phar_SERVER_mung_list) = 0; in phar_request_initialize()
3524 PHAR_G(cwd) = NULL; in phar_request_initialize()
3525 PHAR_G(cwd_len) = 0; in phar_request_initialize()
3526 PHAR_G(cwd_init) = 0; in phar_request_initialize()
3535 PHAR_G(request_ends) = 1; in PHP_RSHUTDOWN_FUNCTION()
3537 if (PHAR_G(request_init)) in PHP_RSHUTDOWN_FUNCTION()
3540 zend_hash_destroy(&(PHAR_G(phar_alias_map))); in PHP_RSHUTDOWN_FUNCTION()
3541 HT_INVALIDATE(&PHAR_G(phar_alias_map)); in PHP_RSHUTDOWN_FUNCTION()
3542 zend_hash_destroy(&(PHAR_G(phar_fname_map))); in PHP_RSHUTDOWN_FUNCTION()
3543 HT_INVALIDATE(&PHAR_G(phar_fname_map)); in PHP_RSHUTDOWN_FUNCTION()
3544 zend_hash_destroy(&(PHAR_G(phar_persist_map))); in PHP_RSHUTDOWN_FUNCTION()
3545 HT_INVALIDATE(&PHAR_G(phar_persist_map)); in PHP_RSHUTDOWN_FUNCTION()
3546 PHAR_G(phar_SERVER_mung_list) = 0; in PHP_RSHUTDOWN_FUNCTION()
3548 if (PHAR_G(cached_fp)) { in PHP_RSHUTDOWN_FUNCTION()
3550 if (PHAR_G(cached_fp)[i].fp) { in PHP_RSHUTDOWN_FUNCTION()
3551 php_stream_close(PHAR_G(cached_fp)[i].fp); in PHP_RSHUTDOWN_FUNCTION()
3553 if (PHAR_G(cached_fp)[i].ufp) { in PHP_RSHUTDOWN_FUNCTION()
3554 php_stream_close(PHAR_G(cached_fp)[i].ufp); in PHP_RSHUTDOWN_FUNCTION()
3556 efree(PHAR_G(cached_fp)[i].manifest); in PHP_RSHUTDOWN_FUNCTION()
3558 efree(PHAR_G(cached_fp)); in PHP_RSHUTDOWN_FUNCTION()
3559 PHAR_G(cached_fp) = 0; in PHP_RSHUTDOWN_FUNCTION()
3562 PHAR_G(request_init) = 0; in PHP_RSHUTDOWN_FUNCTION()
3564 if (PHAR_G(cwd)) { in PHP_RSHUTDOWN_FUNCTION()
3565 efree(PHAR_G(cwd)); in PHP_RSHUTDOWN_FUNCTION()
3568 PHAR_G(cwd) = NULL; in PHP_RSHUTDOWN_FUNCTION()
3569 PHAR_G(cwd_len) = 0; in PHP_RSHUTDOWN_FUNCTION()
3570 PHAR_G(cwd_init) = 0; in PHP_RSHUTDOWN_FUNCTION()
3573 PHAR_G(request_done) = 1; in PHP_RSHUTDOWN_FUNCTION()
3588 if (PHAR_G(has_zlib)) { in PHP_MINFO_FUNCTION()
3594 if (PHAR_G(has_bz2)) { in PHP_MINFO_FUNCTION()