News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

"Invalid query name 1" apache error log

Started by shads, September 16, 2006, 11:57:01 PM

Previous topic - Next topic

shads

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.

jerm


shads


altern

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?

IchBin™

IchBin™        TinyPortal

altern

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 ;)

SleePy

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.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

altern

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....

SleePy

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.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

altern

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

Smurfbutcher Bob

#10
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.

zepfms

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 !!!

altern

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.

zepfms


Daniel15

#14
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
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

viulian

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

Owdy

Thank you Google and Daniel15, i got exact same issue in Debian server. Fixed :D
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Daniel15

You're welcome :)
I didn't know it was still an issue :P
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

ʟink

Yepp, still is an issue. Fixed it with a quick Google search that brought me here. ^.^ Thanks!
Obedire est vivere, Vivere est obedire


Advertisement: