Re: MP2 + Business::OnlinePayment::PayflowPro
Michael Peters wrote: SetEnv LD_LIBRARY_PATH /usr/local/verisign/payflowpro/linux/perl/lib I don't think LD_LIBRARY_PATH can be set from within Apache. It's one of those weird environment variables that can only be set from the parent process (security). So in whatever script you use to start/stop apache put it in there. I have tried both ways. In Apache $ENV{'LD_LIBRARY_PATH'} has the right path, while on the command line, $LD_LIBRARY_PATH is not set at all, so I was disinclined to pursue it; you got me thinking, though, and copying libpfpro.so to /usr/lib seems to work. Maybe this is preferable to setting LD_LIBRARY_PATH? Thanks for your help. -- ______ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
MP2 + Business::OnlinePayment::PayflowPro
I'm sure I'm missing something, maybe someone is kind enough to clue me in? Business::OnlinePayment::PayflowPro loads fine on the command line but with mod_perl (2.0.2) Apache2 throws: Can't load '/usr/local/lib/perl/5.8.7/auto/PFProAPI/PFProAPI.so' for module PFProAPI: libpfpro.so: cannot open shared object file: No such file or directory at... ldd /usr/local/lib/perl/5.8.7/auto/PFProAPI/PFProAPI.so correctly identifies: libpfpro.so => /usr/local/verisign/payflowpro/linux/perl/lib/libpfpro.so My present belief is that Business::OnlinePayment::PayflowPro and the PayFlowPro SDK are correctly installed but modules loaded through Apache are missing something present on the command line. My Apache Config has: SetEnv PFPRO_CERT_PATH /usr/local/verisign/payflowpro/linux/certs SetEnv LD_LIBRARY_PATH /usr/local/verisign/payflowpro/linux/perl/lib -- ______ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
Re: regular expressions
Malka Cymbalista wrote: Can anyone recommend a good book on regular expressions. I don't need a beginners book - I know how to work with regular expressions but I want to be able to understand and use everything and anything that can be done with regular expressions -I guess I would say that I need an advanced book. Thanks for any suggestions. perldoc perlre Mastering Regular Expressions by Jeffrey Friedl (published by O'Reilly, ISBN 1556592-257-3). -- __ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
Re: [MP2] Apache2::Request trouble with POST_MAX
Philip M. Gollucci wrote: Apparently POST_MAX cannot be used to raise APREQ_DEFAULT_READ_LIMIT Yes, thats the if (ctx->read_limit > bytes && ctx->bytes_read < bytes) { ctx->read_limit = bytes; return APR_SUCCESS; } OTHERWISE conflicting Ok, now I understand. http://libapreq2.p6m7g8.net/group__mod__apreq2.html Docs will be on the apache.org site once 2.08 is released. Thanks again. -- ______ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
Re: [MP2] Apache2::Request trouble with POST_MAX
Philip M. Gollucci wrote: #define APREQ_DEFAULT_READ_LIMIT (64 * 1024 * 1024) is the default. Ack! Of course, and I apologize for misleading you. my $POST_MAX = 1024*1024*10; # Works fine my $POST_MAX = 1024*1024*100; # Conflicting Apparently POST_MAX cannot be used to raise APREQ_DEFAULT_READ_LIMIT Are there any docs for the APREQ2_ReadLimit directive? I just want to know to what containers it can be restricted. Thanks for your help. -- __ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
[MP2] Apache2::Request trouble with POST_MAX
I've tried numerous variations, but can't get POST_MAX to work properly. Everything works fine without it. my $POST_MAX = 1024*1024*10; my $req = Apache2::Request->new($r, POST_MAX => $POST_MAX); The error log tells me only "Conflicting information", which seems exceedingly unhelpful. Can someone point me in the right direction? -- ______ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
[mp2] symbol lookup error on Debian (testing)
Can anyone guide me in the right direction? I'm trying to run a recent mod_perl2 setup on Debian but I've run in to: /usr/sbin/apache2: symbol lookup error: /usr/lib/perl5/auto/APR/Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2 I am using the following packages from Debian testing: libfile-copy-recursive-perl/testing uptodate 0.19-1 libapreq2/testing uptodate 2.07-1 libapache2-mod-perl2/testing uptodate 2.0.2-2 libdb4.3/testing uptodate 4.3.29-4.1 perl-modules/testing uptodate 5.8.8-4 libapr0/testing uptodate 2.0.55-4 libc6/testing uptodate 2.3.6-7 libapache2-request-perl/testing uptodate 2.07-1 libdb4.4/testing uptodate 4.4.20-3 perl/testing uptodate 5.8.8-4 tzdata/testing uptodate 2006c-2 perl-base/testing uptodate 5.8.8-4 libapache2-mod-apreq2/testing uptodate 2.07-1 locales/testing uptodate 2.3.6-7 libperl5.8/testing uptodate 5.8.8-4 Everything else is Debian stable. -- __ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
Re: [MP2] Disable Perl*Handlers for sublocations
Frank Maas wrote: > You state that this is an Apache thing, but I tend to disagree slightly. > All handlers are defined using a Perl* prefix and this triggers mod_perl, > not Apache. AFAIK the Apache configuration does not let you tamper with > the request-phases directly. You are correct, and had I done more than make a guess I would have seen that for myself; more generally, however, I was attempting to point out that I believe mod_perl gives enough control over all Apache phases to accomplish your goal, either with Config Directives (as I thought) or by simply adding another handler (as Geoff suggested). If your handlers are specific to VirtualHost containers, another approach would be to call your images from a different VirtualHost (images.host.tld); using mod_rewrite/mod_alias you wouldn't even have to change the HTML. -- ______ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
Re: [MP2] Disable Perl*Handlers for sublocations
Frank Maas wrote: >> >> SetHandler none >> > > This seems to disable the PerlHandler, but the Perl*Handlers remain > intact. I have defined a PerlAuthenHandler, PerlAuthzHandler and a > PerlFixupHandler for / and would like to disable all for /images. Is > that at all possible (with MP2)? And if so: how? This really has more to do with Apache than mod_perl. Look at the Apache docs for mod_access & RemoveHandler. http://httpd.apache.org/docs/2.0/ Anything you can override, you can also restore. In the case of authorization & authentication it can be as simple as: Allow from all -- __________ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
Re: Greetings - Looking for direction
Sean Kelly wrote: > Long story short, I started out looking for a way to have Apache > automatically append a standard footer to the bottom of pages whether > html, php, cgi or other files/locations that I matched. Searching > around, I found that Apache::Sandwich was probably a decent way to > accomplish this. One problem: I’m running Apache 2.0.54 and mod_perl2: > no Apache::Sandwich for me. It sounds like you may want an output filter, rather than a content handler; have you looked at mod_include? http://httpd.apache.org/docs/2.0/filter.html If you decide to write your own filter, here is a good place to start: http://perl.apache.org/docs/2.0/user/handlers/filters.html -- ______ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
Re: Setting a module to handle the requests to /
Octavian Rasnita wrote: > Is it possible to configure httpd.conf in such a way that when the users > request the / directory, that module will handle it, but if the users > request for a static file like /style.css for example, that file is served? > > I have tried: > > > SetHandler perl-script > PerlResponseHandler Foo::Bar > Sorry for the delayed reply, I've been lax in my reading. Here is another way, add your images and static files to locations with default handlers: SetHandler none SetHandler none Then /inc/style.css will work as expected. I have actually configured my site this way. -- ______ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
Re: Apache::Session cleanup
___cliff rayman___ wrote: > I believe that deleting them via the cron is the standard method. This makes sense, though I had hoped for something more perlish. > I actual use a more complex technique that looks into the session to > decide if it is a session worth saving, such as it contains an affiliate > referral, or cart data, etc.. > I posted the same question on perlmonks and got some sample code for reading the frozen/base64 encoded hash used by Apache::Session::DBI http://perlmonks.com/?node_id=492983 -- __ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
Apache::Session cleanup
I'm using mod_perl2 + Apache::Session::MySQL and I'm wondering what to do with stale sessions. Does Apache::Session do any cleanup or do I need to explicitly tied(%session)->delete; ? I'm storing session IDs in cookies for 60 days, so I'd like to limit sessions similarly. I could certainly run a cron for this, but is there a better way? -- ______ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
[mp2] libapreq2 error
When trying to use Apache2::Cookie I get: /usr/sbin/apache2: symbol lookup error: /usr/lib/perl5/site_perl/5.8.6/i686-linux/auto/APR/Request/Apache2/Apache2.so: undefined symbol: apreq_handle_apache2 Is this a problem with libapreq2-2.05-dev or with my mod_perl configuration? -gh -- __ Garrison Hoffman Codefix Consulting 1.718.210.3445 [EMAIL PROTECTED] http://codefix.net/ 1.866.456.0584
Re: [JOB] Perl Programmer for large-scale Apache/mod_perl development
Perrin Harkins wrote: > Guys, I understand that you're interested in discussing the dynamics of > programming teams and hiring approaches, but it really isn't on-topic > for this list. It isn't even specifically about Perl. Maybe one of you > could start a thread on http://discuss.joelonsoftware.com/?biz and post > the URL here for others who want to join? If the parent post is considered on-topic, why would you want to discourage discussion, even if it becomes a wee bit tangential? I'll admit that I'm naturally paranoid, but I'd be far less suspicious if you didn't work for the company in question and hadn't already posted in this thread. -gh -- ______ Garrison Hoffman (718) 210-3445 Codefix Consulting, Inc. http://codefix.net/
Re: [JOB] Perl Programmer for large-scale Apache/mod_perl development
Ian D. Stewart wrote: > It has been my personal experience that alot of the design > breakthroughs happen as a direct result of informal conversations in > the hallways, around the watercooler, in the smoking area, etc. This > sort of dynamic interaction just isn't possible in a telecommute > situation. Don't confuse your personal experience with what's possible; I've been involved with a couple long term projects where I've met few or none of the other team members face to face and I find the same kind of interactions taking place on the phone (VoIP really helps), instant messaging, and even e-mail. I believe the key is lots of interaction, not proximity. The most likely reason for negative telecommuting experiences is poor communication skills; unfortunately this is quite common. > Restricting the job search to the local market also helps to avoid > the conflicts that invariably arise when working with folks from very > different cultural mindsets. In New York City? Have you ever been here? Peopling your team with programmers who look like you, sound like you, and write code like you may feel good, but it's not the way to create the best team. -gh -- ______ Garrison Hoffman (718) 210-3445 Codefix Consulting, Inc. http://codefix.net/
Re: 200 OK error with Text::Template
On Mon, 2004-07-26 at 14:52, Stas Bekman wrote: > All handlers require a return status. You can read more about this here: > http://perl.apache.org/docs/2.0/user/handlers/intro.html#What_are_Handlers_ > http://perl.apache.org/docs/2.0/user/handlers/intro.html#Handler_Return_Values > > In Perl if you don't have an explicit return() call in a subroutine, the > result of the last expression is used as a return value. so your other > subs had happened to work if they were returning an Apache::OK (whose > int value is 0). That makes complete sense (Thank You), but I'm still a bit unclear as to why another mp2 script, ending in a print statement, does not exhibit this- although I suppose I should just put in a proper return value and move on. Thanks again to all who replied. -- ----- Garrison Hoffman, Technology Consultant (718) 210-3445 http://codefix.net - -- 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
Re: 200 OK error with Text::Template
On Mon, 2004-07-26 at 13:25, Randy Kobes wrote: > Does it help to have >return Apache::OK; > as the last line in the handler? (you might also want to > return Apache::SERVER_ERROR, and log the > $Text::Template::ERROR, if that case arose). It does indeed. Can someone explain what's happening here (my other scripts don't require return Apache::OK;) or point me to some documentation I should have read? Thanks for your help. -gh -- --------- Garrison Hoffman, Technology Consultant (718) 210-3445 http://codefix.net - -- 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
200 OK error with Text::Template
I'm attempting to use Text::Template w/ mp2. The following code generates no error in the log, produces the expected output but also tacks on the 200 OK The server encountered an internal error... Is this an issue with Text::Template or am I doing something wrong? package Codefix::ttdemo; use strict; use warnings; use Text::Template; use Apache::RequestRec (); use Apache::RequestIO (); use Apache::Const -compile => qw(OK); sub handler { my $r = shift; my $filename = '/var/www/test'; my $template = Text::Template->new(DELIMITERS => [''], SOURCE => "$filename") or die "Couldn't construct template: $Text::Template::ERROR"; my %vars = (filename => "$filename"); $r->content_type('text/html'); my $result = $template->fill_in(HASH => \%vars); if (defined $result) { print "$result\n"; } else { die "Couldn't fill in template: $Text::Template::ERROR" } } 1; -- - Garrison Hoffman, Technology Consultant (718) 210-3445 http://codefix.net - -- 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
Re: mod_perl 1.99_13 / apache 2.0.x / mysql 4.1.1 - connection problem
On Tue, 2004-05-11 at 05:02, Erik Scholtz, ArgonSoft GmbH wrote: > failed: Client does not support authentication protocol requested by > server; consider upgrading MySQL client at This may help: http://dev.mysql.com/doc/mysql/en/Old_client.html -- - Garrison Hoffman, Technology Consultant (718) 210-3445 http://codefix.net - -- 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
Re: mod_perl 1.99_13 / apache 2.0.x / mysql 4.1.1 - connection problem
On Tue, 2004-05-11 at 05:02, Erik Scholtz, ArgonSoft GmbH wrote: > failed: Client does not support authentication protocol requested by > server; consider upgrading MySQL client at This may help: http://dev.mysql.com/doc/mysql/en/Old_client.html -- - Garrison Hoffman, Technology Consultant (718) 210-3445 http://codefix.net - -- 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