Results 1 to 3 of 3
Sep 17, 2008, 13:37 #1
$_SERVER not populated when using Eclipse PDT with xdebug
I'm trying to set up PHP debugging using Eclipse PDT and xdebug. I'm temptingly close: I can step though a simple test script successfully.
However, when I try to debug my actual website I hit a problem. The $_SERVER array doesn't have all its usual variables populated when debugging, and my scripts rely on them. It's fine when I run the page normally.
A var_dump($_SERVER) when debugging shows that it's not completely empty; it has the following variables set to appropriate values:
Does anyone have any idea what how I might get the usual DOCUMENT_ROOT, REQUEST_URI etc in there during a debug session?
I'm using Windows XP, Apache 2.2, PHP 5.2.6, Eclipse 3.3.2 and xdebug 2.0.3-5.2.5
Sep 17, 2008, 15:57 #2
- Join Date
- Feb 2008
- Atlit, Israel
- 0 Post(s)
- 0 Thread(s)
Hmm.. I'm not sure as I never used debugging for PHP, but does x debug use Apache somehow?Learn about the new Retro Framework
Code PHP the way it was meant to be coded!
Sep 17, 2008, 17:34 #3
Using PHP thought the command-line is different then running though a server like Apache. $_SERVER will not contain those things that are associated with a server. (REQUEST_URI, DOCUMENT_ROOT, HTTP_*)Logic without the fatal effects.
All code snippets are licensed under WTFPL.