New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
4 participants
@jason-macki

jason-macki commented Nov 10, 2016

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

This comment has been minimized.

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

This comment has been minimized.

jason-macki commented Nov 10, 2016

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

@addisonhall

This comment has been minimized.

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 join this conversation on GitHub. Already have an account? Sign in to comment