|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-10-04 07:42 UTC] joris at phasetwo dot be
Description: ------------ On a hosting environement with multiple virtual hosts, we noticed that APC 'sometimes' uses the cache for a different file with the same basename. Eg, /host1/index.php is cached, and that cache is used for /host2/index.php. This naturally causes some highly undesireable effects. When this happens, it is repeatable for the same file over and over again (eg, hitting refresh still shows the cache for the wrong file being run). Clearing the cache by restarting the webserver (apache 1.3) solves the situation. As far as I know, there is no reliable way to reproduce this bug, apart from brute tryout. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 01:00:01 2025 UTC |
I too am experiencing this same issue. Our setup is as follows: /var/www/vhosts/site1/httpdocs/common.php /var/www/vhosts/site1/httpdocs/index.php /var/www/vhosts/site1/httpdocs/includes/prepend.inc.php /var/www/vhosts/site1/httpdocs/includes/configuration.inc.php /var/www/vhosts/site2/httpdocs/common.php /var/www/vhosts/site2/httpdocs/index.php /var/www/vhosts/site2/httpdocs/includes/prepend.inc.php /var/www/vhosts/site2/httpdocs/includes/configuration.inc.php The two common.php files are hard-linked to each other (same inode). The two index.php files are hard-linked to each other (same inode). The two prepend.inc.php files are hard-linked to each other (same inode). The two configuration.inc.php files are unique (different inodes). index.php contains: require('common.php'); common.php contains: require('includes/prepend.inc.php'); prepend.inc.php contains: require(dirname(__FILE__) . '/configuration.inc.php'); configuration.inc.php defines some constants, such as: define ('__DOCROOT__', '/var/www/vhosts/site1/httpdocs'); Our issue is that after restarting Apache with APC active, and we hit site1, everything works, but then, hitting site2, we find that __DOCROOT__ is defined as /var/www/vhosts/site1/httpdocs rather than /var/www/vhosts/site2/httpdocs, which it would be if APC were not active. This makes me believe that APC has issues with some combination of: 1) Hard-linked files including non-linked files 2) Virtual hosts with similar filenames 3) Constants defined during seperate page hits Unfortunately, this is a production server, and we can not afford the down-time to debug this issue further.