perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Barksdale, Ray" <barksd...@mdot.state.ms.us>
Subject RE: missing param from post using apache::request
Date Fri, 09 Jul 2004 16:04:02 GMT
Well, crap.... This just confirms my wife's observation: I'm a dufus. 
Rewrote my form generator during mp2 upgrade and dropped the enctype. All
better now.
 
Sorry about piling on Joe.
Thanks for the remider Stefan.


   _____  

From: Stefan Loones [mailto:stefv@pandava.com] 
Sent: Friday, July 09, 2004 10:26 AM
To: modperl@perl.apache.org
Subject: Re: missing param from post using apache::request


In my experience you need to set   enctype="multipart/form-data"   in your
form tag, whenever you use a textarea or a file upload.

So must be:
<form action="http://gcxdev.ccci.org/aptest" <http://gcxdev.ccci.org/aptest>
enctype="multipart/form-data" method="post" />

Stef

Ken Burcham wrote:


I guess the simplest thing is to say the form below, when posted 

to the handler below, drops the sys_bundle field.



Thanks,



ken.

=-=-=-=-=-=-=-



form:

-------

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd"
<http://www.w3.org/TR/html4/loose.dtd> >

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-

8859-1">

<title>Box tool test</title>

</head>

<form action="http://gcxdev.ccci.org/aptest" <http://gcxdev.ccci.org/aptest>
method="post"/>

sys_action<input name="sys_action" id="sys_action" 

value="save_box" type="text" size="30"/><br>

sys_name<input name="sys_name" id="sys_name" value="toolbox" 

type="text" size="30"/><br>

sys_community<input name="sys_community" id="sys_community" 

value="global" type="text" size="30"/><br>

sys_workcommunity<input name="sys_workcommunity" 

id="sys_workcommunity" value="testing" type="text" 

size="30"/><br>

sys_workname<input name="sys_workname" id="sys_workname" 

value="home" type="text" size="30"/><br>

sys_bundle<br><textarea name="sys_bundle" id="sys_bundle" 

type="text" cols="80" rows="35">

<gcxBoxes>

	<gcxBox>

		<elementname>blank</elementname>

		

<boxname>testbox3</boxname><parentboxid>0</parentboxid>

		<content>testbox3%20</content>

		<width>100</width>

		<height>100</height>

		<left>142px</left>

		<top>261px</top>

		<zIndex>0</zIndex>

		<float></float>

		<clear>none</clear>

		<filter></filter>

		<marginTop></marginTop>

		<marginRight></marginRight>

		<marginBottom></marginBottom>

		<marginLeft></marginLeft>

		<paddingTop>0</paddingTop>

		<paddingRight>0</paddingRight>

		<paddingBottom>0</paddingBottom>

		<paddingLeft>0</paddingLeft>

		<textAlign>left</textAlign>

		<verticalAlign></verticalAlign>

		<textIndent>0</textIndent>

		<whiteSpace></whiteSpace>

		<display>block</display>

		<overflowX>visible</overflowX>

		<overflowY>visible</overflowY>

		<borderBottomColor>#000000</borderBottomColor>

		<borderBottomStyle>dashed</borderBottomStyle>

		<borderBottomWidth>1</borderBottomWidth>

		<borderLeftColor>#000000</borderLeftColor>

		<borderLeftStyle>dashed</borderLeftStyle>

		<borderLeftWidth>1</borderLeftWidth>

		<borderRightColor>#000000</borderRightColor>

		<borderRightStyle>dashed</borderRightStyle>

		<borderRightWidth>1</borderRightWidth>

		<borderTopColor>#000000</borderTopColor>

		<borderTopStyle>dashed</borderTopStyle>

		<borderTopWidth>1</borderTopWidth>

		<backgroundColor>#ffffff</backgroundColor>

		<backgroundImage>none</backgroundImage>

		<backgroundAttachment>scroll</backgroundAttachment>

		<backgroundRepeat>repeat</backgroundRepeat>

		<backgroundPositionX>0</backgroundPositionX>

		<backgroundPositionY>0</backgroundPositionY>

		<fontFamily>Verdana,Arial,Helvetica,sans-

