- Added "consumed" stream filter. (Marcus)
- Added new mysqli constants for BIT and NEW_DECIMAL field types:
MYSQLI_TYPE_NEWDECIMAL and MYSQLI_TYPE_BIT. FR #36007. (Georg)
+- Fixed bug #36016 (realpath cache memleaks). (Dmitry, Nuno)
- Fixed bug #36011 (Strict errormsg wrong for call_user_func() and the likes).
(Marcus)
- Fixed bug #35998 (SplFileInfo::getPathname() returns unix style filenames
}
}
-//static inline
-realpath_cache_bucket* realpath_cache_find(const char *path, int path_len, time_t t TSRMLS_DC)
+static inline realpath_cache_bucket* realpath_cache_find(const char *path, int path_len, time_t t TSRMLS_DC)
{
unsigned long key = realpath_cache_key(path, path_len);
unsigned long n = key % (sizeof(CWDG(realpath_cache)) / sizeof(CWDG(realpath_cache)[0]));
CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path, int use_realpath);
-#define REALPATH_CACHE
#define REALPATH_CACHE_TTL (2*60) /* 2 minutes */
#define REALPATH_CACHE_SIZE 0 /* disabled while php.ini isn't loaded */
-#ifdef REALPATH_CACHE
typedef struct _realpath_cache_bucket {
unsigned long key;
char *path;
time_t expires;
struct _realpath_cache_bucket *next;
} realpath_cache_bucket;
-#endif
typedef struct _virtual_cwd_globals {
cwd_state cwd;
-#ifdef REALPATH_CACHE
long realpath_cache_size;
long realpath_cache_size_limit;
long realpath_cache_ttl;
realpath_cache_bucket *realpath_cache[1024];
-#endif
} virtual_cwd_globals;
#ifdef ZTS
STD_PHP_INI_BOOLEAN("allow_url_fopen", "1", PHP_INI_SYSTEM, OnUpdateBool, allow_url_fopen, php_core_globals, core_globals)
STD_PHP_INI_BOOLEAN("always_populate_raw_post_data", "0", PHP_INI_SYSTEM|PHP_INI_PERDIR, OnUpdateBool, always_populate_raw_post_data, php_core_globals, core_globals)
-#ifdef REALPATH_CACHE
STD_PHP_INI_ENTRY("realpath_cache_size", "16K", PHP_INI_SYSTEM, OnUpdateLong, realpath_cache_size_limit, virtual_cwd_globals, cwd_globals)
STD_PHP_INI_ENTRY("realpath_cache_ttl", "120", PHP_INI_SYSTEM, OnUpdateLong, realpath_cache_ttl, virtual_cwd_globals, cwd_globals)
-#endif
PHP_INI_END()
/* }}} */