Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
makeRelative in \statamic\core\API\Path.php #1102
The function makeRelative() in Path.php is supposed to take a file path to a web page, such as c:\internet\www.mysite.com\myfile and turn it into a relative path like \myfile by removing the part of the path that is the root of the web directory (represented by the variable BASE).
When running in IIS, the path is deformed and the string substitution does not work. It was made to work by commenting out the first line: $path = self::resolve($path);
Other people running the same software in a LAMP environment do not have this problem, so my assumption is that this is related to the Windows file path structure.
However, I don't know if this fix could cause other problems.
Steps to reproduce
Updated from an older Statamic or fresh install:
List of installed addons:
If any logs (browser, server, or Statamic) are appropriate...
Just a quick FYI... I've been having long time issues on Windows MAMP Pro (sorry I haven't reported), and commenting out line 20 in Path.php finally made Statamic work. Hope that helps in some way.
However, the installer has never worked, and still doesn't -- having this same problem: #888
I'll try to open my own issue and provide more info there.