Hello,
When I enable the "hostname lookups" at the feature options of SMF 1.1rc3
I'm having an error log "Invalid query name 1" at my apache error logs.
Any idea how to fix this?
thanks.
Is there anything in your SMF log errors?
no error logs at SMF ...
Quote from: shads on September 17, 2006, 12:32:03 AM
no error logs at SMF ...
I have the same problem :-\
No more information ... strange ! Someone have an idea?
Which version are you running of SMF?
Quote from: IchBin™ on January 06, 2007, 04:11:18 PM
Which version are you running of SMF?
Always the last one.
For information my installation is a migration from IPB v1.3 to SMF 1.1 ;)
SMF uses a function called host_from_ip in the Subs.php which should hopefully correctly handle this.
you can tweak this yourself possible to get it to work.
Since I think you are using a linux server you would only need to change the first part..
I believe if you add at the top just after the global line this:
$modSettings['host_to_dis'] = 1;
It should make it work.
It doesn't work. Instead of "invalid query" I have with this :
"XX.XX.XX.XX does not exist, try again"
But If I comment all and juste use :
// This is the last try :/.
if (!isset($host) || $host === false)
$host = @gethostbyaddr($ip);
It's work !
But why 'resolv' ? it's for what?
In my log or "WhoIs" all adresses displayed is numerical....
altern,
Glad it is working one way for you
Can you tell me your version of php and apache? as well if you are using linux or not and what os and version of it.
Of course.
I'm running on Linux Debian Sarge, so :
apache: Apache/1.3.33 (Debian GNU/Linux) mod_gzip/1.3.26.1a PHP/4.3.10-18 mod_ssl/2.8.22 OpenSSL/0.9.7e
php: PHP Version 4.3.10-18
Perfect timing for this thread... I upped to 1.1.1 over the newyear, and guess what I spend the afternoon pulling out my hair over today? rickin frickin I screwed up a reference to a nonexistent query when a new session is instantiated somewhere... no, wait, it occurs on an interval even with an existing session, and it's in a global function. whytf can't I trap this, lol...
SleePy nailed the cause. Fix was as Altern did. And like I said... perfect timing :)
PHP 4.4.0, Apache/2.0.54 (Debian)
The resolution WAS working, btw... so this was the last thing I'd ever consider.
Quote from: altern on January 08, 2007, 03:39:53 AM
But If I comment all and juste use :
// This is the last try :/.
if (!isset($host) || $host === false)
$host = @gethostbyaddr($ip);
It's work !
What do you mean you "comment all"?
Tnx !!!
Quote from: zepfms on February 25, 2007, 05:33:21 AM
Quote from: altern on January 08, 2007, 03:39:53 AM
But If I comment all and juste use :
// This is the last try :/.
if (!isset($host) || $host === false)
$host = @gethostbyaddr($ip);
It's work !
What do you mean you "comment all"?
Tnx !!!
Just leave this two line, and it's fine.
So since laster upgrade, I have not the problem. So no comment at all.
Thanks altern !!!
This error is being caused by the "host" command. I don't believe that the original host command works as expected.
Installing the BIND9 version of this utility should solve this issue
apt-get remove host
apt-get install bind9-host
The code in "host" that is causing this error is in main.c, line 1379:
/*
* Check for incompatible options.
*/
/* cannot have dotted quad in listmode */
if (listmode && (queryaddr != NOT_DOTTED_QUAD))
{
errmsg("Invalid query name %s", queryname);
return(EX_USAGE);
}
/* must have regular name or dotted quad in addrmode */
if (!listmode && addrmode && reverse)
{
errmsg("Invalid query name %s", queryname);
return(EX_USAGE);
I can definately duplicate it, though...
Using the BIND9 host command:
daniel@daniel-laptop:/usr/local/src/host-20000331$ host -W 1 60.241.80.44
44.80.241.60.in-addr.arpa domain name pointer server.daniel15.com.
Using the old one:
daniel@daniel-laptop:/usr/local/src/host-20000331$ ./host -W 1 60.241.80.44
Invalid query name 1
Thanks Daniel,
I was using the old host command it seems the error is fixed now.
Removing the older host package also removes dnsutils (nslookup, dig, etc) so they need to be reinstalled with
apt-get install dnsutils
Thank you Google and Daniel15, i got exact same issue in Debian server. Fixed :D
You're welcome :)
I didn't know it was still an issue :P
Yepp, still is an issue. Fixed it with a quick Google search that brought me here. ^.^ Thanks!