#46965 [Opn->WFx]: realpath_cache is disabled when safe_mode or open_basedir is enabled

From: Date: Thu, 01 Jan 2009 19:42:30 +0000
Subject: #46965 [Opn->WFx]: realpath_cache is disabled when safe_mode or open_basedir is enabled
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-132486@lists.php.net to get a copy of this message
ID: 46965 Updated by: iliaa@php.net Reported By: phpbugs at bsdchicks dot com -Status: Open +Status: Wont fix Bug Type: Safe Mode/open_basedir Operating System: * PHP Version: 5.2.8 New Comment: Real path cache would make some checks unreliable. If you are using SuExec or FastCGI you don't need open_basedir, you can use file system permissions to implement access limitations much faster & more reliably. Previous Comments: ------------------------------------------------------------------------ [2008-12-29 21:16:36] phpbugs at bsdchicks dot com Description: ------------ Having a lot of performance issues on FreeBSD caused an investigation into realpath_cache. It turns out the cache is disabled when safe mode or open basedir are enabled. However, in a client's configuration, with FastCGI and SuExec, realpath_cache poses no security threat. With this cache, performance is greatly improved. It should be optional to override the decision to disable the cache. Reproduce code: --------------- /* Disable realpath cache if safe_mode or open_basedir are set */ if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) { CWDG(realpath_cache_size_limit) = 0; } Expected result: ---------------- N/A Actual result: -------------- N/A ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46965&edit=1

« previous php.bugs (#132486) next »