Content Root / Document Root - Not Working

I'm not sure what I did, but I have a project that is suddenly ignoring the Content Root setting. The project root is 

C:\inetpub\hairbydanieledavis.com2

The Content Root is set to 

C:\inetpub\hairbydanieledavis.com2\src

I am getting warnings about these 2 includes:

require_once $_SERVER["DOCUMENT_ROOT"]."/vendor/autoload.php";
require_once $_SERVER["DOCUMENT_ROOT"]."/library/autoloader.php";

When I hover over them, I can see that DOCUMENT_ROOT is not set to "C:\inetpub\hairbydanieledavis.com2\src"

 

This was working, but I made a change (because for some reason node_modules is being hidden, yet still being Inspected), and now this is longer working.

I did Invalidate Caches (and restarted). Any idea what is causing this?

0
5 comments
Avatar
Permanently deleted user

Hello,

Can you see any errors in Help > Show Log in Explorer > idea.log file ?

Please try to disable any custom plugins from 3rd-party developers and check if this will help.

0

There are always errors in idea.log. :) I don't see any that are applicable to this issue, but who knows.

"custom plugins from 3rd-party developers"

Like those not from the PHPStorm online repo of plugins or those too?

 

 

 

0

> Any idea what is causing this?

It's just not implemented, $_SERVER["DOCUMENT_ROOT"] is always resolved to the project root.
Please vote: https://youtrack.jetbrains.com/issue/WI-35064

0

Wow. What is the point of being able to change the content root then?

0

:) I've already voted for that issue, I guess I just forgot.

0

Please sign in to leave a comment.