{"action":"created","issue":{"url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2569","repository_url":"https://api.github.com/repos/symphonycms/symphony-2","labels_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2569/labels{/name}","comments_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2569/comments","events_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2569/events","html_url":"https://github.com/symphonycms/symphony-2/issues/2569","id":139372277,"number":2569,"title":"getenv() not preferred over $_SERVER due to varying host implementations","user":{"login":"neosatus","id":17725395,"avatar_url":"https://avatars.githubusercontent.com/u/17725395?v=3","gravatar_id":"","url":"https://api.github.com/users/neosatus","html_url":"https://github.com/neosatus","followers_url":"https://api.github.com/users/neosatus/followers","following_url":"https://api.github.com/users/neosatus/following{/other_user}","gists_url":"https://api.github.com/users/neosatus/gists{/gist_id}","starred_url":"https://api.github.com/users/neosatus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neosatus/subscriptions","organizations_url":"https://api.github.com/users/neosatus/orgs","repos_url":"https://api.github.com/users/neosatus/repos","events_url":"https://api.github.com/users/neosatus/events{/privacy}","received_events_url":"https://api.github.com/users/neosatus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2016-03-08T19:31:59Z","updated_at":"2016-03-08T21:19:41Z","closed_at":null,"body":"I started setting up Symphony for the first time today on my host, NearlyFreeSpeech. Everything went smoothly until it came time to login to the admin panel. First, no CSS was loading and second, upon logging in, the domain dropped off the url and my url bar only held /admin/login. Mousing over the \"retrieve password\" link verified that the domain variable was null.\r\n\r\nThe domain variable is set in /symphony/lib/boot/defines.php and uses getenv('HTTP_HOST') to get the domain. However, NearlyFreeSpeech doesn't pass HTTP_HOST to the Environment. I was able to get it working thanks to @siimsoni in the Symphony2 chat by hard coding a setenv call at the top of index.php. \r\n\r\nI had also made a post on my host's support forum about the issue and they advised never to use getenv() over $_SERVER for precisely the issue I ran into today: some hosts don't pass all of the $_SERVER variables into the environment. The developers in the chat seemed to think it was worth considering ditching getenv() for $_SERVER in all cases and asked me to write this issue report."},"comment":{"url":"https://api.github.com/repos/symphonycms/symphony-2/issues/comments/193972452","html_url":"https://github.com/symphonycms/symphony-2/issues/2569#issuecomment-193972452","issue_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2569","id":193972452,"user":{"login":"nitriques","id":771169,"avatar_url":"https://avatars.githubusercontent.com/u/771169?v=3","gravatar_id":"","url":"https://api.github.com/users/nitriques","html_url":"https://github.com/nitriques","followers_url":"https://api.github.com/users/nitriques/followers","following_url":"https://api.github.com/users/nitriques/following{/other_user}","gists_url":"https://api.github.com/users/nitriques/gists{/gist_id}","starred_url":"https://api.github.com/users/nitriques/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nitriques/subscriptions","organizations_url":"https://api.github.com/users/nitriques/orgs","repos_url":"https://api.github.com/users/nitriques/repos","events_url":"https://api.github.com/users/nitriques/events{/privacy}","received_events_url":"https://api.github.com/users/nitriques/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T21:19:41Z","updated_at":"2016-03-08T21:19:41Z","body":"@jdwx  how did you deactivate the getenv call ?"}}