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()
1198 if (!PHAR_G(has_zlib)) { in phar_parse_pharfile()
1205 if (!PHAR_G(has_bz2)) { in phar_parse_pharfile()
1270 if (NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len))) { in phar_parse_pharfile()
1283 zend_hash_add_ptr(&(PHAR_G(phar_alias_map)), str, mydata); in phar_parse_pharfile()
1294 zend_hash_add_ptr(&(PHAR_G(phar_fname_map)), str, mydata); in phar_parse_pharfile()
1351 if (PHAR_G(readonly) && !(*test)->is_data && ((*test)->is_tar || (*test)->is_zip)) { in phar_open_or_create_filename()
1359 if (!PHAR_G(readonly) || (*test)->is_data) { in phar_open_or_create_filename()
1410 if ((*pphar)->is_data || !PHAR_G(readonly)) { in phar_create_or_parse_filename()
1430 if (PHAR_G(readonly) && !is_data) { in phar_create_or_parse_filename()
1480 zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len, mydata); in phar_create_or_parse_filename()
1491 …if (alias && NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len)… in phar_create_or_parse_filename()
1497 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_create_or_parse_filename()
1512 if (NULL == zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, mydata)) { in phar_create_or_parse_filename()
1519 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len); in phar_create_or_parse_filename()
1671 if (!PHAR_G(has_zlib)) { in phar_open_from_fp()
1732 if (!PHAR_G(has_bz2)) { in phar_open_from_fp()
1817 if (zend_hash_str_exists(&(PHAR_G(phar_fname_map)), realpath, strlen(realpath))) { in phar_analyze_path()
1823 if (PHAR_G(manifest_cached) && zend_hash_str_exists(&cached_phars, realpath, strlen(realpath))) { in phar_analyze_path()
1986 if (zend_hash_str_exists(&(PHAR_G(phar_alias_map)), (char *) filename, pos - filename)) { in phar_detect_phar_fname_ext()
1992 …if (PHAR_G(manifest_cached) && zend_hash_str_exists(&cached_alias, (char *) filename, pos - filena… in phar_detect_phar_fname_ext()
1999 if (zend_hash_num_elements(&(PHAR_G(phar_fname_map))) || PHAR_G(manifest_cached)) { in phar_detect_phar_fname_ext()
2003 …if (NULL != (pphar = zend_hash_str_find_ptr(&(PHAR_G(phar_fname_map)), (char *) filename, filename… in phar_detect_phar_fname_ext()
2023 …if (PHAR_G(manifest_cached) && NULL != (pphar = zend_hash_str_find_ptr(&cached_phars, (char *) fil… in phar_detect_phar_fname_ext()
2030 ZEND_HASH_MAP_FOREACH_STR_KEY_PTR(&PHAR_G(phar_fname_map), str_key, pphar) { in phar_detect_phar_fname_ext()
2042 if (PHAR_G(manifest_cached)) { in phar_detect_phar_fname_ext()
2139 if (PHAR_G(cwd_len) && use_cwd && path_length > 2 && path[0] == '.' && path[1] == '/') { in phar_fix_filepath()
2140 newpath_len = PHAR_G(cwd_len); in phar_fix_filepath()
2142 memcpy(newpath, PHAR_G(cwd), newpath_len); in phar_fix_filepath()
2583 if (PHAR_G(readonly)) { in phar_flush()
3343 php_stream_rewind(PHAR_G(cached_fp)[phar->phar_pos].fp) : in phar_compile_file()
3479 if (PHAR_G(manifest_cached)) { in PHP_MSHUTDOWN_FUNCTION()
3491 if (!PHAR_G(request_init)) in phar_request_initialize()
3493 PHAR_G(last_phar) = NULL; in phar_request_initialize()
3494 PHAR_G(last_phar_name) = PHAR_G(last_alias) = NULL; in phar_request_initialize()
3495 PHAR_G(has_bz2) = zend_hash_str_exists(&module_registry, "bz2", sizeof("bz2")-1); in phar_request_initialize()
3496 PHAR_G(has_zlib) = zend_hash_str_exists(&module_registry, "zlib", sizeof("zlib")-1); in phar_request_initialize()
3497 PHAR_G(request_init) = 1; in phar_request_initialize()
3498 PHAR_G(request_ends) = 0; in phar_request_initialize()
3499 PHAR_G(request_done) = 0; in phar_request_initialize()
3500 zend_hash_init(&(PHAR_G(phar_fname_map)), 5, zend_get_hash_value, destroy_phar_data, 0); in phar_request_initialize()
3501 zend_hash_init(&(PHAR_G(phar_persist_map)), 5, zend_get_hash_value, NULL, 0); in phar_request_initialize()
3502 zend_hash_init(&(PHAR_G(phar_alias_map)), 5, zend_get_hash_value, NULL, 0); in phar_request_initialize()
3504 if (PHAR_G(manifest_cached)) { in phar_request_initialize()
3512 PHAR_G(cached_fp) = stuff; in phar_request_initialize()
3515 PHAR_G(phar_SERVER_mung_list) = 0; in phar_request_initialize()
3516 PHAR_G(cwd) = NULL; in phar_request_initialize()
3517 PHAR_G(cwd_len) = 0; in phar_request_initialize()
3518 PHAR_G(cwd_init) = 0; in phar_request_initialize()
3527 PHAR_G(request_ends) = 1; in PHP_RSHUTDOWN_FUNCTION()
3529 if (PHAR_G(request_init)) in PHP_RSHUTDOWN_FUNCTION()
3532 zend_hash_destroy(&(PHAR_G(phar_alias_map))); in PHP_RSHUTDOWN_FUNCTION()
3533 HT_INVALIDATE(&PHAR_G(phar_alias_map)); in PHP_RSHUTDOWN_FUNCTION()
3534 zend_hash_destroy(&(PHAR_G(phar_fname_map))); in PHP_RSHUTDOWN_FUNCTION()
3535 HT_INVALIDATE(&PHAR_G(phar_fname_map)); in PHP_RSHUTDOWN_FUNCTION()
3536 zend_hash_destroy(&(PHAR_G(phar_persist_map))); in PHP_RSHUTDOWN_FUNCTION()
3537 HT_INVALIDATE(&PHAR_G(phar_persist_map)); in PHP_RSHUTDOWN_FUNCTION()
3538 PHAR_G(phar_SERVER_mung_list) = 0; in PHP_RSHUTDOWN_FUNCTION()
3540 if (PHAR_G(cached_fp)) { in PHP_RSHUTDOWN_FUNCTION()
3542 if (PHAR_G(cached_fp)[i].fp) { in PHP_RSHUTDOWN_FUNCTION()
3543 php_stream_close(PHAR_G(cached_fp)[i].fp); in PHP_RSHUTDOWN_FUNCTION()
3545 if (PHAR_G(cached_fp)[i].ufp) { in PHP_RSHUTDOWN_FUNCTION()
3546 php_stream_close(PHAR_G(cached_fp)[i].ufp); in PHP_RSHUTDOWN_FUNCTION()
3548 efree(PHAR_G(cached_fp)[i].manifest); in PHP_RSHUTDOWN_FUNCTION()
3550 efree(PHAR_G(cached_fp)); in PHP_RSHUTDOWN_FUNCTION()
3551 PHAR_G(cached_fp) = 0; in PHP_RSHUTDOWN_FUNCTION()
3554 PHAR_G(request_init) = 0; in PHP_RSHUTDOWN_FUNCTION()
3556 if (PHAR_G(cwd)) { in PHP_RSHUTDOWN_FUNCTION()
3557 efree(PHAR_G(cwd)); in PHP_RSHUTDOWN_FUNCTION()
3560 PHAR_G(cwd) = NULL; in PHP_RSHUTDOWN_FUNCTION()
3561 PHAR_G(cwd_len) = 0; in PHP_RSHUTDOWN_FUNCTION()
3562 PHAR_G(cwd_init) = 0; in PHP_RSHUTDOWN_FUNCTION()
3565 PHAR_G(request_done) = 1; in PHP_RSHUTDOWN_FUNCTION()
3580 if (PHAR_G(has_zlib)) { in PHP_MINFO_FUNCTION()
3586 if (PHAR_G(has_bz2)) { in PHP_MINFO_FUNCTION()