From: Ilia Alshanetsky Date: Tue, 16 May 2006 00:40:36 +0000 (+0000) Subject: MFB: Disable realpath cache when open_basedir or safe_mode are enabled on a X-Git-Tag: BEFORE_NEW_OUTPUT_API~188 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ac333f624aa477e6b47099fd3df3aca8a32fe29;p=php MFB: Disable realpath cache when open_basedir or safe_mode are enabled on a per-request basis. --- diff --git a/main/main.c b/main/main.c index d67a80155b..0fc8da9940 100644 --- a/main/main.c +++ b/main/main.c @@ -1197,6 +1197,11 @@ int php_request_startup(TSRMLS_D) zend_set_timeout(PG(max_input_time)); } + /* Disable realpath cache if safe_mode or open_basedir are set */ + if (PG(open_basedir) && *PG(open_basedir)) { + CWDG(realpath_cache_size_limit) = 0; + } + if (PG(expose_php)) { sapi_add_header(SAPI_PHP_VERSION_HEADER, sizeof(SAPI_PHP_VERSION_HEADER)-1, 1); }