You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Alexander Farber (EED)" <ee...@eed.ericsson.se> on 2001/01/04 10:57:42 UTC
How do you run libapreq-0.31/eg/perl/file_upload.pl
?
Hi,
I have read http://perl.apache.org/guide/porting.html and
am still reading the Eagle book... How do you run this
example script?
1) Just calling http://localhost:8080/cgi-bin/file_upload.pl gives:
[Thu Jan 4 10:45:44 2001] [notice] Apache/1.3.14 (Unix) mod_perl/1.24_01 configured
-- resuming normal operations
[Thu Jan 4 10:45:53 2001] [error] (8)Exec format error: exec of /home/eedalf/apache/
cgi-bin/file_upload.pl failed
[Thu Jan 4 10:45:53 2001] [error] [client 127.0.0.1] Premature end of script headers
: /home/eedalf/apache/cgi-bin/file_upload.pl
2) After putting
PerlModule Apache::Request
<Location /cgi-bin/file_upload.pl>
SetHandler perl-script
PerlHandler Apache::Request
</Location>
into my httpd.conf, I get the following in my error_log:
[Thu Jan 4 10:47:39 2001] [notice] Apache/1.3.14 (Unix) mod_perl/1.24_01 configured
-- resuming normal operations
[Thu Jan 4 10:47:51 2001] [error] Undefined subroutine &Apache::Request::handler cal
led.
And adding
Options ExecCGI
PerlSendHeader On
doesn't change anything.
3) And the:
PerlModule Apache::Request
PerlModule Apache::Registry
<Location /cgi-bin/file_upload.pl>
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
PerlSendHeader On
</Location>
Displays the web form, but nothing happens (same form
displayed again), when I click the "Process File" button
and nothing is shown in the error_log.
Also I have sometimes to reload several times to see a change.
Should I wrap the code in the file_upload.pl into a "package"?
Can't I use Apache::Request w/o Apache::Registry? Am I loading
the modules wrong way?
I should of course read and re-read the complete guide and
finish the Eagle book (I will), but maybe someone can provide
me a small kick-start? Thank you
Regards
Alex