serif</fontFamily>

		<fontSize>11</fontSize>

		<color>#000000</color>

		<fontStyle></fontStyle>

		<lineHeight></lineHeight>

		<fontWeight>400</fontWeight>

		<textTransform>none</textTransform>

		<fontVariant></fontVariant>

		<textDecoration>overline</textDecoration>

		<wordSpacing></wordSpacing>

		<letterSpacing></letterSpacing>

		<parentid>656</parentid>

		<report></report>

		<boxtype>content</boxtype>

		<boxid>1347</boxid>

	</gcxBox>

	<gcxBox>

		<elementname>blank</elementname>

		<boxname>coolbox2</boxname>

		<parentboxid>1347</parentboxid>

		<content>coolbox2-edited%20</content>

		<width>100</width>

		<height>100</height>

		<left>154px</left>

		<top>262px</top>

		<zIndex>0</zIndex>

		<float></float>

		<clear>none</clear>

		<filter></filter>

		<marginTop>0</marginTop>

		<marginRight>0</marginRight>

		<marginBottom>0</marginBottom>

		<marginLeft>0</marginLeft>

		<paddingTop>0</paddingTop>

		<paddingRight>0</paddingRight>

		<paddingBottom>0</paddingBottom>

		<paddingLeft>0</paddingLeft>

		<textAlign>left</textAlign>

		<verticalAlign></verticalAlign>

		<textIndent>0</textIndent>

		<whiteSpace></whiteSpace>

		<display>block</display>

		<overflowX>visible</overflowX>

		<overflowY>visible</overflowY>

		<borderBottomColor>#000000</borderBottomColor>

		<borderBottomStyle>dashed</borderBottomStyle>

		<borderBottomWidth>1</borderBottomWidth>

		<borderLeftColor>#000000</borderLeftColor>

		<borderLeftStyle>dashed</borderLeftStyle>

		<borderLeftWidth>4</borderLeftWidth>

		<borderRightColor>#000000</borderRightColor>

		<borderRightStyle>dashed</borderRightStyle>

		<borderRightWidth>4</borderRightWidth>

		<borderTopColor>#cccccc</borderTopColor>

		<borderTopStyle>dashed</borderTopStyle>

		<borderTopWidth>1</borderTopWidth>

		<backgroundColor>#ffffff</backgroundColor>

		<backgroundImage>none</backgroundImage>

		<backgroundAttachment>scroll</backgroundAttachment>

		<backgroundRepeat>repeat</backgroundRepeat>

		<backgroundPositionX>0</backgroundPositionX>

		<backgroundPositionY>0</backgroundPositionY>

		<fontFamily>Verdana,Arial,Helvetica,sans-

serif</fontFamily>

		<fontSize>11</fontSize>

		<color>#000000</color>

		<fontStyle></fontStyle>

		<lineHeight></lineHeight>

		<fontWeight>400</fontWeight>

		<textTransform>none</textTransform>

		<fontVariant></fontVariant>

		<textDecoration>overline</textDecoration>

		<wordSpacing></wordSpacing>

		<letterSpacing></letterSpacing>

		<parentid>656</parentid>

		

<report>http://gcxdev.ccci.org/report/global/alltables
<http://gcxdev.ccci.org/report/global/alltables> </report>

		<boxtype>content</boxtype>

		<boxid>1351</boxid>

	</gcxBox>

</gcxBoxes>

</textarea><br>

<input type="submit" value="update box"/>

</form>

<body>

</body>

</html>





handler:

---------

  package ApacheTest;



  use strict;



  use Apache::Request;

  use Apache::RequestRec ();

  use Apache::RequestIO ();

  use Apache::Const -compile => qw(OK REDIRECT);



  sub handler {



        my $r = shift;



        $r->content_type('text/html');



        my $q = Apache::Request->new($r, POST_MAX => 10048);



        my $buffer = "Ken's Variable Dumper 2<table border=1 

width=200>";



        my $body = $q->body();



        foreach my $varname ($q->param)

        {

                warn "here we go: $varname " ;

                $buffer .= "<tr>";

                my $val = $q->param($varname);

                $buffer .= "<td>$varname</td><td>$val</td>";

                $buffer .= "</tr>";



        }



        $buffer .= "<hr/>Specifically looking for 

sys_bundle:".$q->param('sys_bundle');



        $buffer .= "</table><hr/>And that's it";



        $buffer .= " body_status = " ;#;. $q->status;



        $r->print($buffer);



        return Apache::OK;



}

1; 



On 9 Jul 2004 at 10:22, Joe Schaefer wrote:



  

"Ken Burcham"  <mailto:ken@burcham.com> <ken@burcham.com> writes:



    

Hey guys,



  I submitted a bug report to dev@perl.apache.org
<mailto:dev@perl.apache.org>  and it got

  returned

without comment...  (maybe it was the wrong place?)  so I guess i'll

post it here since I know Joe Schaefer monitors this list :).

      

Yup, I'm here.  Problems with param parsing aren't mp2 bugs, they're

apreq bugs.  Reporting them on apreq-dev@httpd is probably best, but

discussing this here on modperl@perl should be fine.



    

Any ideas what's going on here?  Thanks!

      

Not at the moment, but I don't understand this "add the character and

post" business.  Could you please be more specific about that, and

please also remove the GCX modules from the handler you'd like me to

test (unless the bug disappears without them).



Thanks!



-- 

Joe Schaefer





-- 

Report problems: http://perl.apache.org/bugs/ <http://perl.apache.org/bugs/>


Mail list info: http://perl.apache.org/maillist/modperl.html
<http://perl.apache.org/maillist/modperl.html> 

List etiquette: http://perl.apache.org/maillist/email-etiquette.html
<http://perl.apache.org/maillist/email-etiquette.html> 

    



  



*****CONFIDENTIALITY NOTICE*****
This e-mail and any files or attachments may contain confidential and
privileged information.  If you have received this message in error, please
notify the sender at the above e-mail address and delete it and all copies
from your system.



Mime
View raw message