I'm answering to this old thread because i had this issue and i can't access the last link in this thread, though i think the reasons of the issue are slightly different than mine.
I have 2 joomla sites on my server, though they are on 2 different domains and they can't use each other's files, whenever i reset my server only the first site i open will work, the other won't because it will be looking for files on the other domain's folder. For example, if i use the site in /var/www/site1 first and then go to /var/www/site2, i will see this error in the site2 logs
PHP Warning: require(): open_basedir restriction in effect. File(/var/www/site1/libraries/rokcommon/RokCommon/Composite.php) is not within the allowed path(s): (/var/www/site2:/usr/share/php) in /var/www/site2/libraries/rokcommon/RokCommon/ClassLoader/ApcLoader.php on line 37
This is because the first site has saved the class with its path and the 2nd (being a copy of the 1st) will look for the same file in the cache. I have temporarly solved by changing line 20 in ApcLoader.php:
$this->prefix = $prefix; => $this->prefix = md5($_SERVER["DOCUMENT_ROOT"]).$prefix;
So every site will have its own prefix.
I have realized that you can just edit the "secret" variable in configuration.php, still i think there should be some way to build a prefix based on the current site rather than counting on certain variables