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) {
1425 zend_hash_str_add_ptr(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len, mydata);
1436 …if (alias && NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len)…
1442 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len);
1457 if (NULL == zend_hash_str_add_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len, mydata)) {
1464 zend_hash_str_del(&(PHAR_G(phar_fname_map)), mydata->fname, fname_len);
1615 if (!PHAR_G(has_zlib)) {
1672 if (!PHAR_G(has_bz2)) {
1753 if (zend_hash_str_exists(&(PHAR_G(phar_fname_map)), realpath, strlen(realpath))) {
1759 if (PHAR_G(manifest_cached) && zend_hash_str_exists(&cached_phars, realpath, strlen(realpath))) {
1922 if (zend_hash_str_exists(&(PHAR_G(phar_alias_map)), (char *) filename, pos - filename)) {
1928 …if (PHAR_G(manifest_cached) && zend_hash_str_exists(&cached_alias, (char *) filename, pos - filena…
1935 if (zend_hash_num_elements(&(PHAR_G(phar_fname_map))) || PHAR_G(manifest_cached)) {
1939 …if (NULL != (pphar = zend_hash_str_find_ptr(&(PHAR_G(phar_fname_map)), (char *) filename, filename…
1959 …if (PHAR_G(manifest_cached) && NULL != (pphar = zend_hash_str_find_ptr(&cached_phars, (char *) fil…
1967 for (zend_hash_internal_pointer_reset(&(PHAR_G(phar_fname_map)));
1968 … HASH_KEY_NON_EXISTENT != zend_hash_get_current_key(&(PHAR_G(phar_fname_map)), &str_key, &unused);
1969 zend_hash_move_forward(&(PHAR_G(phar_fname_map)))
1977 if (NULL == (pphar = zend_hash_get_current_data_ptr(&(PHAR_G(phar_fname_map))))) {
1985 if (PHAR_G(manifest_cached)) {
2088 if (PHAR_G(cwd_len) && use_cwd && path_length > 2 && path[0] == '.' && path[1] == '/') {
2089 newpath_len = PHAR_G(cwd_len);
2091 memcpy(newpath, PHAR_G(cwd), newpath_len);
2537 if (PHAR_G(readonly)) {
3322 php_stream_rewind(PHAR_G(cached_fp)[phar->phar_pos].fp) :
3456 if (PHAR_G(manifest_cached)) {
3467 if (!PHAR_G(request_init))
3469 PHAR_G(last_phar) = NULL;
3470 PHAR_G(last_phar_name) = PHAR_G(last_alias) = NULL;
3471 PHAR_G(has_bz2) = zend_hash_str_exists(&module_registry, "bz2", sizeof("bz2")-1);
3472 PHAR_G(has_zlib) = zend_hash_str_exists(&module_registry, "zlib", sizeof("zlib")-1);
3473 PHAR_G(request_init) = 1;
3474 PHAR_G(request_ends) = 0;
3475 PHAR_G(request_done) = 0;
3476 zend_hash_init(&(PHAR_G(phar_fname_map)), 5, zend_get_hash_value, destroy_phar_data, 0);
3477 zend_hash_init(&(PHAR_G(phar_persist_map)), 5, zend_get_hash_value, NULL, 0);
3478 zend_hash_init(&(PHAR_G(phar_alias_map)), 5, zend_get_hash_value, NULL, 0);
3480 if (PHAR_G(manifest_cached)) {
3490 PHAR_G(cached_fp) = stuff;
3493 PHAR_G(phar_SERVER_mung_list) = 0;
3494 PHAR_G(cwd) = NULL;
3495 PHAR_G(cwd_len) = 0;
3496 PHAR_G(cwd_init) = 0;
3505 PHAR_G(request_ends) = 1;
3507 if (PHAR_G(request_init))
3510 zend_hash_destroy(&(PHAR_G(phar_alias_map)));
3511 PHAR_G(phar_alias_map.u.flags) = 0;
3512 zend_hash_destroy(&(PHAR_G(phar_fname_map)));
3513 PHAR_G(phar_fname_map.u.flags) = 0;
3514 zend_hash_destroy(&(PHAR_G(phar_persist_map)));
3515 PHAR_G(phar_persist_map.u.flags) = 0;
3516 PHAR_G(phar_SERVER_mung_list) = 0;
3518 if (PHAR_G(cached_fp)) {
3520 if (PHAR_G(cached_fp)[i].fp) {
3521 php_stream_close(PHAR_G(cached_fp)[i].fp);
3523 if (PHAR_G(cached_fp)[i].ufp) {
3524 php_stream_close(PHAR_G(cached_fp)[i].ufp);
3526 efree(PHAR_G(cached_fp)[i].manifest);
3528 efree(PHAR_G(cached_fp));
3529 PHAR_G(cached_fp) = 0;
3532 PHAR_G(request_init) = 0;
3534 if (PHAR_G(cwd)) {
3535 efree(PHAR_G(cwd));
3538 PHAR_G(cwd) = NULL;
3539 PHAR_G(cwd_len) = 0;
3540 PHAR_G(cwd_init) = 0;
3543 PHAR_G(request_done) = 1;
3560 if (PHAR_G(has_zlib)) {
3566 if (PHAR_G(has_bz2)) {