You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by John Walstra <jo...@cnet.com> on 2001/02/21 09:45:10 UTC
multipart/form-data and fdat
I just update our development server to Embperl-1.3.1. I ran into to the
problem with fdat being empty after a post. I soon discovered if I put a "enctype='multipart/form-data'" in the form tag, fdat would be empty. If I removed it, fdat would have my data in it. Any known problems here? Here is my little test script. I monitor the apache "error_log" for the results.
[-
use Data::Dumper;
print STDERR Dumper( \%fdat );
print STDERR Dumper( \%udat );
$udat{hi} = $fdat{asdf};
-]
<html><body>
<form method=post enctype="multipart/form-data">
<input type=text name=asdf>
<input type=submit></form>
</body></html>
--
John Walstra CNET Networks
Senior Software Developer, Jack Of All Trades 300 Park Blvd, Suite 105
mailto:johnw@cnet.com Itasca, IL 60143-4914
Phone: 630.438.7000 x1304 Fax: 630.775.0555
Re: multipart/form-data and fdat
Posted by "G.Richter" <ri...@ecos.de>.
>I just update our development server to Embperl-1.3.1. I ran into to the
>problem with fdat being empty after a post. I soon discovered if I put a
"enctype='multipart/form-data'" >in the form tag, fdat would be empty. If I
removed it, fdat would have my data in it. Any known >problems here? Here is
my little test script. I monitor the apache "error_log" for the results.
The only thing that has changed here, is that there is some error checking
performed when setting up CGI.pm for multipart/formdata. Maybe this isn't
totaly correct. Do you see any error messages in the embperl.log file ?
Gerald
Re: multipart/form-data and fdat
Posted by Sun Choi <sc...@bigfootinteractive.com>.
I'm using Embperl 1.3.1 and I was trying to use
HTML::Embperl::Req::SetSessionCookie
directly from mod_perl page, but I get this Apache error message:
[Wed Feb 21 17:59:56 2001] [error] Can't locate object method "getinitialid"
via package "HTML::Embperl::Session" (perhaps you forgot to load
"HTML::Embperl::Session"?) at Embperl.pm line 1765.
I look at HTML::Embperl::Session module and I don't see this particular
method implemented.
Any idea what I'm doing wrong here?
Sun Choi
Developer
Bigfoot Interactive.
646-227-7413
Re: Problem when logging in without password
Posted by "F. Heinrichmeyer" <fr...@fernuni-hagen.de>.
I got it!
The error vanishes when i comment out the line
ErrorDocument 401 /aktuell/password.html
in httpd.conf
--
Fritz Heinrichmeyer mailto:fritz.heinrichmeyer@fernuni-hagen.de
FernUniversitaet Hagen, LG ES, 58084 Hagen (Germany)
tel:+49 2331/987-1166 fax:987-355 http://www-es.fernuni-hagen.de/~jfh
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: Problem when logging in without password
Posted by Gerald Richter <ri...@ecos.de>.
> <Directory "/home/bachelor/htdocs/bachelor/dbi">
> ErrorDocument 403 /aktuell/sorry.html
> Options ExecCGI MultiViews
Does the same occur without the ErrorDocument and the MultiViews ?
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Problem when logging in without password
Posted by Fritz Heinrichmeyer <fr...@fernuni-hagen.de>.
Here is the config file for the a directory.
Problem:
If someone clicks at the link without beeing authenificated, the server
returns no data.
If someone is accidentally authentificated already, everything is fine.
<Directory "/home/bachelor/htdocs/bachelor/dbi">
ErrorDocument 403 /aktuell/sorry.html
Options ExecCGI MultiViews
DirectoryIndex index.html
require valid-user
AuthType basic
AuthName LDAP_ice-bachelor
PerlAuthenHandler Apache::authenETDB
PerlAuthzHandler Apache::authorizETDB
PerlSetEnv EMBPERL_DEBUG 0
# PerlSetEnv EMBPERL_VIRTLOG /embperl/log
PerlSetEnv EMBPERL_FILESMATCH "e_"
SetHandler perl-script
PerlHandler HTML::Embperl
</Directory>
--
Fritz Heinrichmeyer mailto:fritz.heinrichmeyer@fernuni-hagen.de
FernUniversitaet Hagen, LG ES, 58084 Hagen (Germany)
tel:+49 2331/987-1166 fax:987-355 http://www-es.fernuni-hagen.de/~jfh
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: multipart/form-data and fdat
Posted by Gerald Richter <ri...@ecos.de>.
> I'm mainly using Netscape 4.7x under Linux. I just tried it with IE5.5 and
get similar results, just no "Method Not Implemented" message. I downgraded
CGI.pm to 2.46, which it seems to be the version that comes with Perl
5.00503 and it still did not work. I'm currently using Perl 5.6.0, using
mod_perl-1.24_01.
Mmmh, strange. CGI 2.46 should really work.
> I'll start to dive into CGI.pm now.
>
> > > ---
> > > Method Not Implemented
> > > -----------------------------42423833519577477931714636915 to / not
> > supported.
> > >
> > > Invalid method in
> > request -----------------------------42423833519577477931714636915
> > > ---
I think a first step would be to find out who is generating this message and
by what they are triggered. These lines are the separators between the parts
of the posted data and not any method at all.
Gerald
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: multipart/form-data and fdat
Posted by John Walstra <jo...@cnet.com>.
I'm mainly using Netscape 4.7x under Linux. I just tried it with IE5.5 and get similar results, just no "Method Not Implemented" message. I downgraded CGI.pm to 2.46, which it seems to be the version that comes with Perl 5.00503 and it still did not work. I'm currently using Perl 5.6.0, using mod_perl-1.24_01. I'll start to dive into CGI.pm now.
Thus spake Gerald Richter (richter@ecos.de):
> > ---
> > Method Not Implemented
> > -----------------------------42423833519577477931714636915 to / not
> supported.
> >
> > Invalid method in
> request -----------------------------42423833519577477931714636915
> > ---
> >
>
> This really looks like a problem of CGI.pm. Any chance to up or downgrade
> CGI.pm ?
>
> The "Method Not Implemented" is surely not an Embperl message, I guess it's
> coming out of CGI.pm, because it cannot handle the format the browser sends.
> Have you tried another browser, does this change anything ?
>
> Gerald
--
John Walstra CNET Networks
Senior Software Developer, Jack Of All Trades 300 Park Blvd, Suite 105
mailto:johnw@cnet.com Itasca, IL 60143-4914
Phone: 630.438.7000 x1304 Fax: 630.775.0555
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org
Re: multipart/form-data and fdat
Posted by Gerald Richter <ri...@ecos.de>.
>
> ---
> [5754]REQ: No Safe Eval All Opcode allowed mode = mod_perl (3)
> [5754]REQ: Package = HTML::Embperl::DOC::_1
> ###############################################
> multipart/form-data;
boundary=---------------------------42423833519577477931714636915
> ###############################################
> [5754]Formdata... length = 0
> [5754]Using APACHE for output...
> ---
>
> and I also get the following on the bottom of the page.
>
> ---
> Method Not Implemented
> -----------------------------42423833519577477931714636915 to / not
supported.
>
> Invalid method in
request -----------------------------42423833519577477931714636915
> ---
>
This really looks like a problem of CGI.pm. Any chance to up or downgrade
CGI.pm ?
The "Method Not Implemented" is surely not an Embperl message, I guess it's
coming out of CGI.pm, because it cannot handle the format the browser sends.
Have you tried another browser, does this change anything ?
Gerald
Re: multipart/form-data and fdat
Posted by Gerald Richter <ri...@ecos.de>.
>
> ---
> [5754]REQ: No Safe Eval All Opcode allowed mode = mod_perl (3)
> [5754]REQ: Package = HTML::Embperl::DOC::_1
> ###############################################
> multipart/form-data;
boundary=---------------------------42423833519577477931714636915
> ###############################################
> [5754]Formdata... length = 0
> [5754]Using APACHE for output...
> ---
>
> and I also get the following on the bottom of the page.
>
> ---
> Method Not Implemented
> -----------------------------42423833519577477931714636915 to / not
supported.
>
> Invalid method in
request -----------------------------42423833519577477931714636915
> ---
>
This really looks like a problem of CGI.pm. Any chance to up or downgrade
CGI.pm ?
The "Method Not Implemented" is surely not an Embperl message, I guess it's
coming out of CGI.pm, because it cannot handle the format the browser sends.
Have you tried another browser, does this change anything ?
Gerald
Re: multipart/form-data and fdat
Posted by John Walstra <jo...@cnet.com>.
Without the multipart/form-data ...
---
[5599]REQ: No Safe Eval All Opcode allowed mode = mod_perl (3)
[5599]REQ: Package = HTML::Embperl::DOC::_1
###############################################
application/x-www-form-urlencoded
###############################################
[5599]Formdata... length = 300
[5599]FORM: decor_redirect_url=http://www1.test1:8080/ChannelOnline/acme/home/
---
With the multipart/form-data ...
---
[5754]REQ: No Safe Eval All Opcode allowed mode = mod_perl (3)
[5754]REQ: Package = HTML::Embperl::DOC::_1
###############################################
multipart/form-data; boundary=---------------------------42423833519577477931714636915
###############################################
[5754]Formdata... length = 0
[5754]Using APACHE for output...
---
and I also get the following on the bottom of the page.
---
Method Not Implemented
-----------------------------42423833519577477931714636915 to / not supported.
Invalid method in request -----------------------------42423833519577477931714636915
---
Apache/1.3.12 Server at www1.test1 Port 8080
BTW, this is the form tag in the HTML.
--
<form method="post" enctype="multipart/form-data" name="copage" action="http://www1.test1:8080/ChannelOnline/acme/home/">
--
Thanks,
John
Thus spake Gerald Richter (richter@ecos.de):
> >
> > It also passes all of it's test
> >
>
> That mean that multipar/form-data basicly works, because the upload test
> tests this
>
> >
> > Any known problems with Embperl 1.3.1 and CGI 2.752?
>
> I don't know any, but I personaly didn't tested file upload 2.752
>
> > Would optimzing Perl or Apache optimze the values away? I used
> "-O3 -mcpu=pentiumpro -march=pentiumpro -ffast-math -fomit->frame-pointer"
> to compile Perl and Apache.
>
> I don't think so
>
> Could you add a
>
> print LOG $ENV{CONTENT_TYPE} ;
>
> to see what the actual content type is ?
>
> Gerald
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
--
John Walstra CNET Networks
Senior Software Developer, Jack Of All Trades 300 Park Blvd, Suite 105
mailto:johnw@cnet.com Itasca, IL 60143-4914
Phone: 630.438.7000 x1304 Fax: 630.775.0555
Re: multipart/form-data and fdat
Posted by Gerald Richter <ri...@ecos.de>.
>
> It also passes all of it's test
>
That mean that multipar/form-data basicly works, because the upload test
tests this
>
> Any known problems with Embperl 1.3.1 and CGI 2.752?
I don't know any, but I personaly didn't tested file upload 2.752
> Would optimzing Perl or Apache optimze the values away? I used
"-O3 -mcpu=pentiumpro -march=pentiumpro -ffast-math -fomit->frame-pointer"
to compile Perl and Apache.
I don't think so
Could you add a
print LOG $ENV{CONTENT_TYPE} ;
to see what the actual content type is ?
Gerald
Re: multipart/form-data and fdat
Posted by John Walstra <jo...@cnet.com>.
Ok, I've had some time now to try to track it down. I've tried 1.3.0 and 1.3.1 and received the same problem. So I figured it has to be something else. I figured I stick with 1.3.1 while trying to figure out this problem. Again, the problem is if I place a "enctype='multipart/form-data' into a form tag, fdat will be completely empty. This is the packages Embperl-1.3.1 finds when I build it.
----
Build with support for Apache mod_perl?(y/n) [y]
Use ../apache_1.3.12/src as Apache source(y/n) [y]
Will use /usr/local/pack/installs/apache_1.3.12/src for Apache Headers
Apache Version Server version: Apache/1.3.12 (Unix)
+ found mod_ssl
Syntax OK
Test start /usr/local/pack/installs/apache_1.3.12/src/httpd
Test httpd will run as user nobody and group root
Test httpd will listen on port 8531
Found mod_perl Version 1.2401
Found LWP::UserAgent Version 1.73
Found HTML::HeadParser Version 2.14
Found Apache::Session Version 1.53
Found File::Spec Version 0.82
Found CGI Version 2.752
Checking if your kit is complete...
Looks good
Writing Makefile for HTML::Embperl
----
It also passes all of it's test
----
All test have been passed successfully!
----
After placing some debug messages, around line 890 of Embperl.pm, I get ..
----
[30606]REQ: Embperl 1.3.1 starting... Tue Mar 6 21:44:10 2001
[30606]REQ: No Safe Eval All Opcode allowed mode = mod_perl (3)
[30606]REQ: Package = HTML::Embperl::DOC::_1
[30606]TAB: get TabRow = 0, Used = 5
############################## HERE
Dumper
############################## HERE
[30606]Formdata... length = 0
[30606]Using APACHE for output...
----
from
----
if ($@ || !$cgi)
{
$r -> logerror (rcCGIError, $@) ;
$@ = '' ;
}
else
{
print LOG "############################## HERE\n";
@ffld = $cgi->param;
print LOG "Dumper " . Dumper( @ffld ) . "\n";
print LOG "############################## HERE\n";
my $params ;
foreach ( @ffld )
{
# the param_fetch needs CGI.pm 2.43
#$params = $cgi->param_fetch( $_ ) ;
$params = $cgi->{$_} ;
----
Any known problems with Embperl 1.3.1 and CGI 2.752? Would optimzing Perl or Apache optimze the values away? I used "-O3 -mcpu=pentiumpro -march=pentiumpro -ffast-math -fomit-frame-pointer" to compile Perl and Apache.
Any help would be most appreciated,
John
Thus spake G.Richter (richter@ecos.de):
> >
> > IMHO there was a problem that in Embperl.pm is ONLY conditional
> > $ENV{'CONTENT_TYPE'}=~m|^application/x-www-form-urlencoded|
> > but should be
> > $ENV{'CONTENT_TYPE'}=~m|^multipart/form-data| too.
> >
>
> It's viceversa. Only $ENV{'CONTENT_TYPE'}=~m|^multipart/form-data| is in
> now, because only multipart/form-data is handled by CGI.pm, while all other
> sort of data is handled by the C part of Embperl.
>
> I use Embperl 1.3.1 with both sorts of forms and it works without problems
>
> Gerald
--
John Walstra CNET Networks
Senior Software Developer, Jack Of All Trades 300 Park Blvd, Suite 105
mailto:johnw@cnet.com Itasca, IL 60143-4914
Phone: 630.438.7000 x1304 Fax: 630.775.0555
Re: multipart/form-data and fdat
Posted by "G.Richter" <ri...@ecos.de>.
>
> IMHO there was a problem that in Embperl.pm is ONLY conditional
> $ENV{'CONTENT_TYPE'}=~m|^application/x-www-form-urlencoded|
> but should be
> $ENV{'CONTENT_TYPE'}=~m|^multipart/form-data| too.
>
It's viceversa. Only $ENV{'CONTENT_TYPE'}=~m|^multipart/form-data| is in
now, because only multipart/form-data is handled by CGI.pm, while all other
sort of data is handled by the C part of Embperl.
I use Embperl 1.3.1 with both sorts of forms and it works without problems
Gerald
Re: multipart/form-data and fdat
Posted by Neeme Vool <ne...@eenet.ee>.
IMHO there was a problem that in Embperl.pm is ONLY conditional
$ENV{'CONTENT_TYPE'}=~m|^application/x-www-form-urlencoded|
but should be
$ENV{'CONTENT_TYPE'}=~m|^multipart/form-data| too.
I added it to my Embperl.pm module
E-mail: Neeme.Vool@eenet.ee
On Wed, 21 Feb 2001, John Walstra wrote:
> I just update our development server to Embperl-1.3.1. I ran into to the
> problem with fdat being empty after a post. I soon discovered if I put a "enctype='multipart/form-data'" in the form tag, fdat would be empty. If I removed it, fdat would have my data in it. Any known problems here? Here is my little test script. I monitor the apache "error_log" for the results.
>
> [-
>
> use Data::Dumper;
> print STDERR Dumper( \%fdat );
> print STDERR Dumper( \%udat );
> $udat{hi} = $fdat{asdf};
>
> -]
>
> <html><body>
> <form method=post enctype="multipart/form-data">
> <input type=text name=asdf>
> <input type=submit></form>
> </body></html>
>
>
> --
> John Walstra CNET Networks
> Senior Software Developer, Jack Of All Trades 300 Park Blvd, Suite 105
> mailto:johnw@cnet.com Itasca, IL 60143-4914
> Phone: 630.438.7000 x1304 Fax: 630.775.0555
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>