You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.
How to find current page URL
$pageURL = $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
getting error "Notice: Undefined offset"
System\Web\HttpContext::$Current->Request->Url->AbsoluteUri;
getting error "Notice: An empty variable used as an object"
The text was updated successfully, but these errors were encountered:
I am writing output Filter for Apache 2.4 web server, when I am running this with Apache then getting
"Notice: Undefined offset (SERVER_NAME). Notice: Undefined offset (SERVER_PORT). Notice: Undefined offset (REQUEST_URI)."
Can you run a script which outputs the $_SERVER variable via print_r() to try to figure-out the relevant keys. ASP.NET is not meant to operate as an Apache output filter by default, and Phalanger less-so. The $_SERVER variable is set from the environment variables set by Apache so if the hostname wasn't set by Apache then Phalanger cannot know what to set $_SERVER['SERVER_NAME'] to internally.
@sandeepsri Phalanger's development is mostly discontinued in favor of PeachPie, the more modern compiler and runtime that also targets .NET Core. Please feel free to give that a try. @diddledan already knows about it :)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
How to find current page URL
$pageURL = $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
getting error "Notice: Undefined offset"
System\Web\HttpContext::$Current->Request->Url->AbsoluteUri;
getting error "Notice: An empty variable used as an object"
The text was updated successfully, but these errors were encountered: