phpstorm doesn't set $_SERVER['DOCUMENT_ROOT'] in debug Permanently deleted user 创建于 2011年02月02日 19:42 phpstorm doesn't set $_SERVER['DOCUMENT_ROOT'] in debug. Even if set custorm woking directory in debug(run) configuration
These values supposed to be set by web server not by debugger or IDE.
If you run a simple test file (which prints results of phpinfo(); ), you will see that $_SERVER['DOCUMENT_ROOT'] entry has no value when run in CLI mode.
If you want such functionality to be implemented in PhpStorm -- you are welcome to leave feature request/bug report here: http://youtrack.jetbrains.net/issues/WI#newissue=yes
Hello Vasiliy,
What value supposed to be? This value is not controlled by IDE.
Probably it is a kind of feature request, so please elaborate.
Thank you for feedback!
Andriy,
Thank you for your help!:)
I just set it myself. I use a bootstrap file and have this line in it:
$_SERVER["DOCUMENT_ROOT"] = str_replace("\\phpunit", "", __DIR__)."\\";
Of course, that is with my phpunit folder as one level deep in my project:
c:\Intranet_Local is the project
c:\Intranet_Local\phpunit is the phpunit directory.
Keith,
Thanks for sharing!