Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

makeRelative in \statamic\core\API\Path.php #1102

Closed
jason-macki opened this issue Nov 10, 2016 · 3 comments
Closed

makeRelative in \statamic\core\API\Path.php #1102

jason-macki opened this issue Nov 10, 2016 · 3 comments

Comments

@jason-macki
Copy link

Expected behaviour

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).

Actual behaviour

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

  1. Try to run Statamic in Windows IIS

Server configuration

Operating system:
Windows

Web server:
IIS

PHP version:
7

Statamic version:
v2

Updated from an older Statamic or fresh install:

List of installed addons:

Logs

If any logs (browser, server, or Statamic) are appropriate...

Add those logs here
@jasonvarga
Copy link
Member

jasonvarga commented Nov 10, 2016

We got your private ticket about this and we've been waiting for your response. Did you miss that email?

@jason-macki
Copy link
Author

Yes, it was in my junk mail folder. I have since replied.

@addisonhall
Copy link

addisonhall commented Nov 10, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants