Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#257 closed defect (fixed)

__DIR__ value cached incorrectly when using opcode caching

Reported by: JoyceBabu Owned by: moo
Priority: minor Milestone: 2.0.0
Component: cacher Version: 2.0.0
Keywords: Cc:
Application: PHP Version:
Other Exts: SAPI: apache2handler
Probability: Always Blocked By:

Description (last modified by moo)

__DIR__ value is being cached incorrectly when using opcode caching

I have a file at /path/to/root/test/prepend.php with the following code

echo __DIR__ . '/../prepend.php';
The file is included from /path/to/root/test/index.php and /path/to/root/test/inner/index.php. The expected out (and the output when XCache is disabled) is '/path/to/root/test/../prepend.php'. When I access any of the above two files, the first request returns the expected output. From the second request onwards, the value of __DIR__ is cached (the cached value is the relative path of /path/to/root/test/ from the requested file (ie '.' or '..'), which is also wrong). 

Change History (3)

comment:1 Changed 8 years ago by moo

  • Description modified (diff)

comment:2 Changed 7 years ago by moo

  • Resolution set to fixed
  • Status changed from new to closed

multiple changes is done in svn trunk and should have been fixed.

comment:3 Changed 7 years ago by moo

  • Milestone changed from 2.2.0 to 2.0.0
Note: See TracTickets for help on using tickets.