apache_rh6x

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



Subject: Argh - apache 1.3.6 not sending $ENV{'REMOTE_HOST'}?
From: "Kevin Hemenway" <info@totalnetnh.net>
Date: Wed, 20 Oct 1999 17:42:10 -0400

Ok. This is my problem. It didn't happen when I was using Apache 1.3.3 on a
RH 5.0 machine. Both machines are using sendmail 8.9.3 with the
"accept_unqualified_senders" NOT enabled. For sendmail, this will spam
filter out people who email without a domain name (ie. "bob@").

This seems to be the cause of my problem.

I have a mailform.cgi script which came from the CGI/Perl Cookbook from Matt
Wright. If a visitor does not put in an email address (or a webdesigner does
not ask for one), the script will put "anonymous@$ENV{'REMOTE_HOST'}" in the
From: field of any email that the script processes.

This was exactly what I wanted and was working marvelously before I upgraded
to RH6 and Apache 1.3.6. Now what happens is that if the visitor does not
put in an email, the script tries to get an anonymous address but ALWAYS
comes back with "anonymous@". It doesn't seem to pick up the REMOTE_HOST.
This is whether I'm coming from a network, a dailup, a firewall, or any of
the major browsers in different versions.

I always get an error from sendmail (?? - this is as far as I can track it
too as I can see the "anonymous@" mail being rejected in my maillog) about
"553 - Domain name required".

Temporarily, I have set it up so that an empty "anonymous@" becomes
"anonymous@<mydomain>", but that's a crappy patch - I'm really interested as
to why it seemed to break.

And I'd rather not release the spam restriction in the sendmail about
unqualified_senders, because if my suspicion about the REMOTE_HOST never
getting sent to Apache to report to the script is correct, then I'll just be
getting emails with From: fields of "anonymous@" which is not what I'm
looking for.

===

Subject: Re: Argh - apache 1.3.6 not sending $ENV{'REMOTE_HOST'}?
From: Jason Costomiris <jcostom@jasons.org>
Date: Wed, 20 Oct 1999 18:22:05 -0400


On Wed, Oct 20, 1999 at 05:42:10PM -0400, Kevin Hemenway wrote:
: I have a mailform.cgi script which came from the CGI/Perl Cookbook from Matt
: Wright. If a visitor does not put in an email address (or a webdesigner does
: not ask for one), the script will put "anonymous@$ENV{'REMOTE_HOST'}" in the
: From: field of any email that the script processes.

$ENV{REMOTE_ADDR} will contain the IP address.

use Socket; will help you a lot.

Really, I *strongly* recommend you write your own CGIs.  Matt Wright was
a nice guy by putting his stuff out there, but he's done the world an
enormous disservice by not maintaining his old, broken down code.  His
stuff doesn't even exploit the hard work done by Lincoln Stein (the guy 
who writes CGI.pm).  Instead, he rolls his own stuff that sort of works,
but isn't terribly useful or extensible.

use Socket;
my $addr = $ENV{REMOTE_ADDR};
my $bin = inet_aton($addr);
my $hostname = gethostbyaddr($bin, AF_INET);

Don't forget to use strict; and run with -Tw.  Personally speaking, if the
script doesn't start with:

#!/usr/bin/perl -Tw

use strict;

it doesn't run on my server.

===

Subject: Re: PHP3/Apache support for MySQL
From: Jason Costomiris <jcostom@jasons.org>
Date: Sat, 6 Nov 1999 11:12:48 -0500


On Sat, Nov 06, 1999 at 01:58:42AM -0500, Charles Galpin wrote:
: I upgraded to 6.1 this evening, and in the process upgraded my
: apache-mod_ssl/php3/mysql setup. Unfortunately I now get an error when
: starting apache:
: 
: Starting httpd: Syntax error on line 242 of /etc/httpd/conf/httpd.conf:
: Cannot load /usr/lib/apache/libphp3.so into server:
: /usr/lib/apache/libphp3.so: undefined symbol: ap_regexec
:                                                            [FAILED]
: 
: Line 242 is
: LoadModule php3_module        /usr/lib/apache/libphp3.so

This may be tied to the apache 1.3.6 apxs problem that exists on RH.

Try popping into the /usr/src/redhat/SOURCES/php-3.0.12 dir, rm libphp3.so
add -lc to the APXS_LDFLAGS..  That's not a familiar symbol problem, but
I seem to recall somewhere that with apache 1.3.6, I had a symbol problem
that was fixed by linking with -lc.  After you make those changes, make
over again, then copy libphp3.so to /usr/lib/apache.  Try starting the 
server again.

: and /usr/lib/apache/libphp3.so exists.
: 
: I built everything from src rpms (as described below) and all built and
: installed without errors.
: 
: how can I resolve this symbol?
: 
: thanks
: charles
: 
: On Thu, 4 Nov 1999, Jason Costomiris wrote:
: > 
: > wget http://www.mysql.com/Downloads/MySQL-3.22/MySQL-3.22.27-1.src.rpm
: > wget ftp://ftp.redhat.com/pub/redhat/redhat-6.1/SRPMS/SRPMS/php-3.0.12-6.src.rpm
: > 
: > rpm --rebuild MySQL-3.22.27-1.src.rpm
: > rpm -i (or -Uvh) the resulting mysql RPMs (in /usr/src/redhat/RPMS/$(ARCH) )
: > 
: > rpm -i php-3.0.12-6.src.rpm
: > cd /usr/src/redhat/SPECS
: > 
: > (This part assumes you've installed openldap and openldap-devel)
: > 
: > I modified the .spec file to get rid of pgsql and replace it with mysql.
: > Attached to this email is a diff you should be able to apply with:
: > 
: > cd /usr/src/redhat/SPECS ; patch < php.spec.diff
: > 
: > Then, rpm -ba php.spec, and install the resulting RPMs.
: > 
: > wget ftp://ftp.replay.com/pub/crypto/redhat/SRPMS/apache-mod_ssl-1.3.6.2.3.0-0.src.rpm
: >
: 
: got srpms, built and installed 
: openssl-0.9.3a-3
: openssl-devel-0.9.3a-3
: before building/installing apache-mod_ssl
: 
: 
===



the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu