← Back to team overview

ius-coredev team mailing list archive

[Bug 723724] Re: APC 3.1.6 does NOT work with relative path in include()

 

Just a quick confirmation that it had the problem with php53u-pecl-
apc-3.1.6, I never tested with php52-pecl-apc-3.16.

The problem we have is related to including identical named files, eg.
'./config.inc.php' in different directories. APC only cached the first
file accessed. Subsequent includes of './config.inc.php' in DIFFERENT
directories used the cached version.

/user1:
config.inc.php
index.php --> /shared/index.php

/user2:
config.inc.php
index.php --> /shared/index.php

/shared/index.php:
<?php
include './config.inc.php';
print_r($config);

/user1/config.inc.php:
<?php
$config = 'user1';

/user2/config.inc.php:
<?php
$config = 'user2';

Updating to 3.1.7, containing the patch you applied, fixed the problem.
No idea why your example gives a different result for 5.2 and 5.3. APC
3.1.7 is now in use on our production cluster since 2 days without
problem (beside the memory-pool warning, which is already reported here
and is independent of using 3.1.6 or 3.1.7).

Ralf

-- 
You received this bug notification because you are a member of IUS Core
Development, which is subscribed to IUS Community Project.
https://bugs.launchpad.net/bugs/723724

Title:
  APC 3.1.6 does NOT work with relative path in include()

Status in IUS Community Project:
  New

Bug description:
  APC 3.1.6 used in php53u-pecl-apc-3.1.6 package suffers from the following bug:
  http://pecl.php.net/bugs/bug.php?id=20529
  It causes includes with relative path to not use getcwd() / current working directory, but the directory of the script issuing the include/require statement. This bug is a real pain to debug, as it causes eratic failure in many php frameworks.
  APC 3.1.7 fixes the bug, so please update the packages to this version, even if it's marked beta, while 3.1.6 is marked stable, but is unusable!



References