Lines Matching refs:PHAR_G
54 old = PHAR_G(readonly_orig); in ZEND_INI_MH()
56 old = PHAR_G(require_hash_orig); in ZEND_INI_MH()
75 PHAR_G(readonly_orig) = ini; in ZEND_INI_MH()
77 PHAR_G(require_hash_orig) = ini; in ZEND_INI_MH()
84 PHAR_G(readonly) = ini; in ZEND_INI_MH()
85 if (PHAR_G(request_init) && PHAR_G(phar_fname_map.u.flags)) { in ZEND_INI_MH()
86 zend_hash_apply_with_argument(&(PHAR_G(phar_fname_map)), phar_set_writeable_bit, (void *)&ini); in ZEND_INI_MH()
89 PHAR_G(require_hash) = ini; in ZEND_INI_MH()
108 if (!PHAR_G(cache_list) || !(PHAR_G(cache_list)[0])) { in phar_split_cache_list()
114 tmp = estrdup(PHAR_G(cache_list)); in phar_split_cache_list()
117 PHAR_G(request_init) = 1; in phar_split_cache_list()
121 PHAR_G(has_bz2) = zend_hash_str_exists(&module_registry, "bz2", sizeof("bz2")-1); in phar_split_cache_list()
122 PHAR_G(has_zlib) = zend_hash_str_exists(&module_registry, "zlib", sizeof("zlib")-1); in phar_split_cache_list()
127 …zend_hash_init(&(PHAR_G(phar_fname_map)), sizeof(phar_archive_data*), zend_get_hash_value, destroy… in phar_split_cache_list()
128 …zend_hash_init(&(PHAR_G(phar_alias_map)), sizeof(phar_archive_data*), zend_get_hash_value, NULL, 1… in phar_split_cache_list()
129 PHAR_G(manifest_cached) = 1; in phar_split_cache_list()
130 PHAR_G(persist) = 1; in phar_split_cache_list()
145 PHAR_G(persist) = 0; in phar_split_cache_list()
146 PHAR_G(manifest_cached) = 0; in phar_split_cache_list()
148 zend_hash_destroy(&(PHAR_G(phar_fname_map))); in phar_split_cache_list()
149 PHAR_G(phar_fname_map.u.flags) = 0; in phar_split_cache_list()
150 zend_hash_destroy(&(PHAR_G(phar_alias_map))); in phar_split_cache_list()
151 PHAR_G(phar_alias_map.u.flags) = 0; in phar_split_cache_list()
157 PHAR_G(request_init) = 0; in phar_split_cache_list()
169 PHAR_G(persist) = 0; in phar_split_cache_list()
170 PHAR_G(request_init) = 0; in phar_split_cache_list()
174 cached_phars = PHAR_G(phar_fname_map); in phar_split_cache_list()
175 cached_alias = PHAR_G(phar_alias_map); in phar_split_cache_list()
176 PHAR_G(phar_fname_map.u.flags) = 0; in phar_split_cache_list()
177 PHAR_G(phar_alias_map.u.flags) = 0; in phar_split_cache_list()
186 PHAR_G(cache_list) = ZSTR_VAL(new_value); in ZEND_INI_MH()
277 if (PHAR_G(request_done) in phar_archive_delref()
278 || zend_hash_str_del(&(PHAR_G(phar_fname_map)), phar->fname, phar->fname_len) != SUCCESS) { in phar_archive_delref()
284 PHAR_G(last_phar) = NULL; in phar_archive_delref()
285 PHAR_G(last_phar_name) = PHAR_G(last_alias) = NULL; in phar_archive_delref()
301 if (zend_hash_str_del(&(PHAR_G(phar_fname_map)), phar->fname, phar->fname_len) != SUCCESS) { in phar_archive_delref()
360 if (PHAR_G(request_ends)) { in destroy_phar_data()
368 zend_hash_apply_with_argument(&(PHAR_G(phar_alias_map)), phar_unalias_apply, phar_data); in destroy_phar_data()
501 pefree(signature, PHAR_G(persist));\
570 …if (PHAR_G(readonly) && NULL == (stub = zend_hash_str_find_ptr(&(phar->manifest), ".phar/stub.php"…
630 if (PHAR_G(persist)) {
971 } else if (PHAR_G(require_hash)) {
1034 mydata = pecalloc(1, sizeof(phar_archive_data), PHAR_G(persist));
1035 mydata->is_persistent = PHAR_G(persist);
1144 if (!PHAR_G(has_zlib)) {
1157 if (!PHAR_G(has_bz2)) {
1228 if (NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len))) {
1236 zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, mydata);
1241 zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len, mydata);
1297 if (PHAR_G(readonly) && !(*test)->is_data && ((*test)->is_tar || (*test)->is_zip)) {
1305 if (!PHAR_G(readonly) || (*test)->is_data) {
1356 if ((*pphar)->is_data || !PHAR_G(readonly)) {
1376 if (PHAR_G(readonly) && !is_data) {
1426 zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len, mydata);
1437 …if (alias && NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len)…
1443 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len);
1458 if (NULL == zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, mydata)) {
1465 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len);
1616 if (!PHAR_G(has_zlib)) {
1673 if (!PHAR_G(has_bz2)) {
1754 if (zend_hash_str_exists(&(PHAR_G(phar_fname_map)), realpath, strlen(realpath))) {
1760 if (PHAR_G(manifest_cached) && zend_hash_str_exists(&cached_phars, realpath, strlen(realpath))) {
1923 if (zend_hash_str_exists(&(PHAR_G(phar_alias_map)), (char *) filename, pos - filename)) {
1929 …if (PHAR_G(manifest_cached) && zend_hash_str_exists(&cached_alias, (char *) filename, pos - filena…
1936 if (zend_hash_num_elements(&(PHAR_G(phar_fname_map))) || PHAR_G(manifest_cached)) {
1940 …if (NULL != (pphar = zend_hash_str_find_ptr(&(PHAR_G(phar_fname_map)), (char *) filename, filename…
1960 …if (PHAR_G(manifest_cached) && NULL != (pphar = zend_hash_str_find_ptr(&cached_phars, (char *) fil…
1968 for (zend_hash_internal_pointer_reset(&(PHAR_G(phar_fname_map)));
1969 … HASH_KEY_NON_EXISTENT != zend_hash_get_current_key(&(PHAR_G(phar_fname_map)), &str_key, &unused);
1970 zend_hash_move_forward(&(PHAR_G(phar_fname_map)))
1978 if (NULL == (pphar = zend_hash_get_current_data_ptr(&(PHAR_G(phar_fname_map))))) {
1986 if (PHAR_G(manifest_cached)) {
2089 if (PHAR_G(cwd_len) && use_cwd && path_length > 2 && path[0] == '.' && path[1] == '/') {
2090 newpath_len = PHAR_G(cwd_len);
2092 memcpy(newpath, PHAR_G(cwd), newpath_len);
2538 if (PHAR_G(readonly)) {
3323 php_stream_rewind(PHAR_G(cached_fp)[phar->phar_pos].fp) :
3457 if (PHAR_G(manifest_cached)) {
3468 if (!PHAR_G(request_init))
3470 PHAR_G(last_phar) = NULL;
3471 PHAR_G(last_phar_name) = PHAR_G(last_alias) = NULL;
3472 PHAR_G(has_bz2) = zend_hash_str_exists(&module_registry, "bz2", sizeof("bz2")-1);
3473 PHAR_G(has_zlib) = zend_hash_str_exists(&module_registry, "zlib", sizeof("zlib")-1);
3474 PHAR_G(request_init) = 1;
3475 PHAR_G(request_ends) = 0;
3476 PHAR_G(request_done) = 0;
3477 zend_hash_init(&(PHAR_G(phar_fname_map)), 5, zend_get_hash_value, destroy_phar_data, 0);
3478 zend_hash_init(&(PHAR_G(phar_persist_map)), 5, zend_get_hash_value, NULL, 0);
3479 zend_hash_init(&(PHAR_G(phar_alias_map)), 5, zend_get_hash_value, NULL, 0);
3481 if (PHAR_G(manifest_cached)) {
3491 PHAR_G(cached_fp) = stuff;
3494 PHAR_G(phar_SERVER_mung_list) = 0;
3495 PHAR_G(cwd) = NULL;
3496 PHAR_G(cwd_len) = 0;
3497 PHAR_G(cwd_init) = 0;
3506 PHAR_G(request_ends) = 1;
3508 if (PHAR_G(request_init))
3511 zend_hash_destroy(&(PHAR_G(phar_alias_map)));
3512 PHAR_G(phar_alias_map.u.flags) = 0;
3513 zend_hash_destroy(&(PHAR_G(phar_fname_map)));
3514 PHAR_G(phar_fname_map.u.flags) = 0;
3515 zend_hash_destroy(&(PHAR_G(phar_persist_map)));
3516 PHAR_G(phar_persist_map.u.flags) = 0;
3517 PHAR_G(phar_SERVER_mung_list) = 0;
3519 if (PHAR_G(cached_fp)) {
3521 if (PHAR_G(cached_fp)[i].fp) {
3522 php_stream_close(PHAR_G(cached_fp)[i].fp);
3524 if (PHAR_G(cached_fp)[i].ufp) {
3525 php_stream_close(PHAR_G(cached_fp)[i].ufp);
3527 efree(PHAR_G(cached_fp)[i].manifest);
3529 efree(PHAR_G(cached_fp));
3530 PHAR_G(cached_fp) = 0;
3533 PHAR_G(request_init) = 0;
3535 if (PHAR_G(cwd)) {
3536 efree(PHAR_G(cwd));
3539 PHAR_G(cwd) = NULL;
3540 PHAR_G(cwd_len) = 0;
3541 PHAR_G(cwd_init) = 0;
3544 PHAR_G(request_done) = 1;
3561 if (PHAR_G(has_zlib)) {
3567 if (PHAR_G(has_bz2)) {