Code Comments
Programming Forum and web based access to our favorite programming groups.Looking for help from anyone with mod_perl experience - I have been caught by a classic newbie gotcha... I think. Running Activestate Perl v5.8.8 for MSWin32, apache 2.0 for Win32 I believe I have correctly installed mod_perl as $ENV{'MOD_PERL'} correctly reports the version "mod_perl/2.0.3" Two simple example CGI scripts - *The first sends the contents and name of textfield to the second. *The second script should then print the value of the textfield to the screen. The problem is that after the first successful send/receive, all subsequent executions contain the same initial data: the parameters never get reset with 'newer' data. I understand that mod_perl is pretty fussy about closing down assignments and undefining variables, working with 'strict' and avoiding Globals. I would appreciate anyone pointing out the (hopefully) obvious mistake in my code below - or any guidance at all. Cheers NJH pass_from.cgi ------ #!c:/perl/bin/perl.exe use warnings; use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); use DBI; my $q = new CGI; print $q->header, $q->start_html(-title=>'Pass From'), "mod_perl - $ENV{'MOD_PERL'}<p>", $q->start_multipart_form(-action=>"pass_to.cgi"), $q->textfield(-name=>'id', -size=>10), $q->submit(), $q->end_form(); $q->delete('id'); print $q->end_html; exit(); pass_to.cgi ------ #!c:/perl/bin/perl.exe use warnings; use strict; use CGI; use CGI::Carp qw(fatalsToBrowser); use DBI; my $q = new CGI; print $q->header, $q->start_html(-title=>'Pass To'), "mod_perl - $ENV{'MOD_PERL'}<p>"; foreach my $val($q->param()){print "$val: ",$q->param($val);} print "<p><a href='pass_from.cgi'>Return</a>"; $q->delete('id'); print $q->end_html; exit();
Post Follow-up to this messageevillen@gmail.com wrote: > The problem is that after the first successful send/receive, all > subsequent executions contain the same initial data: the parameters > never get reset with 'newer' data. I wasn't able to reproduce the described problem. -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
Post Follow-up to this messageOn Nov 20, 11:52 pm, nore...@gunnar.cc (Gunnar Hjalmarsson) wrote: > evil...@gmail.com wrote: > > I wasn't able to reproduce the described problem. > > -- > Gunnar Hjalmarsson > Email:http://www.gunnar.cc/cgi-bin/contact.pl Hi Gunnar Are you saying that the code worked as expected? If so this implies that the configuration of my particular setup is the problem... any ideas? Anyone? Thanks NJH
Post Follow-up to this messageevillen@gmail.com wrote: > On Nov 20, 11:52 pm, nore...@gunnar.cc (Gunnar Hjalmarsson) wrote: > > Are you saying that the code worked as expected? Yes. I run it under mod_perl on my IndigoPerl installation, but AFAIK it's quite similar to ActiveState. > If so this implies that the configuration of my particular setup is > the problem... any ideas? Caching? -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
Post Follow-up to this messageBest cumshot videos collection [IMG]http://amazing-cumshot-movies.com/ shot3.jpg[/IMG] [IMG]http://amazing-cumshot-movies.com/ shot3.jpg[/IMG] More wet stuff at: facial hair remova l facial girls Skip facial porn XXXXing games Ershlen8[/U RL] [URL=http://bandwidthcrazy.com/projectmojophp/viewtopic.php?p=14420]XXXXing videos anal sex porn gallery Sad_man_insan e facial abuse p orn - Sperm on her face teen facial hair
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.