Those programs need to see a host in your hosts.conf before they
will attempt communications. This keeps people from feeding it
random host=
settings, which would annoy others with outgoing
connection attempts from your system.
If your hosts.conf(5) turns out to be configured correctly with
proper MONITOR
entries and all that, check the permissions. Your web
server may be running the CGI programs as a user that can’t read
the file.
If you run your web server in a chroot jail, make sure the programs
can still read hosts.conf
. You may have to copy it into the jail
for this to work. If you do that, make sure it’s not writable by
any of the user accounts which run inside the jail.