freelanceprogrammers.org Forum Index » Perl

MOD_Perl CGI variables are randomly unset??

View user's profile Post To page top
lucl2000 Posted: Sun Nov 19, 2006 7:17 pm


Joined: 19 Nov 2006

Posts: 1
MOD_Perl CGI variables are randomly unset??
Ok, I`ve troubleshot this for ages and now I`m turning to the
experts.

I am testing out mod_perl on our site. I read all of the mod_perl
docs
and guides and started with one script, index.cgi. I updated the
script
to use strict and cleaned it up for mod_perl.


I then add it to httpd.conf like this:


LoadModule perl_module modules/mod_perl.so


<FilesMatch "^index.cgi$">
SetHandler perl-script
PerlHandler ModPerl::Registry
PerlOptions +ParseHeaders
Options +ExecCGI
</FilesMatch>


index.cgi not works great. Actually 2 times faster... the problem is,
for some weird reason, some other scripts from time to time give an
error indicating that they didn`t receive any POST variables on the
request.


If I disable mod_perl completely, we never have any problems.


The weird thing is that the other scripts on our site aren`t even
configured under mod_perl. As you can see above, we only include
index.cgi.


Firstly, I am baffled a to how mod_perl is affecting other scripts
which aren`t even under mod_perl. Can simply enabling mod_perl affect
other scripts?


Secondly, what could cause this to happen? Essentially, it seems that
all POST variables are empty. I hit refresh and it`s fine. I get the
error roughly 1 in 75 times, it`s very rare but under heavy load
happen
alot more.


I can`t consistently recreate the error and under httpd -X I can`t
regenerate the error consistently either.


Please help!
Reply with quote
Send private message
View user's profile Post To page top
Rob_Wilson_98 Posted: Mon Nov 20, 2006 6:29 pm


Joined: 02 Aug 1999

Posts: 11
MOD_Perl CGI variables are randomly unset??
--- In Perl_Official@yahoogroups.com, lucl2000 <no_reply@...> wrote:

>
> Firstly, I am baffled a to how mod_perl is affecting other scripts
> which aren`t even under mod_perl. Can simply enabling mod_perl affect
> other scripts?
>

Apparently so! Actually, I`d bet this is more of a web server
configuration problem than a perl problem.

>
> Secondly, what could cause this to happen? Essentially, it seems that
> all POST variables are empty. I hit refresh and it`s fine. I get the
> error roughly 1 in 75 times, it`s very rare but under heavy load
> happen
> alot more.
>

Any chance this is a multi-step process or that you are using cookies
to keep track of steps? From request to request you are not
guaranteed to get the same web server daemon to answer your request so
any session variables from multiple steps absolutely must be passed
around with the request.

>
> I can`t consistently recreate the error and under httpd -X I can`t
> regenerate the error consistently either.
>
>
> Please help!
>

Failing the possibility that it`s not the problem of multiple sessions
being handled by the same daemon, check the web server error log and
make sure your perl script is chatty in its logging. See if you can
pinpoint where it`s going wrong.

Check the bugfixes for your versions of web server, mod_perl, and perl
to make sure this problem isn`t addressed at some higher level of code.

Look at the access log to see what else is running. It may be that
the web server is having trouble simultaneously running two perl scripts.
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help