apache::session::mysql: layout
I created a table "sessions" in my db with columns "id" and "a_session" per the Apache::Session::Store::MySQL pod, in particular, "a_session" is of type text. Everything worked fine but I have a (rather silly) question: Why can't I see the key/value pairs when I simply "select a_session from sessions" at the mysql shell prompt? Sheepishly, Mark -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html
config? internal_redirect wants internal_re.al
Hi, I'm getting the following error in response to a call to internal_redirect of Apache2::SubRequest: Can't locate auto/Apache2/Request/internal_re.al in @INC which, of course, it won't since, on my Debian Lenny system, /usr/lib/perl5/auto/Apache2 doesn't even have a Request subdirectory. This question came up 4 years ago in the Mason users list, and Jonathan Swartz suggested it might be a mod_perl configuration issue. The only thing is, I have 2 virtual hosts using the same configuration and the same code. Redirects work fine for one and not the other. (Well, OK, machines are deterministic and there is some difference that escapes me.) Does anyone have a suggestion how to go about addressing this problem? My server looks like this: Apache/2.2.9 (Debian) mod_ssl/2.2.9 OpenSSL/0.9.8g mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 and the Apache location is SetHandler perl-script PerlHandler MyApp::Mason DefaultType text/html Thank you. Mark
Re: config? internal_redirect wants internal_re.al
Thank you. Adding "use Apache2::SubRequest ();" to my startup.pl solves the problem, and it explains the divergent behavior between the two virtual hosts. Mark On Wed, Apr 22, 2009 at 09:03:50AM -0400, Adam Prime wrote: > Mark Copper wrote: > >Hi, > > > >I'm getting the following error in response to a call to > >internal_redirect of Apache2::SubRequest: > > Can't locate auto/Apache2/Request/internal_re.al in @INC > >which, of course, it won't since, on my Debian Lenny system, > > /usr/lib/perl5/auto/Apache2 > >doesn't even have a Request subdirectory. > > The only time i've seen an error like that was when i had not put "use > Apache2::Whatever" into my code or my startup.pl. Does your code have that? > > Adam
unreadable output after internal redirect
Hi, I have a Mason dhandler that generates an HTML page containing a form. The action of the form is to get the same page that is displayed. If the URL contains a certain parameter, an internal redirect is issued: URL: mydomain.com/information/dhandler/variable.html?modification=update <%args> $modification=>undef ... ... ... ... if ($modification eq "update"){ my $location = "/data_update?session=$session&" . $r->args; $r->internal_redirect($location); return OK; ... A Perl handler processes requests to /data_update and issues a new internal redirect to a third page: SetHandler perl-script PerlHandler MyApp::DataUpdate DefaultType text/html The third page (usually) displays correctly but there is trouble beneath. Following any link on the third page results in a display of gibberish--binary data except for the HTTP header buried midway through. This third page never causes any trouble except when approached through this internal redirect. I've probably left out all the information you need to know in order to suggest a solution. So I guess that's my question; where do I need to look more carefully? Sorry if *this* page is gibberish. Thanks for reading. Mark
Re: unreadable output after internal redirect
On Thu, Aug 20, 2009 at 11:47:56PM -0700, Fred Moyer wrote: > On Thu, Aug 20, 2009 at 7:54 AM, Mark Copper > wrote: > > Hi, > > > > I have a Mason dhandler that generates an HTML page containing a form. > > The action of the form is to get the same page that is displayed. ?If the > > URL contains a certain parameter, an internal redirect is issued: > > Can you provide what versions of mod_perl, apache, and perl you are using? Server: Apache/2.2.9 (Debian) mod_ssl/2.2.9 OpenSSL/0.9.8g mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 > > Have you asked the Mason list also? Is there a reason why you aren't > using an external redirect here? Seems like you might want that > instead of the internal_redirect, since you are redirecting to a > different url. No, I didn't try the Mason list yet; it was just a stab in the dark that the problem lay with the perl handler and redirects. Although this server is not real busy, internal redirects have always made a big improvement speedwise over external (something I learned from the MP cookbook--many thanks to those guys). Thank you for taking a look. Mark > > > > > > URL: mydomain.com/information/dhandler/variable.html?modification=update > > > > <%args> > > $modification=>undef > > > > > > ... > > > > ... > > > > ... > > > > > > > > ... > > if ($modification eq "update"){ > > ? my $location = "/data_update?session=$session&" . $r->args; > > ? $r->internal_redirect($location); > > return OK; > > ... > > > > > > A Perl handler processes requests to /data_update and issues a new > > internal redirect to a third page: > > > > > > ? SetHandler perl-script > > ? PerlHandler MyApp::DataUpdate > > ? DefaultType text/html > > > > > > The third page (usually) displays correctly but there is trouble > > beneath. Following any link on the third page results in a display of > > gibberish--binary data except for the HTTP header buried midway through. > > This third page never causes any trouble except when approached through > > this internal redirect. > > > > > > I've probably left out all the information you need to know in order to > > suggest a solution. ?So I guess that's my question; where do I need to > > look more carefully? > > > > Sorry if *this* page is gibberish. ?Thanks for reading. > > > > Mark > >
intermittent segfaults, ssl?
Hi, I have a server like this: Server Version: Apache/2.2.9 (Debian) mod_ssl/2.2.9 OpenSSL/0.9.8g mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 I'm also using HTML::Mason I've been getting intermittent segfaults like this: child pid 10142 exit signal Segmentation fault (11) ever since in installed Apache2 in March. I am going to try to debug this, but I thought I would ask if anyone might have a suggestion based on this behavior: - no segfaults occur with 8 hours of an apache restart; the first fault can be 8 to 48 hours after restart, the 2nd may occur within seconds; there have never been more than 5 in a day. - I have observed these faults *only* for port 443 (ssl) requests. - The simplest case has been when a plain HTML page was served through mod_perl and mason; e.g. no database call. I know probably shouldn't be imposing on list-readers time without doing more work, but I just wonder is it isn't something really elementary that I'm missing. Mark
Re: intermittent segfaults, ssl?
Despite what I said, this seems to be CPAN bug 37027 or, in my case, Debian bug #520406 involving module DBD-mysql. Mark On Tue, Jan 12, 2010 at 12:24:17PM -0600, Mark Copper wrote: > Hi, > > I have a server like this: > Server Version: Apache/2.2.9 (Debian) mod_ssl/2.2.9 OpenSSL/0.9.8g > mod_apreq2-20051231/2.6.0 mod_perl/2.0.4 Perl/v5.10.0 > I'm also using HTML::Mason > > I've been getting intermittent segfaults like this: > child pid 10142 exit signal Segmentation fault (11) > ever since in installed Apache2 in March. > > I am going to try to debug this, but I thought I would ask if anyone > might have a suggestion based on this behavior: > - no segfaults occur with 8 hours of an apache restart; the first fault > can be 8 to 48 hours after restart, the 2nd may occur within seconds; > there have never been more than 5 in a day. > > - I have observed these faults *only* for port 443 (ssl) requests. > > - The simplest case has been when a plain HTML page was served through > mod_perl and mason; e.g. no database call. > > I know probably shouldn't be imposing on list-readers time without doing > more work, but I just wonder is it isn't something really elementary > that I'm missing. > > Mark
Re: mod_perl-2.0.4 with Apache 2.2.9 and perl 5.10.0 intermittent crashing
On Thu, Jan 28, 2010 at 04:30:04PM -0500, Pas Argenio wrote: >I resolved it, finally. Stupidly, we had created a symbolic link: >libmysqlclient.so.15 -> libmysqlclient.so.16.0.0 >(I guess our source build of mysql-5.1.32 only provides >libmysqlclient.so.16.0.0 but DBD-mysql-4.008 needs >libmysqlclient.so.15) >The fix was to get the real libmysqlclient.so.15 library from the >mysql.5.0.67 Sun package. We should have known software is rarely >FORWARD compatible! >Now to fix it the right way, maybe the latest DBD-mysql uses the .16 >library. >Anyway perl 5.10.0 does work (so far) on Solaris 10. > >On Thu, Jan 28, 2010 at 11:44 AM, demerphq <[1]demer...@gmail.com> >wrote: > > 2010/1/28 Pas Argenio <[2]pas.arge...@gmail.com>: > >> Thanks John. Currently, I'm building 32-bit for a Sparc platform and >also >> with man CPAN modules such as DBI and DBD. >> >> I just rebuilt everything carefully, but still coring often before >then >> displaying a page: >>Apache 2.2.8 Perl 5.10.0 mod_perl 2.0.3 >> >> I also turned on perl internal malloc >> >> Should I try 64-bit versions next, or fall back to perl 5.8.9? > > I recommend you try 5.8.9 > Yves > -- > perl -Mre=debug -e "/just|another|perl|hacker/" > > References > >1. mailto:demer...@gmail.com >2. mailto:pas.arge...@gmail.com Looks like Bug #37027 for DBD-mysql: mysql_auto_reconnect I struggled with this one a while back myself. Mark
logging $! with $r->log_error
Hi all, I stole this snippet years ago (and probably modified it improperly) only to learn yesterday it has a serious problem: unless(open MAIL, "| /usr/sbin/sendmail -t -i -F'...' -f'...''"){ $main::r->log_error("Couldn't open mail: $!"); return DECLINED; } namely this error: [Thu Dec 09 16:32:44 2010] [error] [client ...] Can't call method "log_error" on an undefined value at ... resulting in a 500 HTTP response (which I want very much to avoid). I can just remove the offending "$!", of course, but is then I won't get the error message when it *does* get set. So my question: when "open" to a pipe does not return a process PID and $! is not set, is there any other source of information regarding what caused the error? I'm pretty ignorant on this type of thing, so sorry if it's a stupid question. Mark
Apache2::SizeLimit for threaded MPM's
Hi, Do the the Apache2::SizeLimit modules released this year support threaded MPM's? I can't see what version is installed under Debian Lenny mod_perl2, but I imagine it's .91. At any rate the installed docs contain the caveat against threaded MPM's which seems to have been removed, but I don't see anything about it in the CPAN module changes file. Thanks. Mark Copper
Re: Apache2::SizeLimit for threaded MPM's
I should have searched the source file for that "die" command myself. Sorry for the noise; thanks for the gentle reply. MC On Thu, Dec 30, 2010 at 3:07 PM, Fred Moyer wrote: > On Thu, Dec 30, 2010 at 9:50 AM, Mark Copper wrote: >> >> Do the the Apache2::SizeLimit modules released this year support threaded >> MPM's? > > From lib/Apache2/SizeLimit.pm: > > 31 die "Apache2::SizeLimit at the moment works only with non-threaded MPMs" > 32 if Apache2::MPM->is_threaded(); > > Threaded MPMs make life more difficult here. You want to eliminate > the particular interpreter that exceeds the specified size, but does > that mean you just kill the thread which the interpreter is in, or do > you restart the entire httpd process? There is also multiplicity to > consider, which if I recall correctly is multiple interpreters per > thread. > >> >> I can't see what version is installed under Debian Lenny mod_perl2, >> but I imagine it's .91. At any rate the installed docs contain the >> caveat against threaded MPM's which seems to have been removed, but I >> don't see anything about it in the CPAN module changes file. >> >> Thanks. >> >> Mark Copper >> >