Hi,
> well, almost... either change that to a <Files> directive or remove the
> filename from the <Location> directive, so that Apache::Request applies to
> all scripts within cgi-bin...
>
> see http://perl.apache.org/guide/config.html for more details...
thank you for your reply. I have changed <Files> to <Location> and
also moved the file_upload.pl into /cgi-perl/ to avoid any collisions
with the settings of the /cgi-bin/ directory:
PerlWarn On
Alias /cgi-perl/ /var/www/cgi-perl/
<Location /cgi-perl/>
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
#PerlSendHeader On
</Location>
However I have this strange problem now: the web page doesn't change
until I reload it. (Un)commenting "PerlSendHeader On" doesn't help.
The only ways to see the expected results (like the initial empty web
form, when entering http://localhost/cgi-perl/file_upload.pl into my
Netscape 4.7) is to keep reloading or to go to the Edit->Preferences->
Advanced->Cache and swith "Every Time" on.
I am using OpenBSD 2.8 with the native Apache 1.3.12 and Perl 5.6.0
and the mod_perl 1.24 from its ports at home and I have the same
problem with Apache 1.3.14/Perl 5.6.0/mod_perl 1.24_01 installed
in my home dir at work - on a Solaris 2.6/Sparc workstation.
I decided to ask on this list first, before following the instructions
at http://perl.apache.org/guide/debug.html because nothing seems to be
broken - there is just something wrong with headers or similar... I
probably miss something obvious... Here's what I get when telnetting:
alex:alex {105} telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /cgi-perl/file_upload.pl HTTP/1.1
Host: localhost
HTTP/1.1 200 OK
Date: Tue, 09 Jan 2001 20:09:42 GMT
Server: Apache/1.3.12 (Unix) mod_perl/1.24 mod_ssl/2.6.6 OpenSSL/0.9.5a
Transfer-Encoding: chunked
Content-Type: text/html
209
<HTML>
<HEAD><TITLE>File Upload Example</TITLE></HEAD>
<BODY>
<h1>File Upload Example</h1>
<FORM METHOD="POST" ENCTYPE="multipart/form-data">
Enter the file to process:
<INPUT TYPE="file" NAME="filename" SIZE=45><BR>
<INPUT TYPE="checkbox" NAME="count" VALUE="count lines">count lines
<INPUT TYPE="checkbox" NAME="count" VALUE="count words">count words
<INPUT TYPE="checkbox" NAME="count" VALUE="count characters">count characters
<P><INPUT TYPE="reset">
<INPUT TYPE="submit" NAME="submit" VALUE="Process File">
</FORM>
0
^D
Connection closed by foreign host.
Regards
Alex
PS: I have put my config file and the example script at
http://home.t-online.de/home/Alexander.Farber/httpd.conf
http://home.t-online.de/home/Alexander.Farber/file_upload.pl
(they will propagate there in few minutes)