Lines Matching refs:fname

59 static void phar_mung_server_vars(char *fname, char *entry, int entry_len, char *basename, int requ…  in phar_mung_server_vars()  argument
93 Z_STRLEN_PP(stuff) = spprintf(&(Z_STRVAL_PP(stuff)), 4096, "phar://%s%s", fname, entry); in phar_mung_server_vars()
154 Z_STRLEN_PP(stuff) = spprintf(&(Z_STRVAL_PP(stuff)), 4096, "phar://%s%s", fname, entry); in phar_mung_server_vars()
348 static void phar_do_404(phar_archive_data *phar, char *fname, int fname_len, char *f404, int f404_l… in phar_do_404() argument
357 …phar_file_action(phar, info, "text/html", PHAR_MIME_PHP, f404, f404_len, fname, NULL, NULL, 0 TSRM… in phar_do_404()
376 static void phar_postprocess_ru_web(char *fname, int fname_len, char **entry, int *entry_len, char … in phar_postprocess_ru_web() argument
383 zend_hash_find(&(PHAR_GLOBALS->phar_fname_map), fname, fname_len, (void **) &pphar); in phar_postprocess_ru_web()
386 zend_hash_find(&cached_phars, fname, fname_len, (void **) &pphar); in phar_postprocess_ru_web()
443 char *fname, *arch, *entry; in PHP_METHOD() local
451 fname = (char*)zend_get_executed_filename(TSRMLS_C); in PHP_METHOD()
452 fname_len = strlen(fname); in PHP_METHOD()
454 …if (fname_len > 7 && !memcmp(fname, "phar://", 7) && SUCCESS == phar_split_fname(fname, fname_len,… in PHP_METHOD()
457 RETVAL_STRINGL(fname, arch_len + 7, 1); in PHP_METHOD()
477 char *fname, *arch = NULL, *entry = NULL, *path, *actual; in PHP_METHOD() local
485 fname = (char*)zend_get_executed_filename(TSRMLS_C); in PHP_METHOD()
486 fname_len = strlen(fname); in PHP_METHOD()
489 phar_unixify_path_separators(fname, fname_len); in PHP_METHOD()
492 …if (fname_len > 7 && !memcmp(fname, "phar://", 7) && SUCCESS == phar_split_fname(fname, fname_len,… in PHP_METHOD()
539 …p.arBuckets && SUCCESS == zend_hash_find(&(PHAR_GLOBALS->phar_fname_map), fname, fname_len, (void … in PHP_METHOD()
541 …} else if (PHAR_G(manifest_cached) && SUCCESS == zend_hash_find(&cached_phars, fname, fname_len, (… in PHP_METHOD()
569 char *fname, *path_info, *mime_type = NULL, *entry, *pt; local
580 fname = (char*)zend_get_executed_filename(TSRMLS_C);
581 fname_len = strlen(fname);
597 fname = estrndup(fname, fname_len);
598 phar_unixify_path_separators(fname, fname_len);
600 basename = zend_memrchr(fname, '/', fname_len);
603 basename = fname;
661 pt = estrndup(testit, (pt - testit) + (fname_len - (basename - fname)));
673 entry_len -= (pt - path_info) + (fname_len - (basename - fname));
674 entry = estrndup(pt + (fname_len - (basename - fname)), entry_len);
676 pt = estrndup(path_info, (pt - path_info) + (fname_len - (basename - fname)));
772 phar_postprocess_ru_web(fname, fname_len, &entry, &entry_len, &ru, &ru_len TSRMLS_CC);
791 if (FAILURE == phar_get_archive(&phar, fname, fname_len, NULL, 0, NULL TSRMLS_CC) ||
793 phar_do_404(phar, fname, fname_len, f404, f404_len, entry, entry_len TSRMLS_CC);
837 if (FAILURE == phar_get_archive(&phar, fname, fname_len, NULL, 0, NULL TSRMLS_CC) ||
839 phar_do_404(phar, fname, fname_len, f404, f404_len, entry, entry_len TSRMLS_CC);
841 efree(fname);
862 efree(fname);
874 efree(fname);
885 …ret = phar_file_action(phar, info, mime_type, code, entry, entry_len, fname, pt, ru, ru_len TSRMLS…
1017 char *fname, *alias = NULL, *error; local
1020 …if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s!", &fname, &fname_len, &alias, &alias_le…
1026 …RETVAL_BOOL(phar_open_from_filename(fname, fname_len, alias, alias_len, REPORT_ERRORS, NULL, &erro…
1094 char *fname; local
1099 …if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &fname, &fname_len, &executable) == FA…
1104 …RETVAL_BOOL(phar_detect_phar_fname_ext(fname, fname_len, &ext_str, &ext_len, is_executable, 2, 1 T…
1157 char *fname, *alias = NULL, *error, *arch = NULL, *entry = NULL, *save_fname;
1174 …if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ls!l", &fname, &fname_len, &flags, &alias,…
1178 …if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ls!", &fname, &fname_len, &flags, &alias, …
1188 save_fname = fname;
1189 …if (SUCCESS == phar_split_fname(fname, fname_len, &arch, &arch_len, &entry, &entry_len, !is_data, …
1195 fname = arch;
1199 arch = estrndup(fname, fname_len);
1201 fname = arch;
1206 …if (phar_open_or_create_filename(fname, fname_len, alias, alias_len, is_data, REPORT_ERRORS, &phar…
1208 if (fname == arch && fname != save_fname) {
1210 fname = save_fname;
1234 if (fname == arch) {
1236 fname = save_fname;
1261 fname_len = spprintf(&fname, 0, "phar://%s%s", phar_data->fname, entry);
1264 fname_len = spprintf(&fname, 0, "phar://%s", phar_data->fname);
1268 ZVAL_STRINGL(&arg1, fname, fname_len, 0);
1283 efree(fname);
1342 char *fname, *error, *zname, *arch, *entry; local
1346 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &fname, &fname_len) == FAILURE) {
1355 …if (FAILURE == phar_open_from_filename(fname, fname_len, NULL, 0, REPORT_ERRORS, &phar, &error TSR…
1357 …_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, "Unknown phar archive \"%s\": %s", fname, error);
1360 … zend_throw_exception_ex(phar_ce_PharException, 0 TSRMLS_CC, "Unknown phar archive \"%s\"", fname);
1369 if (arch_len == fname_len && !memcmp(arch, fname, arch_len)) {
1370 …ce_PharException, 0 TSRMLS_CC, "phar archive \"%s\" cannot be unlinked from within itself", fname);
1380 …xception, 0 TSRMLS_CC, "phar archive \"%s\" is in phar.cache_list, cannot unlinkArchive()", fname);
1385 …cts. fclose() all file handles, and unset() all objects prior to calling unlinkArchive()", fname);
1389 fname = estrndup(phar->fname, phar->fname_len);
1396 unlink(fname);
1397 efree(fname);
1446 char *fname, *error = NULL, *base = p_obj->b, *opened, *save = NULL, *temp = NULL; local
1539 fname_len = spprintf(&fname, 0, "%s%c%s", test, DEFAULT_SLASH, intern->u.dir.entry.d_name);
1540 php_stat(fname, fname_len, FS_IS_DIR, &dummy TSRMLS_CC);
1544 efree(fname);
1548 test = expand_filepath(fname, NULL TSRMLS_CC);
1549 efree(fname);
1552 fname = test;
1553 fname_len = strlen(fname);
1559 save = fname;
1574 fname = expand_filepath(Z_STRVAL(zv), NULL TSRMLS_CC);
1577 fname = expand_filepath(intern->file_name.s, NULL TSRMLS_CC);
1580 fname = expand_filepath(intern->file_name, NULL TSRMLS_CC);
1582 if (!fname) {
1587 fname_len = strlen(fname);
1588 save = fname;
1598 fname = Z_STRVAL_PP(value);
1615 if (strstr(fname, base)) {
1626 str_key = fname + base_len;
1634 …erator %v returned a path \"%s\" that is not in the base directory \"%s\"", ce->name, fname, base);
1677 if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) {
1678 … TSRMLS_CC, "Iterator %v returned a path \"%s\" that safe mode prevents opening", ce->name, fname);
1692 if (php_check_open_basedir(fname TSRMLS_CC)) {
1693 …RMLS_CC, "Iterator %v returned a path \"%s\" that open_basedir prevents opening", ce->name, fname);
1707 fp = php_stream_open_wrapper(fname, "rb", STREAM_MUST_SEEK|0, &opened);
1710 …tion, 0 TSRMLS_CC, "Iterator %v returned a file that could not be opened \"%s\"", ce->name, fname);
1744 …if (!(data = phar_get_or_create_entry_data(phar_obj->arc.archive->fname, phar_obj->arc.archive->fn…
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);
1914 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
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);
2055 …r archive \"%s\", unable to open entry \"%s\" contents: %s", entry->phar->fname, entry->filename, …
2059 …"Cannot convert phar archive \"%s\", unable to open entry \"%s\" contents", entry->phar->fname, en…
2075 …"Cannot convert phar archive \"%s\", unable to copy entry \"%s\" contents", entry->phar->fname, en…
2157 …eption, 0 TSRMLS_CC, "data phar converted from \"%s\" has invalid extension %s", phar->fname, ext);
2159 …llException, 0 TSRMLS_CC, "phar converted from \"%s\" has invalid extension %s", phar->fname, ext);
2168 oldpath = estrndup(phar->fname, phar->fname_len);
2169 oldname = zend_memrchr(phar->fname, '/', phar->fname_len);
2181 phar->fname = newpath;
2188 …wly converted phar \"%s\" to the list of phars, new phar name is in phar.cache_list", phar->fname);
2193 …if ((*pphar)->fname_len == phar->fname_len && !memcmp((*pphar)->fname, phar->fname, phar->fname_le…
2211 …ly converted phar \"%s\" to the list of phars, a phar with that name already exists", phar->fname);
2223 …_ce_BadMethodCallException, 0 TSRMLS_CC, "phar \"%s\" has invalid extension %s", phar->fname, ext);
2243 …adMethodCallException, 0 TSRMLS_CC, "data phar \"%s\" has invalid extension %s", phar->fname, ext);
2253 …ption, 0 TSRMLS_CC, "Unable to add newly converted phar \"%s\" to the list of phars", phar->fname);
2278 …ion, 0 TSRMLS_CC, "Unable to instantiate phar object when converting archive \"%s\"", phar->fname);
2283 ZVAL_STRINGL(&arg1, phar->fname, phar->fname_len, 0);
2329 phar->fname = source->fname;
2358 "Cannot convert phar archive \"%s\"", source->fname);
2428 efree(phar->fname);
2681 if (SUCCESS != php_stream_stat_path(phar_obj->arc.archive->fname, &ssb)) {
2698 char *fname; local
2710 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &fname, &fname_len) == FAILURE) {
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**)&…
2730 …pl_ce_BadMethodCallException, 0 TSRMLS_CC, "Entry %s does not exist and cannot be deleted", fname);
2755 if (phar_obj->arc.archive->alias && phar_obj->arc.archive->alias != phar_obj->arc.archive->fname) {
2772 RETURN_STRINGL(phar_obj->arc.archive->fname, phar_obj->arc.archive->fname_len, 1);
2814 …s already used for archive \"%s\" and cannot be used for other archives", alias, (*fd_ptr)->fname);
2825 "Invalid alias \"%s\" specified for phar \"%s\"", alias, phar_obj->arc.archive->fname);
2830 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
2989 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3004 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3083 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3138 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3450 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3492 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
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);
3548 …copied to file \"%s\", file does not exist in %s", oldfile, newfile, phar_obj->arc.archive->fname);
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);
3568 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
3626 char *fname; local
3632 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &fname, &fname_len) == FAILURE) {
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**)&…
3644 if (fname_len >= sizeof(".phar")-1 && !memcmp(fname, ".phar", sizeof(".phar")-1)) {
3650 if (zend_hash_exists(&phar_obj->arc.archive->virtual_dirs, fname, (uint) fname_len)) {
3663 char *fname, *error; local
3669 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &fname, &fname_len) == FAILURE) {
3674 …if (!(entry = phar_get_entry_info_dir(phar_obj->arc.archive, fname, fname_len, 1, &error, 0 TSRMLS…
3675 …pl_ce_BadMethodCallException, 0 TSRMLS_CC, "Entry %s does not exist%s%s", fname, error?", ":"", er…
3677 …if (fname_len == sizeof(".phar/stub.php")-1 && !memcmp(fname, ".phar/stub.php", sizeof(".phar/stub…
3678 …t get stub \".phar/stub.php\" directly in phar \"%s\", use getStub", phar_obj->arc.archive->fname);
3682 …if (fname_len == sizeof(".phar/alias.txt")-1 && !memcmp(fname, ".phar/alias.txt", sizeof(".phar/al…
3683 …et alias \".phar/alias.txt\" directly in phar \"%s\", use getAlias", phar_obj->arc.archive->fname);
3687 if (fname_len >= sizeof(".phar")-1 && !memcmp(fname, ".phar", sizeof(".phar")-1)) {
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);
3699 ZVAL_STRINGL(zfname, fname, fname_len, 0);
3716 …llException, 0 TSRMLS_CC, "Cannot create any files in magic \".phar\" directory", (*pphar)->fname);
3720 …if (!(data = phar_get_or_create_entry_data((*pphar)->fname, (*pphar)->fname_len, filename, filenam…
3773 …if (!(data = phar_get_or_create_entry_data((*pphar)->fname, (*pphar)->fname_len, dirname, dirname_…
3807 char *fname, *cont_str = NULL; local
3817 …if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "sr", &fname, &fn…
3818 …&& zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &fname, &fname_len, &cont_str, &cont_len…
3822 …if (fname_len == sizeof(".phar/stub.php")-1 && !memcmp(fname, ".phar/stub.php", sizeof(".phar/stub…
3823 …t set stub \".phar/stub.php\" directly in phar \"%s\", use setStub", phar_obj->arc.archive->fname);
3827 …if (fname_len == sizeof(".phar/alias.txt")-1 && !memcmp(fname, ".phar/alias.txt", sizeof(".phar/al…
3828 …et alias \".phar/alias.txt\" directly in phar \"%s\", use setAlias", phar_obj->arc.archive->fname);
3832 if (fname_len >= sizeof(".phar")-1 && !memcmp(fname, ".phar", sizeof(".phar")-1)) {
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);
3846 char *fname, *error; local
3856 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &fname, &fname_len) == FAILURE) {
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**)&…
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);
3921 char *fname, *localname = NULL; local
3928 …if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", &fname, &fname_len, &localname, &local…
3933 if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) {
3934 …r: unable to open file \"%s\" to add to phar archive, safe_mode restrictions prevent this", fname);
3939 if (!strstr(fname, "://") && php_check_open_basedir(fname TSRMLS_CC)) {
3940 …unable to open file \"%s\" to add to phar archive, open_basedir restrictions prevent this", fname);
3944 if (!(resource = php_stream_open_wrapper(fname, "rb", 0, NULL))) {
3945 …imeException, 0 TSRMLS_CC, "phar error: unable to open file \"%s\" to add to phar archive", fname);
3950 fname = localname;
3956 phar_add_file(&(phar_obj->arc.archive), fname, fname_len, NULL, 0, zresource TSRMLS_CC);
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 …ad stub of phar \"%s\" (cannot create %s filter)", phar_obj->arc.archive->fname, phar_decompress_f…
4041 fp = php_stream_open_wrapper(phar_obj->arc.archive->fname, "rb", 0, NULL);
4134 …, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar_obj->arc.archive->fname);
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);
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);
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);
4525 "Extraction from phar \"%s\" failed: %s", phar->fname, error);
4541 char *fname, *arch, *entry, *error; local
4548 if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &fname, &fname_len) == FAILURE) {
4559 …if (fname_len < 7 || memcmp(fname, "phar://", 7) || phar_split_fname(fname, fname_len, &arch, &arc…
4561 "'%s' is not a valid phar archive URL (must have at least phar://filename.phar)", fname);
4570 "Cannot open phar file '%s': %s", fname, error);
4574 "Cannot open phar file '%s'", fname);
4593 ZVAL_STRINGL(&arg1, fname, fname_len, 0);
4741 …ite operations are prohibited", entry_obj->ent.entry->filename, entry_obj->ent.entry->phar->fname);
4753 …_ce_PharException, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar->fname);
4857 …_ce_PharException, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar->fname);
4911 …_ce_PharException, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar->fname);
4955 …in phar \"%s\" is a directory", entry_obj->ent.entry->filename, entry_obj->ent.entry->phar->fname);
4967 …s\" in phar \"%s\": %s", entry_obj->ent.entry->filename, entry_obj->ent.entry->phar->fname, error);
4974 …ents of \"%s\" in phar \"%s\"", entry_obj->ent.entry->filename, entry_obj->ent.entry->phar->fname);
5029 …_ce_PharException, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar->fname);
5051 …compress with gzip: %s", entry_obj->ent.entry->filename, entry_obj->ent.entry->phar->fname, error);
5082 …ompress with bzip2: %s", entry_obj->ent.entry->filename, entry_obj->ent.entry->phar->fname, error);
5165 …_ce_PharException, 0 TSRMLS_CC, "phar \"%s\" is persistent, unable to copy on write", phar->fname);
5173 …ar archive \"%s\" for reading", entry_obj->ent.entry->filename, entry_obj->ent.entry->phar->fname);