Advertisement:

Author Topic: "Invalid query name 1" apache error log  (Read 15623 times)

Offline shads

  • Semi-Newbie
  • *
  • Posts: 36
"Invalid query name 1" apache error log
« on: September 16, 2006, 11:57:01 PM »
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.

Offline jerm

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 7,246
Re: "Invalid query name 1" apache error log
« Reply #1 on: September 17, 2006, 12:20:34 AM »
Is there anything in your SMF log errors?

Offline shads

  • Semi-Newbie
  • *
  • Posts: 36
Re: "Invalid query name 1" apache error log
« Reply #2 on: September 17, 2006, 12:32:03 AM »
no error logs at SMF ... 

Offline altern

  • Semi-Newbie
  • *
  • Posts: 16
Re: "Invalid query name 1" apache error log
« Reply #3 on: December 17, 2006, 12:18:10 PM »
no error logs at SMF ... 

I have the same problem  :-\

No more information ... strange ! Someone have an idea?

Offline IchBin™

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,115
  • Gender: Male
  • I don't speak German.
    • IchBin.us
Re: "Invalid query name 1" apache error log
« Reply #4 on: January 06, 2007, 04:11:18 PM »
Which version are you running of SMF?
Brad "IchBin™" Grow        TinyPortal        Themes
Coding Guidelines       

Offline altern

  • Semi-Newbie
  • *
  • Posts: 16
Re: "Invalid query name 1" apache error log
« Reply #5 on: January 07, 2007, 04:42:42 AM »
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 ;)

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,852
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: "Invalid query name 1" apache error log
« Reply #6 on: January 07, 2007, 03:25:23 PM »
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
Support the SMF Support team!
Profiles:
GitHub
G+

Offline altern

  • Semi-Newbie
  • *
  • Posts: 16
Re: "Invalid query name 1" apache error log
« Reply #7 on: January 08, 2007, 03:39:53 AM »
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....

Offline SleePy

  • Site Team Lead
  • SMF Master
  • *
  • Posts: 29,852
  • Gender: Male
  • Thats his happy face.
    • jdarwood007 on GitHub
    • @jdarwood on Twitter
    • SleePy Code - My personal site
Re: "Invalid query name 1" apache error log
« Reply #8 on: January 08, 2007, 10:53:07 AM »
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
Support the SMF Support team!
Profiles:
GitHub
G+

Offline altern

  • Semi-Newbie
  • *
  • Posts: 16
Re: "Invalid query name 1" apache error log
« Reply #9 on: January 08, 2007, 10:59:07 AM »
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

Offline Smurfbutcher Bob

  • Jr. Member
  • **
  • Posts: 141
Re: "Invalid query name 1" apache error log
« Reply #10 on: January 11, 2007, 12:09:08 AM »
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.
« Last Edit: January 11, 2007, 12:11:13 AM by Smurfbutcher Bob »

Offline zepfms

  • Semi-Newbie
  • *
  • Posts: 31
  • Gender: Male
    • apriliabikers Hellas
Re: "Invalid query name 1" apache error log
« Reply #11 on: February 25, 2007, 05:33:21 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 !!!

Offline altern

  • Semi-Newbie
  • *
  • Posts: 16
Re: "Invalid query name 1" apache error log
« Reply #12 on: February 25, 2007, 06:05:24 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.

Offline zepfms

  • Semi-Newbie
  • *
  • Posts: 31
  • Gender: Male
    • apriliabikers Hellas
Re: "Invalid query name 1" apache error log
« Reply #13 on: February 25, 2007, 06:16:28 AM »
Thanks altern  !!!

Offline Daniel15

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,221
  • Gender: Male
  • http://dan.cx/
    • daaniel on Facebook
    • Daniel15 on GitHub
    • daniel15 on LinkedIn
    • @Daniel15 on Twitter
    • Daniel15
Re: "Invalid query name 1" apache error log
« Reply #14 on: February 26, 2007, 05:56:19 AM »
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
Code: [Select]
apt-get remove host
apt-get install bind9-host

The code in "host" that is causing this error is in main.c, line 1379:
Code: [Select]
/*
 * 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:
Code: [Select]
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:
Code: [Select]
daniel@daniel-laptop:/usr/local/src/host-20000331$ ./host -W 1 60.241.80.44
Invalid query name 1
« Last Edit: February 26, 2007, 05:59:45 AM by Daniel15 »
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!

Offline viulian

  • Jr. Member
  • **
  • Posts: 235
    • Hex.ro
Re: "Invalid query name 1" apache error log
« Reply #15 on: December 02, 2007, 04:05:05 AM »
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

Offline Owdy

  • SMF Fossil
  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,589
  • Gender: Male
  • W00t!
    • janoloferiksson on LinkedIn
    • @@jaoler on Twitter
Re: "Invalid query name 1" apache error log
« Reply #16 on: December 06, 2009, 10:21:10 AM »
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

Offline Daniel15

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,221
  • Gender: Male
  • http://dan.cx/
    • daaniel on Facebook
    • Daniel15 on GitHub
    • daniel15 on LinkedIn
    • @Daniel15 on Twitter
    • Daniel15
Re: "Invalid query name 1" apache error log
« Reply #17 on: December 06, 2009, 07:27:01 PM »
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!

Offline ʟink

  • Jr. Member
  • **
  • Posts: 130
  • Gender: Male
  • Hyrule's Defender
    • The Ninja's Hideout
Re: "Invalid query name 1" apache error log
« Reply #18 on: December 13, 2009, 03:01:56 PM »
Yepp, still is an issue. Fixed it with a quick Google search that brought me here. ^.^ Thanks!
Obedire est vivere, Vivere est obedire