Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK!T?==TSRM.hnu[/* +----------------------------------------------------------------------+ | Thread Safe Resource Manager | +----------------------------------------------------------------------+ | Copyright (c) 1999-2011, Andi Gutmans, Sascha Schumann, Zeev Suraski | | This source file is subject to the TSRM license, that is bundled | | with this package in the file LICENSE | +----------------------------------------------------------------------+ | Authors: Zeev Suraski | +----------------------------------------------------------------------+ */ #ifndef TSRM_H #define TSRM_H #if !defined(__CYGWIN__) && defined(WIN32) # define TSRM_WIN32 # include "Zend/zend_config.w32.h" #else # include "main/php_config.h" #endif #include #include #ifdef TSRM_WIN32 # ifdef TSRM_EXPORTS # define TSRM_API __declspec(dllexport) # else # define TSRM_API __declspec(dllimport) # endif #elif defined(__GNUC__) && __GNUC__ >= 4 # define TSRM_API __attribute__ ((visibility("default"))) #else # define TSRM_API #endif typedef intptr_t tsrm_intptr_t; typedef uintptr_t tsrm_uintptr_t; /* Only compile multi-threading functions if we're in ZTS mode */ #ifdef ZTS #ifdef TSRM_WIN32 # ifndef TSRM_INCLUDE_FULL_WINDOWS_HEADERS # define WIN32_LEAN_AND_MEAN # endif #else # include #endif #if SIZEOF_SIZE_T == 4 # define TSRM_ALIGNED_SIZE(size) \ (((size) + INT32_C(15)) & ~INT32_C(15)) #else # define TSRM_ALIGNED_SIZE(size) \ (((size) + INT64_C(15)) & ~INT64_C(15)) #endif typedef int ts_rsrc_id; /* Define THREAD_T and MUTEX_T */ #ifdef TSRM_WIN32 # define THREAD_T DWORD # define MUTEX_T CRITICAL_SECTION * #else # define THREAD_T pthread_t # define MUTEX_T pthread_mutex_t * #endif #include typedef void (*ts_allocate_ctor)(void *); typedef void (*ts_allocate_dtor)(void *); #define THREAD_HASH_OF(thr,ts) (unsigned long)thr%(unsigned long)ts #ifdef __cplusplus extern "C" { #endif /* startup/shutdown */ TSRM_API bool tsrm_startup(int expected_threads, int expected_resources, int debug_level, const char *debug_filename); TSRM_API void tsrm_shutdown(void); /* environ lock API */ TSRM_API void tsrm_env_lock(void); TSRM_API void tsrm_env_unlock(void); /* allocates a new thread-safe-resource id */ TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor); /* Fast resource in reserved (pre-allocated) space */ TSRM_API void tsrm_reserve(size_t size); TSRM_API ts_rsrc_id ts_allocate_fast_id(ts_rsrc_id *rsrc_id, size_t *offset, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor); /* fetches the requested resource for the current thread */ TSRM_API void *ts_resource_ex(ts_rsrc_id id, THREAD_T *th_id); #define ts_resource(id) ts_resource_ex(id, NULL) /* frees all resources allocated for the current thread */ TSRM_API void ts_free_thread(void); /* deallocates all occurrences of a given id */ TSRM_API void ts_free_id(ts_rsrc_id id); /* Debug support */ #define TSRM_ERROR_LEVEL_ERROR 1 #define TSRM_ERROR_LEVEL_CORE 2 #define TSRM_ERROR_LEVEL_INFO 3 typedef void (*tsrm_thread_begin_func_t)(THREAD_T thread_id); typedef void (*tsrm_thread_end_func_t)(THREAD_T thread_id); typedef void (*tsrm_shutdown_func_t)(void); TSRM_API int tsrm_error(int level, const char *format, ...); TSRM_API void tsrm_error_set(int level, const char *debug_filename); /* utility functions */ TSRM_API THREAD_T tsrm_thread_id(void); TSRM_API MUTEX_T tsrm_mutex_alloc(void); TSRM_API void tsrm_mutex_free(MUTEX_T mutexp); TSRM_API int tsrm_mutex_lock(MUTEX_T mutexp); TSRM_API int tsrm_mutex_unlock(MUTEX_T mutexp); #ifdef HAVE_SIGPROCMASK TSRM_API int tsrm_sigmask(int how, const sigset_t *set, sigset_t *oldset); #endif TSRM_API void *tsrm_set_new_thread_begin_handler(tsrm_thread_begin_func_t new_thread_begin_handler); TSRM_API void *tsrm_set_new_thread_end_handler(tsrm_thread_end_func_t new_thread_end_handler); TSRM_API void *tsrm_set_shutdown_handler(tsrm_shutdown_func_t shutdown_handler); TSRM_API void *tsrm_get_ls_cache(void); TSRM_API size_t tsrm_get_ls_cache_tcb_offset(void); TSRM_API bool tsrm_is_main_thread(void); TSRM_API bool tsrm_is_shutdown(void); TSRM_API const char *tsrm_api_name(void); TSRM_API bool tsrm_is_managed_thread(void); #ifdef TSRM_WIN32 # define TSRM_TLS __declspec(thread) #else # define TSRM_TLS __thread #endif #ifndef __has_attribute # define __has_attribute(x) 0 #endif #if !__has_attribute(tls_model) || defined(__FreeBSD__) || defined(__MUSL__) || defined(__HAIKU__) # define TSRM_TLS_MODEL_ATTR # define TSRM_TLS_MODEL_DEFAULT #elif __PIC__ # define TSRM_TLS_MODEL_ATTR __attribute__((tls_model("initial-exec"))) # define TSRM_TLS_MODEL_INITIAL_EXEC #else # define TSRM_TLS_MODEL_ATTR __attribute__((tls_model("local-exec"))) # define TSRM_TLS_MODEL_LOCAL_EXEC #endif #define TSRM_SHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)+1) #define TSRM_UNSHUFFLE_RSRC_ID(rsrc_id) ((rsrc_id)-1) #define TSRMG(id, type, element) (TSRMG_BULK(id, type)->element) #define TSRMG_BULK(id, type) ((type) (*((void ***) tsrm_get_ls_cache()))[TSRM_UNSHUFFLE_RSRC_ID(id)]) #define TSRMG_FAST(offset, type, element) (TSRMG_FAST_BULK(offset, type)->element) #define TSRMG_FAST_BULK(offset, type) ((type) (((char*) tsrm_get_ls_cache())+(offset))) #define TSRMG_STATIC(id, type, element) (TSRMG_BULK_STATIC(id, type)->element) #define TSRMG_BULK_STATIC(id, type) ((type) (*((void ***) TSRMLS_CACHE))[TSRM_UNSHUFFLE_RSRC_ID(id)]) #define TSRMG_FAST_STATIC(offset, type, element) (TSRMG_FAST_BULK_STATIC(offset, type)->element) #define TSRMG_FAST_BULK_STATIC(offset, type) ((type) (((char*) TSRMLS_CACHE)+(offset))) #define TSRMLS_MAIN_CACHE_EXTERN() extern TSRM_TLS void *TSRMLS_CACHE TSRM_TLS_MODEL_ATTR; #define TSRMLS_MAIN_CACHE_DEFINE() TSRM_TLS void *TSRMLS_CACHE TSRM_TLS_MODEL_ATTR = NULL; #define TSRMLS_CACHE_EXTERN() extern TSRM_TLS void *TSRMLS_CACHE; #define TSRMLS_CACHE_DEFINE() TSRM_TLS void *TSRMLS_CACHE = NULL; #define TSRMLS_CACHE_UPDATE() TSRMLS_CACHE = tsrm_get_ls_cache() #define TSRMLS_CACHE _tsrm_ls_cache #ifdef __cplusplus } #endif #else /* non ZTS */ #define tsrm_env_lock() #define tsrm_env_unlock() #define TSRMG_STATIC(id, type, element) #define TSRMLS_MAIN_CACHE_EXTERN() #define TSRMLS_MAIN_CACHE_DEFINE() #define TSRMLS_CACHE_EXTERN() #define TSRMLS_CACHE_DEFINE() #define TSRMLS_CACHE_UPDATE() #define TSRMLS_CACHE #define TSRM_TLS #endif /* ZTS */ // Backward compatibility with old modules #ifndef TSRMLS_C #define TSRMLS_C #define TSRMLS_D #define TSRMLS_CC #define TSRMLS_DC #endif #endif /* TSRM_H */ PK!4: tsrm_config.hnu[#include <../main/php_config.h> PK!Ylltsrm_config_common.hnu[#ifndef TSRM_CONFIG_COMMON_H #define TSRM_CONFIG_COMMON_H #ifndef __CYGWIN__ # ifdef _WIN32 # define TSRM_WIN32 # endif #endif #ifdef TSRM_WIN32 # include "tsrm_config.w32.h" #else # include # include #endif #if HAVE_ALLOCA_H && !defined(_ALLOCA_H) # include #endif /* AIX requires this to be the first thing in the file. */ #ifndef __GNUC__ # ifndef HAVE_ALLOCA_H # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif #endif #if HAVE_UNISTD_H #include #endif #if HAVE_LIMITS_H #include #endif #ifndef MAXPATHLEN # if _WIN32 # include "win32/ioutil.h" # define MAXPATHLEN PHP_WIN32_IOUTIL_MAXPATHLEN # elif PATH_MAX # define MAXPATHLEN PATH_MAX # elif defined(MAX_PATH) # define MAXPATHLEN MAX_PATH # else # define MAXPATHLEN 256 # endif #endif #if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) # define TSRM_ALLOCA_MAX_SIZE 4096 # define TSRM_ALLOCA_FLAG(name) \ int name; # define tsrm_do_alloca_ex(size, limit, use_heap) \ ((use_heap = ((size) > (limit))) ? malloc(size) : alloca(size)) # define tsrm_do_alloca(size, use_heap) \ tsrm_do_alloca_ex(size, TSRM_ALLOCA_MAX_SIZE, use_heap) # define tsrm_free_alloca(p, use_heap) \ do { if (use_heap) free(p); } while (0) #else # define TSRM_ALLOCA_FLAG(name) # define tsrm_do_alloca(p, use_heap) malloc(p) # define tsrm_free_alloca(p, use_heap) free(p) #endif #endif /* TSRM_CONFIG_COMMON_H */ /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ PK!C readdir.hnu[/* Keep this header for compatibility with external code, it's currently not used anywhere in the core and there are no implementations in TSRM. */ #include "win32/readdir.h" PK!Jtsrm_strtok_r.hnu[#ifndef TSRM_STRTOK_R #define TSRM_STRTOK_R #include "TSRM.h" TSRM_API char *tsrm_strtok_r(char *s, const char *delim, char **last); #endif PK!^hh tsrm_nw.hnu[/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2018 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Venkat Raghavan S | | Anantha Kesari H Y | +----------------------------------------------------------------------+ */ #ifndef TSRM_NW_H #define TSRM_NW_H #include "TSRM.h" TSRM_API FILE* popen(const char *command, const char *type); TSRM_API int pclose(FILE* stream); #endif PK!Hggtsrm_config.w32.hnu[#ifndef TSRM_CONFIG_W32_H #define TSRM_CONFIG_W32_H #include <../main/config.w32.h> #include "Zend/zend_config.w32.h" #define HAVE_UTIME 1 #define HAVE_ALLOCA 1 #include #include #include #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ PK!ɶ< < tsrm_win32.hnu[/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2018 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Daniel Beulshausen | +----------------------------------------------------------------------+ */ #ifndef TSRM_WIN32_H #define TSRM_WIN32_H #include "TSRM.h" #include #if HAVE_UTIME # include #endif #include "win32/ipc.h" struct ipc_perm { key_t key; unsigned short uid; unsigned short gid; unsigned short cuid; unsigned short cgid; unsigned short mode; unsigned short seq; }; struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; time_t shm_atime; time_t shm_dtime; time_t shm_ctime; unsigned short shm_cpid; unsigned short shm_lpid; short shm_nattch; }; typedef struct { FILE *stream; HANDLE prochnd; } process_pair; typedef struct { void *addr; HANDLE info; HANDLE segment; struct shmid_ds *descriptor; } shm_pair; typedef struct { process_pair *process; shm_pair *shm; int process_size; int shm_size; char *comspec; HANDLE impersonation_token; PSID impersonation_token_sid; } tsrm_win32_globals; #ifdef ZTS # define TWG(v) TSRMG_STATIC(win32_globals_id, tsrm_win32_globals *, v) TSRMLS_CACHE_EXTERN() #else # define TWG(v) (win32_globals.v) #endif #define IPC_PRIVATE 0 #define IPC_CREAT 00001000 #define IPC_EXCL 00002000 #define IPC_NOWAIT 00004000 #define IPC_RMID 0 #define IPC_SET 1 #define IPC_STAT 2 #define IPC_INFO 3 #define SHM_R PAGE_READONLY #define SHM_W PAGE_READWRITE #define SHM_RDONLY FILE_MAP_READ #define SHM_RND FILE_MAP_WRITE #define SHM_REMAP FILE_MAP_COPY char * tsrm_win32_get_path_sid_key(const char *pathname, size_t pathname_len, size_t *key_len); TSRM_API void tsrm_win32_startup(void); TSRM_API void tsrm_win32_shutdown(void); TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, char *env); TSRM_API FILE *popen(const char *command, const char *type); TSRM_API int pclose(FILE *stream); TSRM_API int tsrm_win32_access(const char *pathname, int mode); TSRM_API int win32_utime(const char *filename, struct utimbuf *buf); TSRM_API int shmget(key_t key, size_t size, int flags); TSRM_API void *shmat(int key, const void *shmaddr, int flags); TSRM_API int shmdt(const void *shmaddr); TSRM_API int shmctl(int key, int cmd, struct shmid_ds *buf); #endif /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: sw=4 ts=4 fdm=marker * vim<600: sw=4 ts=4 */ PK!/i,..tsrm_virtual_cwd.hnu[/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ | Copyright (c) 1997-2013 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Andi Gutmans | | Sascha Schumann | | Pierre Joye | +----------------------------------------------------------------------+ */ /* $Id$ */ #ifndef VIRTUAL_CWD_H #define VIRTUAL_CWD_H #include "TSRM.h" #include "tsrm_config_common.h" #include #include #include #ifdef HAVE_UTIME_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef ZTS #define VIRTUAL_DIR #endif #ifndef TSRM_WIN32 #include #else #include #endif #if defined(__osf__) || defined(_AIX) #include #endif #ifdef TSRM_WIN32 #include "readdir.h" #include /* mode_t isn't defined on Windows */ typedef unsigned short mode_t; #define DEFAULT_SLASH '\\' #define DEFAULT_DIR_SEPARATOR ';' #define IS_SLASH(c) ((c) == '/' || (c) == '\\') #define IS_SLASH_P(c) (*(c) == '/' || \ (*(c) == '\\' && !IsDBCSLeadByte(*(c-1)))) /* COPY_WHEN_ABSOLUTE is 2 under Win32 because by chance both regular absolute paths in the file system and UNC paths need copying of two characters */ #define COPY_WHEN_ABSOLUTE(path) 2 #define IS_UNC_PATH(path, len) \ (len >= 2 && IS_SLASH(path[0]) && IS_SLASH(path[1])) #define IS_ABSOLUTE_PATH(path, len) \ (len >= 2 && ((isalpha(path[0]) && path[1] == ':') || IS_UNC_PATH(path, len))) #elif defined(NETWARE) #ifdef HAVE_DIRENT_H #include #endif #define DEFAULT_SLASH '/' #define DEFAULT_DIR_SEPARATOR ';' #define IS_SLASH(c) ((c) == '/' || (c) == '\\') #define IS_SLASH_P(c) IS_SLASH(*(c)) /* Colon indicates volume name, either first character should be forward slash or backward slash */ #define IS_ABSOLUTE_PATH(path, len) \ ((strchr(path, ':') != NULL) || ((len >= 1) && ((path[0] == '/') || (path[0] == '\\')))) #else #ifdef HAVE_DIRENT_H #include #endif #define DEFAULT_SLASH '/' #ifdef __riscos__ #define DEFAULT_DIR_SEPARATOR ';' #else #define DEFAULT_DIR_SEPARATOR ':' #endif #define IS_SLASH(c) ((c) == '/') #define IS_SLASH_P(c) (*(c) == '/') #endif #ifndef COPY_WHEN_ABSOLUTE #define COPY_WHEN_ABSOLUTE(path) 0 #endif #ifndef IS_ABSOLUTE_PATH #define IS_ABSOLUTE_PATH(path, len) \ (IS_SLASH(path[0])) #endif #ifdef TSRM_EXPORTS #define CWD_EXPORTS #endif #ifdef TSRM_WIN32 # ifdef CWD_EXPORTS # define CWD_API __declspec(dllexport) # else # define CWD_API __declspec(dllimport) # endif #elif defined(__GNUC__) && __GNUC__ >= 4 # define CWD_API __attribute__ ((visibility("default"))) #else # define CWD_API #endif #ifdef TSRM_WIN32 CWD_API int php_sys_stat_ex(const char *path, struct stat *buf, int lstat); CWD_API int php_sys_stat(const char *path, struct stat *buf); CWD_API int php_sys_lstat(const char *path, struct stat *buf); CWD_API int php_sys_readlink(const char *link, char *target, size_t target_len); #else # define php_sys_stat stat # define php_sys_lstat lstat # ifdef HAVE_SYMLINK # define php_sys_readlink(link, target, target_len) readlink(link, target, target_len) # endif #endif typedef struct _cwd_state { char *cwd; int cwd_length; } cwd_state; typedef int (*verify_path_func)(const cwd_state *); CWD_API void virtual_cwd_startup(void); CWD_API void virtual_cwd_shutdown(void); CWD_API char *virtual_getcwd_ex(size_t *length TSRMLS_DC); CWD_API char *virtual_getcwd(char *buf, size_t size TSRMLS_DC); CWD_API int virtual_chdir(const char *path TSRMLS_DC); CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path TSRMLS_DC) TSRMLS_DC); CWD_API int virtual_filepath(const char *path, char **filepath TSRMLS_DC); CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path TSRMLS_DC); CWD_API char *virtual_realpath(const char *path, char *real_path TSRMLS_DC); CWD_API FILE *virtual_fopen(const char *path, const char *mode TSRMLS_DC); CWD_API int virtual_open(const char *path TSRMLS_DC, int flags, ...); CWD_API int virtual_creat(const char *path, mode_t mode TSRMLS_DC); CWD_API int virtual_rename(char *oldname, char *newname TSRMLS_DC); CWD_API int virtual_stat(const char *path, struct stat *buf TSRMLS_DC); CWD_API int virtual_lstat(const char *path, struct stat *buf TSRMLS_DC); CWD_API int virtual_unlink(const char *path TSRMLS_DC); CWD_API int virtual_mkdir(const char *pathname, mode_t mode TSRMLS_DC); CWD_API int virtual_rmdir(const char *pathname TSRMLS_DC); CWD_API DIR *virtual_opendir(const char *pathname TSRMLS_DC); CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC); CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC); #if defined(TSRM_WIN32) /* these are not defined in win32 headers */ #ifndef W_OK #define W_OK 0x02 #endif #ifndef R_OK #define R_OK 0x04 #endif #ifndef X_OK #define X_OK 0x01 #endif #ifndef F_OK #define F_OK 0x00 #endif #endif #if HAVE_UTIME CWD_API int virtual_utime(const char *filename, struct utimbuf *buf TSRMLS_DC); #endif CWD_API int virtual_chmod(const char *filename, mode_t mode TSRMLS_DC); #if !defined(TSRM_WIN32) && !defined(NETWARE) CWD_API int virtual_chown(const char *filename, uid_t owner, gid_t group, int link TSRMLS_DC); #endif /* One of the following constants must be used as the last argument in virtual_file_ex() call. */ #define CWD_EXPAND 0 /* expand "." and ".." but dont resolve symlinks */ #define CWD_FILEPATH 1 /* resolve symlinks if file is exist otherwise expand */ #define CWD_REALPATH 2 /* call realpath(), resolve symlinks. File must exist */ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath); CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC); #define REALPATH_CACHE_TTL (2*60) /* 2 minutes */ #define REALPATH_CACHE_SIZE 0 /* disabled while php.ini isn't loaded */ typedef struct _realpath_cache_bucket { unsigned long key; char *path; int path_len; char *realpath; int realpath_len; int is_dir; time_t expires; #ifdef PHP_WIN32 unsigned char is_rvalid; unsigned char is_readable; unsigned char is_wvalid; unsigned char is_writable; #endif struct _realpath_cache_bucket *next; } realpath_cache_bucket; typedef struct _virtual_cwd_globals { cwd_state cwd; long realpath_cache_size; long realpath_cache_size_limit; long realpath_cache_ttl; realpath_cache_bucket *realpath_cache[1024]; } virtual_cwd_globals; #ifdef ZTS extern ts_rsrc_id cwd_globals_id; # define CWDG(v) TSRMG(cwd_globals_id, virtual_cwd_globals *, v) #else extern virtual_cwd_globals cwd_globals; # define CWDG(v) (cwd_globals.v) #endif CWD_API void realpath_cache_clean(TSRMLS_D); CWD_API void realpath_cache_del(const char *path, int path_len TSRMLS_DC); CWD_API realpath_cache_bucket* realpath_cache_lookup(const char *path, int path_len, time_t t TSRMLS_DC); CWD_API int realpath_cache_size(TSRMLS_D); CWD_API int realpath_cache_max_buckets(TSRMLS_D); CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D); /* The actual macros to be used in programs using TSRM * If the program defines VIRTUAL_DIR it will use the * virtual_* functions */ #ifdef VIRTUAL_DIR #define VCWD_GETCWD(buff, size) virtual_getcwd(buff, size TSRMLS_CC) #define VCWD_FOPEN(path, mode) virtual_fopen(path, mode TSRMLS_CC) /* Because open() has two modes, we have to macros to replace it */ #define VCWD_OPEN(path, flags) virtual_open(path TSRMLS_CC, flags) #define VCWD_OPEN_MODE(path, flags, mode) virtual_open(path TSRMLS_CC, flags, mode) #define VCWD_CREAT(path, mode) virtual_creat(path, mode TSRMLS_CC) #define VCWD_CHDIR(path) virtual_chdir(path TSRMLS_CC) #define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, virtual_chdir TSRMLS_CC) #define VCWD_GETWD(buf) #define VCWD_REALPATH(path, real_path) virtual_realpath(path, real_path TSRMLS_CC) #define VCWD_RENAME(oldname, newname) virtual_rename(oldname, newname TSRMLS_CC) #define VCWD_STAT(path, buff) virtual_stat(path, buff TSRMLS_CC) #define VCWD_LSTAT(path, buff) virtual_lstat(path, buff TSRMLS_CC) #define VCWD_UNLINK(path) virtual_unlink(path TSRMLS_CC) #define VCWD_MKDIR(pathname, mode) virtual_mkdir(pathname, mode TSRMLS_CC) #define VCWD_RMDIR(pathname) virtual_rmdir(pathname TSRMLS_CC) #define VCWD_OPENDIR(pathname) virtual_opendir(pathname TSRMLS_CC) #define VCWD_POPEN(command, type) virtual_popen(command, type TSRMLS_CC) #define VCWD_ACCESS(pathname, mode) virtual_access(pathname, mode TSRMLS_CC) #if HAVE_UTIME #define VCWD_UTIME(path, time) virtual_utime(path, time TSRMLS_CC) #endif #define VCWD_CHMOD(path, mode) virtual_chmod(path, mode TSRMLS_CC) #if !defined(TSRM_WIN32) && !defined(NETWARE) #define VCWD_CHOWN(path, owner, group) virtual_chown(path, owner, group, 0 TSRMLS_CC) #if HAVE_LCHOWN #define VCWD_LCHOWN(path, owner, group) virtual_chown(path, owner, group, 1 TSRMLS_CC) #endif #endif #else #define VCWD_GETCWD(buff, size) getcwd(buff, size) #define VCWD_FOPEN(path, mode) fopen(path, mode) #define VCWD_OPEN(path, flags) open(path, flags) #define VCWD_OPEN_MODE(path, flags, mode) open(path, flags, mode) #define VCWD_CREAT(path, mode) creat(path, mode) /* rename on windows will fail if newname already exists. MoveFileEx has to be used */ #if defined(TSRM_WIN32) # define VCWD_RENAME(oldname, newname) (MoveFileEx(oldname, newname, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED) == 0 ? -1 : 0) #else # define VCWD_RENAME(oldname, newname) rename(oldname, newname) #endif #define VCWD_CHDIR(path) chdir(path) #define VCWD_CHDIR_FILE(path) virtual_chdir_file(path, chdir) #define VCWD_GETWD(buf) getwd(buf) #define VCWD_STAT(path, buff) php_sys_stat(path, buff) #define VCWD_LSTAT(path, buff) lstat(path, buff) #define VCWD_UNLINK(path) unlink(path) #define VCWD_MKDIR(pathname, mode) mkdir(pathname, mode) #define VCWD_RMDIR(pathname) rmdir(pathname) #define VCWD_OPENDIR(pathname) opendir(pathname) #define VCWD_POPEN(command, type) popen(command, type) #if defined(TSRM_WIN32) #define VCWD_ACCESS(pathname, mode) tsrm_win32_access(pathname, mode) #else #define VCWD_ACCESS(pathname, mode) access(pathname, mode) #endif #define VCWD_REALPATH(path, real_path) tsrm_realpath(path, real_path TSRMLS_CC) #if HAVE_UTIME # ifdef TSRM_WIN32 # define VCWD_UTIME(path, time) win32_utime(path, time) # else # define VCWD_UTIME(path, time) utime(path, time) # endif #endif #define VCWD_CHMOD(path, mode) chmod(path, mode) #if !defined(TSRM_WIN32) && !defined(NETWARE) #define VCWD_CHOWN(path, owner, group) chown(path, owner, group) #if HAVE_LCHOWN #define VCWD_LCHOWN(path, owner, group) lchown(path, owner, group) #endif #endif #endif #endif /* VIRTUAL_CWD_H */ PK!sʡ  acconfig.hnu[#undef PTHREADS PK!T?==TSRM.hnu[PK!4: stsrm_config.hnu[PK!Ylltsrm_config_common.hnu[PK!C !readdir.hnu[PK!Ji"tsrm_strtok_r.hnu[PK!^hh 7#tsrm_nw.hnu[PK!Hgg(tsrm_config.w32.hnu[PK!ɶ< < *tsrm_win32.hnu[PK!/i,..7tsrm_virtual_cwd.hnu[PK!sʡ  gacconfig.hnu[PK ig