php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46965 realpath_cache is disabled when safe_mode or open_basedir is enabled
Submitted: 2008-12-29 21:16 UTC Modified: 2009-01-01 19:42 UTC
Votes:3
Avg. Score:5.0 ± 0.0
Reproduced:3 of 3 (100.0%)
Same Version:2 (66.7%)
Same OS:1 (33.3%)
From: phpbugs at bsdchicks dot com Assigned:
Status: Wont fix Package: Safe Mode/open_basedir
PHP Version: 5.2.8 OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-12-29 21:16 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-01 19:42 UTC] iliaa@php.net
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.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Apr 19 18:01:24 2021 UTC