I am debugging with xdebug and Aptana, when xdebug reaches this:
if ($_SERVER["SERVER_PORT"] != "80") {
$url = $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$url = $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
I get :
Error: [8] Undefined index: SERVER_PORT
is this some configuration issue in WAMP? Or does the issue lie in xdebug?
This is not something that Xdebug causes, but your PHP install. PHP is bascially telling you that the $_SERVER variable doesn’t exist. And as comments already said, that is because you are not running in a webserver environment. You need to debug through your web server in order for this to work – but I’m not sure if Aptana can do that.