Hi,
I am running Ubuntu 12.04 with PHP 5.5.9 and XCache 3.1.0.
Two of my virtual hosts have Joomla installations which use __DIR__ in a require() statement in libraries/composer_autoload.php, line 22. The users userA and userB associated with the virtual hosts cannot reach each other's files. The files are in
/home/userA/http/libraries/ClassLoader.php
/home/userB/http/libraries/ClassLoader.php
I am now getting the following error when accessing userA's site:
Warning: require(/home/userB/http/libraries/ClassLoader.php): failed to open stream: Permission denied in /home/userA/http/libraries/composer_autoload.php on line 22
Fatal error: require(): Failed opening required '/home/userB/http/libraries/ClassLoader.php' (include_path='.:/usr/share/php:/usr/share/pear') in /home/userA/http/composer_autoload.php on line 22
I suppose this is because userB's site was accessed before, so that __DIR__/ClassLoader.php turned into /home/userB/http/libraries/ClassLoader.php, which was then stored in the cache. Since userA's composter_autoload.php file is identical to userB's, it will try to require() userB's file.
Is my suspicion correct? Can I do anything against this (e.g. simple fix, or bug report instead)?
In the XCache Changelog, I saw that a __DIR__ and __FILE__ bug was fixed in 3.1.0. This seems to be a different problem, though, since I'm already using 3.1.0.
Your help is greatly appreciated!
Thanks,
Peter