You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Graham Vickrage <gr...@gpmd.co.uk> on 2005/04/15 19:39:13 UTC
Wrong page being displayed
I'm a newbie to Mod perl and have a odd problem.
I have installed apache2 2.0.53, perl 5.8.4 and MP2 2.0.0 and connect to
a postgresql database on a different machine (Apache:DBI & DBI &
DBD::Pg). All works well except that I seem to get old pages served on
new page requests. It would appear as if its some sort of caching issue
but I am not sure how to force a request. An example request would be
http://mysite.com/cgi-bin/displaypage.pl?page=2
And the next page would be
http://mysite.com/cgi-bin/displaypage.pl?page=3
It shows previously viewed pages and with no particular pattern. Does
anyone know where I start looking to solve this one. The access logs are
displaying the correct request but the webserver is delivering previous
pages but not consistently????
Any help greatly appreciated.
RE: Wrong page being displayed
Posted by Graham Vickrage <gr...@gpmd.co.uk>.
I have figured out the problem. It was down to my globally scoped
variables in the pl scripts such as
my $q = new CGI;
Once I specifically passed these into each procedure the problems
ceased.
Thanks for you help with this one.
-----Original Message-----
From: Thomas Schindl [mailto:tomAtLinux@gmx.at]
Sent: 16 April 2005 14:43
To: Perrin Harkins
Cc: graham@gpmd.co.uk; modperl@perl.apache.org
Subject: Re: Wrong page being displayed
The description of the problem really looks like that, so I could only
second Perrins suggestion to show us the code in question. I looks like
that you are hitting perl-processes which have a closure or something
else and in mod_perl the code is not recompiled everytime.
Tom
> On Fri, 2005-04-15 at 18:39 +0100, Graham Vickrage wrote:
> > It shows previously viewed pages and with no particular pattern.
> > Does anyone know where I start looking to solve this one.
>
> How about showing us some code? Try to reduce it to a minimal piece
> that demonstrates the problem.
>
> Chances are good that you have a closure in your code that is making
> your CGI object persist between requests.
>
> - Perrin
>
--
+++ GMX - Die erste Adresse für Mail, Message, More +++
1 GB Mailbox bereits in GMX FreeMail http://www.gmx.net/de/go/mail
Re: Wrong page being displayed
Posted by Thomas Schindl <to...@gmx.at>.
The description of the problem really looks like that, so I could only
second Perrins suggestion to show us the code in question. I looks like that
you are hitting perl-processes which have a closure or something else and in
mod_perl the code is not recompiled everytime.
Tom
> On Fri, 2005-04-15 at 18:39 +0100, Graham Vickrage wrote:
> > It shows previously viewed pages and with no particular pattern. Does
> > anyone know where I start looking to solve this one.
>
> How about showing us some code? Try to reduce it to a minimal piece
> that demonstrates the problem.
>
> Chances are good that you have a closure in your code that is making
> your CGI object persist between requests.
>
> - Perrin
>
--
+++ GMX - Die erste Adresse f�r Mail, Message, More +++
1 GB Mailbox bereits in GMX FreeMail http://www.gmx.net/de/go/mail
Re: Wrong page being displayed
Posted by Perrin Harkins <pe...@elem.com>.
On Fri, 2005-04-15 at 18:39 +0100, Graham Vickrage wrote:
> It shows previously viewed pages and with no particular pattern. Does
> anyone know where I start looking to solve this one.
How about showing us some code? Try to reduce it to a minimal piece
that demonstrates the problem.
Chances are good that you have a closure in your code that is making
your CGI object persist between requests.
- Perrin
Re: Wrong page being displayed
Posted by Jonathan Vanasco <jv...@mastersofbranding.com>.
Sometimes something similar happens to me when I'm working on my dev
machine and have automatic reloading turned on via Apache::Reload
Many times, Apache::Reload doesn't pick up the file change, or, for
whatever reason, gets really screwed up and needs a reboot
doing a /usr/local/apache2/bin/apachectl stop / start solves that
problem each time though -- sometimes a restart or graceful doesn't do
it
On Apr 15, 2005, at 1:39 PM, Graham Vickrage wrote:
> It shows previously viewed pages and with no particular pattern. Does
> anyone know where I start looking to solve this one. The access logs
> are
> displaying the correct request but the webserver is delivering previous
> pages but not consistently????