Ticket #166 (closed Bug: worksforme)

Opened 13 months ago

Last modified 13 months ago

Bug in include_paths

Reported by: Maxximus Owned by: Shadowhand
Priority: trivial Milestone: 2.0
Component: Core Version: SVN HEAD
Keywords: Cc:

Description

in system/core/Config.php line 145. if (($path = str_replace('\\', '/', realpath($path))) == ) Use of realpath will not work for relative paths when PHP include path is not including the path to application. This works for me: if (($path = str_replace('\\', '/', realpath(APPPATH.$path))) == ) but this means it must always be relative to APPATH.

Change History

Changed 13 months ago by Shadowhand

realpath() will always return an absolute path, even when used on a relative path.

Changed 13 months ago by Shadowhand

  • owner set to Shadowhand
  • status changed from new to assigned

Changed 13 months ago by Maxximus

  • priority changed from major to trivial
  • status changed from assigned to closed
  • resolution set to worksforme

Well it needs to be relative to something... It will use the starting script directory as starting point, after that php include_path as starting point. So it works fine if you use the relative path starting from front-controller (not from application).

Changed 13 months ago by Shadowhand

Correct. Glad we got that sorted out!

Note: See TracTickets for help on using tickets.