You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Daniel McBrearty <da...@gmail.com> on 2006/02/07 23:35:58 UTC
odd bug - script not executed only when passed certain argument
Hi
I have a very odd bug here that is making me scratch my head.
Essentially, I have a script which gets executed normally - except when one
particular argument is passed to it. Then it doesn't execute - it gets spat
out as a text document.
My server config is maybe a bit unusual. I have this in httpd.conf before
startup.pl is run:
# Any .cgm files run under mod_perl as normal cgi's
<IfModule mod_perl.c>
<Files *.cgm>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader on
Options +ExecCGI
</Files>
</IfModule>
Non-standard but it has worked til now just fine.
This makes anything called .cgm run as mod_perl, any .cgi (I have a few for
dev purposes that aren't mod_perl ready) run as a one-off process.
I don't use any preloading of the scripts in startup.pl. (it doesn't seem to
make much odds to memory, maybe because of my odd config).
the cript gets arguments like this:
index.cgm
index.cgm?lang=en
index.cgm?lang=pt
and so on.
8 of 9 args work fine. The last, jp, causes the "doesn't run" problem.
Even odder is that the exact server config runs fine on port 80 (my test
setup). This only happens on port 8080 (which is my dev server - a
completely seperate apache instance). I have commented everything that
differs between the two instances, except the prot number, pathes and so on.
This is so odd I'm embarassed to post about it, but I'm pretty baffled .. I
hope it's just a "late night thing". Or a weird side effect of my odd
config?
any suggestions as to what to do next appreciated.
D
--
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131
Re: odd bug - script not executed only when passed certain argument
Posted by John ORourke <jo...@o-rourke.org>.
If it's a late night thing you'll be needing suggestions...
- do ?lang=jp right after restarting the server
- do ?lang=xx where xx is some random (invalid) combination of letters
- clarify "does not run" - does not produce expected output? crashes?
does not execute a certain bit of your code?
- maybe hard-code the lang parameter to "jp" at the top of your cgi
script, see what happens?
John
Daniel McBrearty wrote:
> 8 of 9 args work fine. The last, jp, causes the "doesn't run" problem.
>
> Even odder is that the exact server config runs fine on port 80 (my
> test setup). This only happens on port 8080 (which is my dev server -
> a completely seperate apache instance). I have commented everything
> that differs between the two instances, except the prot number, pathes
> and so on.
>
> This is so odd I'm embarassed to post about it, but I'm pretty baffled
> .. I hope it's just a "late night thing". Or a weird side effect of my
> odd config?