NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Debugger : $_SERVER['DOCUMENT_ROOT']


Joined: 23 Nov 2006
Posts: 48
Location: Netherlands
Reply with quote
since i've updated my nusphere to build 4634 the debugger doesn't handle the DOCUMENT_ROOT correctly

i've changed the root of the webserver to a sub directory of the project

Settings -> Tools -> SRV web server -> default home directory

but the DOCUMENT_ROOT keeps set to the root of the project

can anyone help me on this problem?
View user's profileFind all posts by MacVatoSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
SRV web server "root" is tightly bound to the project root. What you changed make sense for the cases when you run scripts without any projects. For the rest cases, project root is taken.
If your project is designed so that its root is avove the web root, I'd recommend to use Apache or IIS instead of SRV.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 23 Nov 2006
Posts: 48
Location: Netherlands
Reply with quote
hi dmitri,

is this a change? cause in the previous version i was using the document root was set as the SRV web root.
View user's profileFind all posts by MacVatoSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Right. It is a change we did in v.4.6.
It uses own Root directory setting only if no projects are selected. Otherwise it always takes project's root.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 23 Nov 2006
Posts: 48
Location: Netherlands
Reply with quote
Hi Dmitri,

is it possible to make it optional? we like the srv for debugging but now we are stuck to older versions of phped.
View user's profileFind all posts by MacVatoSend private messageVisit poster's website
Guru master

Joined: 05 Jul 2004
Posts: 659
Location: Belgium
Reply with quote
Hey MacVato,

There's a great function in PHP that is called a prepend file.
If you set the entry
auto_prepend_file = <some path and filename>
in the php.ini from PhpEd, it will execute this php file first before starting your real code.
All you need to do is put one line of code in there:
Code:
<? $_SERVER['DOCUMENT_ROOT'] = 'youroldpath'; ?>

That will fix your issues.
View user's profileFind all posts by BlizzSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
probably document_root is not the only `thing` Smile
seems he's looking for a way to run his script with an url that contains path different than the project's relative path.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 23 Nov 2006
Posts: 48
Location: Netherlands
Reply with quote
yeah i need most of the $_SERVER variables,

so is it possible to make it an option for the SRV so that all variables are based on the chosen root instead of the project root?
View user's profileFind all posts by MacVatoSend private messageVisit poster's website
Debugger : $_SERVER['DOCUMENT_ROOT']
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic