[Catalyst] errors under mod_perl
Andreas Marienborg
omega at palle.net
Tue Jan 24 08:15:27 CET 2006
On 23. jan. 2006, at 22.41, August R. Wohlt wrote:
> Hi All,
>
> I'm relatively new to catalyst and have an application I just
> rolled out to a large user base. While developing, it was run as a
> stand-alone CGI so that I could edit the code and see changes live.
> When I rolled it out, I switched to mod_perl, and now I get crazy
> intermittent Class:DBI / DBIx/ContextualFetch.pm errors. The app
> runs for a little while with no problem. Users can log in and out
> and use it, but then suddenly the errors start popping up all over
> the place: in the session logic, when searching objects in the
> database, but never in the same place. Here's a sample. Hoping
> someone knows off-hand what this is and that I'm doing something
> simply wrong:
>
> [Mon Jan 23 13:25:02 2006] [catalyst] [error] Caught exception in
> BioScribe::V::Mason->process "Couldn't render component "/mc/
> projects.mc" - error was "BioScribe::M::CDBI::Subject can't SELECT id
> FROM Subject
> WHERE project = ?
> : Can't use an undefined value as an ARRAY reference at /usr/lib/
> perl5/site_perl/5.8.5/Class/DBI.pm line 1113.
>
This might be browser related actually, as different browsers handle
a certain case different.
if you have a <form method="post"> without an action, and in the url
have like /myapp/admin/user/?id=1
and in the form <input type="hidden" name="id" value="1" /> you will
get an array of as $id, not the value 1.
Some browsers strip the ?id=1 before posting (when you dont specify
an action in the form-tag) and others doesnt. Might be worth cheking
into atleast.
I have the same problem when deploying things at work from time to
time :)
andreas
More information about the Catalyst
mailing list