Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

mod_perl newbie gotcha
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();


Report this thread to moderator Post Follow-up to this message
Old Post
Evillen@Gmail.Com
11-20-07 11:56 PM


Re: mod_perl newbie gotcha
evillen@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

Report this thread to moderator Post Follow-up to this message
Old Post
Gunnar Hjalmarsson
11-20-07 11:56 PM


Re: mod_perl newbie gotcha
On 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


Report this thread to moderator Post Follow-up to this message
Old Post
Evillen@Gmail.Com
11-22-07 12:55 PM


Re: mod_perl newbie gotcha
evillen@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

Report this thread to moderator Post Follow-up to this message
Old Post
Gunnar Hjalmarsson
11-22-07 11:56 PM



Best 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

Report this thread to moderator Post Follow-up to this message
Old Post
Bunlalolee0
01-21-08 07:04 AM



http://www.CheapVideoBlog.com/watch?id=726071

Report this thread to moderator Post Follow-up to this message
Old Post
Spesh
03-17-08 04:10 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PERL CGI Beginners archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 12:54 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.