host: '' is not a legal name (unexpected end of input)
Ever since starting to play with elk I see this message in my apache error logs quite often
"host: '' is not a legal name (unexpected end of input)"
I figured it was Elk doing it so I just did a clean install of beta 2, went to the front page, logged out and hit reload. The error appeared. Now I can sit and click reload and it appears in the log randomly.
I've also seen this in the version I was tinkering on while I was logged into an account so I don't think the login state actually matters.
Re: host: '' is not a legal name (unexpected end of input)
Reply #1 –
In my cursory search of that error, it indicates an error in the server. Assuming apache is trying to use 'host' to do a host lookup or something. Not exactly sure, but just something I figured I'd put out there. Doesn't happen on my server.
Re: host: '' is not a legal name (unexpected end of input)
Reply #2 –
Huh. Never saw it on the same server with SMF. When I searched google for it the references I saw pointed to AJAX errors. But if it is the server so be it.
Can you point me to the places stating it's a server error please so I can see what's going on?
Re: host: '' is not a legal name (unexpected end of input)
Reply #4 –
Ah ok. Yes I can replicate the error message on the command line with the host command. Thank you very much to both you and IchBin.
Now I need to find where in apache or php the "host" command is being called I suppose.
Do you happen to know if Elk calls that somewhere?
Re: host: '' is not a legal name (unexpected end of input)
Reply #6 –
I do think I eventually disabled that setting in SMF. If you'd like to tell me where in the Elk code the call is made and I can put in some print statements to see what's happening. My local test server may indeed be configured somewhat incorrectly. It's not a public facing server.
That's actually the reason I've not reported a little bug that everytime I install elk the theme settings are wrong so it comes up with no theme and I have to go into admin and reset it. I suppose these might be related.
Re: host: '' is not a legal name (unexpected end of input)
Reply #7 –
mmm... what is wrong in the db? The URLs or the paths?
Re: host: '' is not a legal name (unexpected end of input)
Reply #10 –
Seems safe enough to add that, not sure why its getting called with nothing, but safe to add. Could also do empty || 127.0.0.1 and just return or 127.0.0.1 => localhost, no need to run host for that.
Re: host: '' is not a legal name (unexpected end of input)
Reply #14 –
That's another possibility, though host_from_ip is used in a couple of other places and reading the code it may be that both the two ip are empty (no idea if it is a "real" case or just an hypothetical one), so I'd delegate the check for empty IP to host_from_ip.