Re: some flawed benchmarks

2008-07-10 Thread Perrin Harkins
On Thu, Jul 10, 2008 at 1:28 AM, [EMAIL PROTECTED] wrote: and here's the conf (these tests were all running through a light mod_proxy front end too) Note that CGI and FastCGI don't need the proxy frontend. I'm not sure how well you can really compare the CGI emulation numbers to the

Re: some flawed benchmarks

2008-07-10 Thread Perrin Harkins
On Thu, Jul 10, 2008 at 11:43 PM, [EMAIL PROTECTED] wrote: If anyone's got any ideas about why the proxy is having as significant an impact as it is, i'd love to tweak it. There are some proxy settings in recent mod_proxy versions (apache 2.2) which you could experiment with. I haven't tried

Re: Super slow query

2008-07-09 Thread Perrin Harkins
On Wed, Jul 9, 2008 at 12:47 PM, Brian Dunning [EMAIL PROTECTED] wrote: Can someone spot a way to improve the performance of this query? I see that every time it runs, it's Copying to tmp table and then Creating sort index and taking way too long. You're sorting by a computed field. That's

[Mason] sharing Mason templates between WebApp classes

2008-07-09 Thread Perrin Harkins
Hi, I have an app built in Mason and MasonX::WebApp. I want to use the same templates and most of the same WebApp code for a new app. I could make two WebApps with a shared base class and put them at different URLs (/foo/ and /bar/), but I can't see how to make them share the same templates.

Re: [Mason] sharing Mason templates between WebApp classes

2008-07-09 Thread Perrin Harkins
On Wed, Jul 9, 2008 at 5:15 PM, Hans Dieter Pearcey [EMAIL PROTECTED] wrote: This is what multiple comp roots are for. That's actually the reverse of what I want. What you described would allow me to map the same URL to different components. What I want to do is map different URLs to the same

Re: [Mason] sharing Mason templates between WebApp classes

2008-07-09 Thread Perrin Harkins
On Wed, Jul 9, 2008 at 7:12 PM, Hans Dieter Pearcey [EMAIL PROTECTED] wrote: perldoc HTML::Mason::Interp, look for comp_root Sorry, I think you're misreading this. Look at this part: For example, given the above component roots and a component path of /products/index.html, Mason would

Re: [Mason] sharing Mason templates between WebApp classes

2008-07-09 Thread Perrin Harkins
On Thu, Jul 10, 2008 at 12:28 AM, Jonathan Swartz [EMAIL PROTECTED] wrote: Perrin, just so I understand: you want to share some components, and have some unique components, for both the top-level and internal component calls? Yes, but it would be fine to share all of the components if I can

Re: How to debug bizarre memory corruption in mod_perl

2008-07-09 Thread Perrin Harkins
On Wed, Jul 9, 2008 at 9:23 PM, Stephen Clouse [EMAIL PROTECTED] wrote: We had Perl::Critic for the Perl side of the app, and I've done some hacks to criticize the Mason code, but someone had disabled the ProhibitConditionalDeclarations policy. I'm thrilled to hear that this ultimately was

Re: How to debug bizarre memory corruption in mod_perl

2008-07-08 Thread Perrin Harkins
On Tue, Jul 8, 2008 at 1:23 PM, Stephen Clouse [EMAIL PROTECTED] wrote: I have an application that ran on mod_perl 1.3 and perl 5.8 for a long time, that I recently ported over to a Fedora 9 box, thus moving it to mod_perl 2.0 and perl 5.10. Are you running prefork, or threaded? Did you

Re: How to debug bizarre memory corruption in mod_perl

2008-07-08 Thread Perrin Harkins
On Tue, Jul 8, 2008 at 2:28 PM, Stephen Clouse [EMAIL PROTECTED] wrote: You might try reverting to Perl 5.8 or mod_perl 1.3 to determine what is causing the problem. Fedora currently ships with mod_perl 2.0 and perl 5.10. No good way to revert there :) I don't use vendor packages for this

Re: Lost connection to MySQL server during query (was Segfault when connecting during Apache startup)

2008-07-02 Thread Perrin Harkins
On Wed, Jul 2, 2008 at 5:12 AM, Tobias Kremer [EMAIL PROTECTED] wrote: No more errors there either! :) Great! I don't know anything about the internals but to me the mod_perl source looks like PerlModule is using require instead of use to load modules. I guess that is making the difference?

Re: secure media files without http_referer

2008-07-02 Thread Perrin Harkins
On Wed, Jul 2, 2008 at 1:41 PM, tmpusr889 [EMAIL PROTECTED] wrote: I created a captcha that must be entered on the page that contains the flash .swf which loads and plays the .flv video. The captcha is done in a PerlAccessHandler. Ok, and what does it do when you succeed? A cookie? A token

Re: secure media files without http_referer

2008-07-02 Thread Perrin Harkins
On Wed, Jul 2, 2008 at 3:18 PM, tmpusr889 [EMAIL PROTECTED] wrote: A cookie would certainly work, but I was trying to find something simpler. I don't know much about URL tokens. How would something like that work? Redirect them to a URL with ?auth=x in it. Check the token with an access or

Re: MySQL 5.0 and MyISAM

2008-07-01 Thread Perrin Harkins
On Tue, Jul 1, 2008 at 12:39 PM, Viktor Popov [EMAIL PROTECTED] wrote: We have a MySQL server 5.0 / MyISAM. We use it to store a data base for a site written on PHP. We have problems with the performance of the MySQL server when we have many clients in the same time. Can we use memcached in

Re: Lost connection to MySQL server during query (was Segfault when connecting during Apache startup)

2008-07-01 Thread Perrin Harkins
On Tue, Jul 1, 2008 at 3:42 AM, Tobias Kremer [EMAIL PROTECTED] wrote: Removing Apache::DBI makes the errors go away. Ok. First, check that you're on the latest version. Then, turn on the debug flag and see if it thinks it is reusing the startup connection or not. - Perrin

Re: Lost connection to MySQL server during query (was Segfault when connecting during Apache startup)

2008-07-01 Thread Perrin Harkins
On Tue, Jul 1, 2008 at 9:56 AM, Tobias Kremer [EMAIL PROTECTED] wrote: Yes, I'm using the latest 1.07 release. I already had the debug flag on and it's correctly telling me that it's skipping connection during server startup. Yes, but what does it tell you on the first connection AFTER

Re: Lost connection to MySQL server during query (was Segfault when connecting during Apache startup)

2008-07-01 Thread Perrin Harkins
On Tue, Jul 1, 2008 at 10:08 AM, Tobias Kremer [EMAIL PROTECTED] wrote: On server start: 20097 Apache::DBI skipping connection during server startup, read the docu !! 20097 Apache::DBI push PerlCleanupHandler 20097 Apache::DBI need ping: yes 20097 Apache::DBI new connect

Re: nginx load balance

2008-06-30 Thread Perrin Harkins
On Mon, Jun 30, 2008 at 3:18 AM, James Smith [EMAIL PROTECTED] wrote: I would consider using a shared memory solution to save traffic too from the database server (consider a solution based on memcached??)... No, don't use memcached for sessions. It's a cache, not a database. It trades

Re: Segfault when connecting during Apache startup with Apache::DBI

2008-06-30 Thread Perrin Harkins
On Mon, Jun 30, 2008 at 4:54 AM, Tobias Kremer [EMAIL PROTECTED] wrote: We never fork and I thought that Apache::DBI takes care of checking if a connection went stale by utilizing DBI's/DBD::mysql's ping() method? It does, but it can't stop you from doing things like putting a database handle

Re: Some perl regex help

2008-06-30 Thread Perrin Harkins
On Mon, Jun 30, 2008 at 12:47 AM, Alexander Burrows [EMAIL PROTECTED] wrote: I've been trying to read around forums and regex documents for perl but they seem unorganized and cryptic. So any help would be appreciated. This list is for mod_perl, not general Perl help. In the future, if you

Re: Lost connection to MySQL server during query (was Segfault when connecting during Apache startup)

2008-06-30 Thread Perrin Harkins
On Mon, Jun 30, 2008 at 9:28 AM, Tobias Kremer [EMAIL PROTECTED] wrote: Ok, I narrowed it down to the database connection initiated during server startup. As soon as I remove it the errors vanish completely. Good, that's major progress. Here are some snippets to illustrate what I'm doing: I

Re: nginx load balance

2008-06-30 Thread Perrin Harkins
On Mon, Jun 30, 2008 at 11:00 AM, Jeff Peng [EMAIL PROTECTED] wrote: what's the standard module for storing sessions in a database? I recommend CGI::Session. - Perrin

Re: nginx load balance

2008-06-30 Thread Perrin Harkins
On Mon, Jun 30, 2008 at 11:09 AM, Jeff Peng [EMAIL PROTECTED] wrote: How about Apache::Session? Is it more efficient under modperl? No, it's about the same, and CGI::Session is better maintained. Don't be fooled by the name: CGI::Session works well with mod_perl. - Perrin

Re: Lost connection to MySQL server during query (was Segfault when connecting during Apache startup)

2008-06-30 Thread Perrin Harkins
On Mon, Jun 30, 2008 at 1:40 PM, Tobias Kremer [EMAIL PROTECTED] wrote: Could you please show me the exact line in my example in which I put the database handle in a global during startup? On a closer look, you're not. You are keeping around your $foo closure variable in handler(), as well as

Re: nginx load balance

2008-06-29 Thread Perrin Harkins
On Sat, Jun 28, 2008 at 9:48 AM, Jeff Peng [EMAIL PROTECTED] wrote: But I have a question, does nginx support for session-keeping? A user's request, should go always to the same original backend server. Otherwise the user's session will get lost. I would advise you not to do this. It's a

Re: Apache::Template for modperl 2

2008-06-27 Thread Perrin Harkins
On Fri, Jun 27, 2008 at 3:28 AM, Senthil V [EMAIL PROTECTED] wrote: I am trying to install Apache::Template for Apache 2.2.8. If you look in the archives you'll see that this has been discussed many times. My general advice is to use something more flexible, like CGI::Application with its TT

Re: Segfault when connecting during Apache startup with Apache::DBI

2008-06-27 Thread Perrin Harkins
On Fri, Jun 27, 2008 at 5:51 AM, Tobias Kremer [EMAIL PROTECTED] wrote: Now if I could just get rid of those annoying random Commands out of sync and Lost connection to MySQL server during query errors that happen once in a while ... Those generally mean that you timed out (set MySQL's

Re: mod_perl caching problem

2008-06-26 Thread Perrin Harkins
On Tue, Jun 24, 2008 at 9:07 AM, william [EMAIL PROTECTED] wrote: Before asking here, I had read a few articles in perl.apache.org about caching issue in mod_perl, but I still don't get it right with my program when I had already changed the input, it still giving me the result of old input.

Re: mod_captcha

2008-06-26 Thread Perrin Harkins
On Wed, Jun 25, 2008 at 8:19 PM, Aaron Collins [EMAIL PROTECTED] wrote: I'm trying to write a perl based mod_captcha using the recaptcha service, I was wondering is someone could tell me which handler I should use that would allow me to have mod_perl intercept a request going to a specific

Re: Segfault when connecting during Apache startup with Apache::DBI

2008-06-25 Thread Perrin Harkins
On Wed, Jun 25, 2008 at 5:49 AM, Tobias Kremer [EMAIL PROTECTED] wrote: After de-installing the latest (self-rolled) DBI and DBD::mysql modules and installing the corresponding packages provided by Ubuntu (libdbd-mysql-perl and libdbi-perl) the segfaults are gone. It sound like this is a

Re: mod_perl: performance tips

2008-06-25 Thread Perrin Harkins
On Wed, Jun 25, 2008 at 11:19 AM, Christopher Taranto [EMAIL PROTECTED] wrote: Try here: http://www.modperlbook.org/ Specifically - Part II: mod_perl Performance Yes, read that, profile your code, and then ask for help with specific slow parts. There's lots of performance information in the

Re: mod_perl: performance tips

2008-06-25 Thread Perrin Harkins
On Wed, Jun 25, 2008 at 4:24 PM, tyju tiui [EMAIL PROTECTED] wrote: hmmm, I read the performance chapters from http://www.modperlbook.org/ but there really isn't much in the way of mod_perl-specific tweaks. It's mostly about hardware tips, benchmarking tips, and apache server tweaks (and of

Re: [Templates] LOAD_PERL parameter

2008-06-23 Thread Perrin Harkins
On Mon, Jun 23, 2008 at 3:10 PM, Keddie, Diane [EMAIL PROTECTED] wrote: Any reason why the default is 0? Security. Turning it on means you can load anything in @INC and call methods on it. - Perrin ___ templates mailing list

Re: Apache (httpd) + Persistant Perl (ModPerl/SpeedyCGI) + User Based Processes (SuExec) + Chroot

2008-06-23 Thread Perrin Harkins
On Mon, Jun 23, 2008 at 8:46 PM, James Austin [EMAIL PROTECTED] wrote: 1) Requires a new http server for each additional site/modperl application 2) Apache creates a set of workers for each instance (ususally about 7). With 7 required for the Top level proxy, and 7 for each site, this soon adds

Re: Error with max and group by

2008-06-21 Thread Perrin Harkins
On Sat, Jun 21, 2008 at 8:34 AM, Joe Pearl [EMAIL PROTECTED] wrote: Thanks, but this is not the result I want. I really think it is. You seem to be misunderstanding how GROUP BY works. In any other database than MySQL, the SQL you wrote would simply give an error. In MySQL, it gives you

Re: Error with max and group by

2008-06-20 Thread Perrin Harkins
On Fri, Jun 20, 2008 at 10:50 PM, Joe Pearl [EMAIL PROTECTED] wrote: I want to get back only the most recent entry for each person and I don't care about the order. I want the result to show Jim with the acq_date of 2008-01-03, Mary and Sally with the location and date for all of them.

Re: CGI.pm param and mod_perl

2008-06-13 Thread Perrin Harkins
On Fri, Jun 13, 2008 at 2:53 PM, Michael Peters [EMAIL PROTECTED] wrote: Doing a $q = new CGI means that you will get a new CGI object on every request, which is what you want. I've never used the function interface of CGI.pm like you did in your example so I don't know how CGI.pm handles it

Re: mod_perl BOF at YAPC::NA

2008-06-05 Thread Perrin Harkins
On Sat, May 31, 2008 at 7:59 PM, Adam Prime [EMAIL PROTECTED] wrote: YAPC::NA is only a few weeks away, and I stumbled upon the beginning of plans for a BOF there. Count me in. This should be fun. Work on your mod_php jokes. - Perrin

Re: [MP2]: no access to the perl source when using the perl debugger

2008-06-03 Thread Perrin Harkins
On Tue, Jun 3, 2008 at 4:51 AM, titetluc titetluc [EMAIL PROTECTED] wrote: The symptoms: the debugger is correcly called but does not dipslay the source script. My guess is that you are loading the code being debugged before calling Apache::DB-init(), so this code was compiled with no debugging

Re: mod_perl interactive debugging

2008-05-28 Thread Perrin Harkins
On Wed, May 28, 2008 at 3:33 AM, william [EMAIL PROTECTED] wrote: [EMAIL PROTECTED]:~$ sudo apache2 -X -DPERLDB -k restart [notice] Apache::DB initialized in child 10312 Do I have to use DDD to see the prompt ? No, it should just be right there in your terminal. It seems to be forking. Are

Re: [OT] connection limitation

2008-05-28 Thread Perrin Harkins
On Wed, May 28, 2008 at 12:54 PM, Sean Davis [EMAIL PROTECTED] wrote: I am looking for a meaningful way of limiting the number of connections (not really bandwidth, since we host VERY large static files) from a single IP. Any suggestions? If you search for bandwidth on this page, it will show

Re: Trouble with mod_perl, Archive::Zip and taint mode

2008-05-27 Thread Perrin Harkins
On Sun, May 25, 2008 at 3:45 PM, Roberto C. Sánchez [Sun May 25 08:57:35 2008] [error] [asp] [11570] [error] error executing code for include /var/www/templates/Photo_page_edit.tmpl: Insecure dependency in open while running setgid at /usr/lib/perl/5.8/IO/File.pm line 70. -- ; compiled to

Re: mod_perl interactive debugging

2008-05-27 Thread Perrin Harkins
On Tue, May 27, 2008 at 1:38 PM, william [EMAIL PROTECTED] wrote: Hello, I am trying to debug my perl code under mod_perl and I had followed all the instruction at this section http://perl.apache.org/docs/1.0/guide/debug.html#Interactive_mod_perl_Debugging I managed to see my perl debugging

Re: mod_perl2: handle session without CGI::Session

2008-05-27 Thread Perrin Harkins
On Tue, May 27, 2008 at 4:08 AM, mome [EMAIL PROTECTED] wrote: What do you means by Either get the session ID yourself and pass it to CGI::Session-new()? Does it mean I can simply create the session ID from any way eventhough hardcode e.g. 23asfsdfw22456 and pass it? Your session ID is in a

Re: mod_perl2: handle session without CGI::Session

2008-05-27 Thread Perrin Harkins
On Mon, May 26, 2008 at 10:48 PM, mome [EMAIL PROTECTED] wrote: When passing Apache2::Request object to CGI::Session-new() as the following sub authen_handler{ my $self = shift; my $req = Apache2::Request-new($r); my $session=CGI::Session-new(undef,$req,{Directory= $TMP_SESSION_FOLDER});

Re: Current working directory always /

2008-05-23 Thread Perrin Harkins
On Thu, May 22, 2008 at 11:37 PM, Foo JH [EMAIL PROTECTED] wrote: To conclude, I can't agree with your statement that people don't use threads. I disagree with that statement too. What I actually said was that most people don't use threads (since they are on Linux) and that people who don't

Re: Apache2::Request

2008-05-23 Thread Perrin Harkins
On Fri, May 23, 2008 at 4:49 AM, mome [EMAIL PROTECTED] wrote: I tried the following line without success sub my_handler { my $self = shift; my $r = shift; my $req = Apache2::Request-new($r, POST_MAX = 1M); You only want that additional shift at the beginning if you are calling your

Re: [OT] Solaris + Apache 2.2 / PHP 5 cluster config help

2008-05-22 Thread Perrin Harkins
On Wed, May 21, 2008 at 7:32 PM, Jonathan Vanasco [EMAIL PROTECTED] wrote: personally, i think one should always architect applications with separate DB handles for read/write/log/session at the outset. you can essentially make them 'one' handle until necessary... but it takes barely any time

Re: Current working directory always /

2008-05-22 Thread Perrin Harkins
On Thu, May 22, 2008 at 5:50 AM, william [EMAIL PROTECTED] wrote: Btw, could you tell me how does full paths increase security ? It prevents some attacks based on tricking your application into working on different files. If you don't assume a certain working directory, you won't be compromised

Re: Current working directory always /

2008-05-21 Thread Perrin Harkins
On Wed, May 21, 2008 at 7:52 AM, william [EMAIL PROTECTED] wrote: Sigh...Even ModPerl::RegistryPrefork does not work as what I want, why do they say Run unaltered CGI scripts under mod_perl when it is working differently with CGI ? /var/www/modperl/Dir/Test.pm package Dir::Test; Under

Re: Current working directory always /

2008-05-21 Thread Perrin Harkins
On Wed, May 21, 2008 at 10:28 AM, Philip M. Gollucci [EMAIL PROTECTED] wrote: You should almost always use full paths to files, think of threads. This is true in a module you plan to distribute on CPAN, but for local use you typically don't need to think of threads because most people will not

Re: very simple but slow query

2008-05-20 Thread Perrin Harkins
On Tue, May 20, 2008 at 7:05 AM, Wakan [EMAIL PROTECTED] wrote: can someone could explain where are problems in this query: EXPLAIN SELECT ID FROM ven_tes WHERE ID IN (SELECT ID FROM ven_tes WHERE ID_ven=6573) If that subselect only returns a single result, try using = instead of IN. MySQL

Re: Apache::DBI. Is it running?

2008-05-20 Thread Perrin Harkins
On Sat, May 17, 2008 at 5:28 PM, kropotkin [EMAIL PROTECTED] wrote: Despite using $Apache::DBI::DEBUG=1 #or 2 in my startup.pl script I cannot see any output in my error_log. This is the test I've seen for seeing if it is working. Make sure you set that AFTER you load Apache::DBI. You can

Re: New to mod_perl

2008-05-20 Thread Perrin Harkins
Hi Roy, I'm setting up a proxy using Apache 2.2.8 with mod_proxy and I need to add a custom request header with information that is currently stored in our MySQL server. I was thinking of using Apache to get user's IP address and pass it to mod_perl where mod_perl script will query the

Re: [OT] Solaris + Apache 2.2 / PHP 5 cluster config help

2008-05-20 Thread Perrin Harkins
On Sun, May 18, 2008 at 8:05 AM, Issac Goldstand [EMAIL PROTECTED] wrote: Also, do people have concrete benchmarks of keeping a read-only replication mysql on the webservers vs a single read/write shared mysql server? Any time you can spread the reads over multiple servers it will help. This

Re: [OT] Solaris + Apache 2.2 / PHP 5 cluster config help

2008-05-20 Thread Perrin Harkins
On Tue, May 20, 2008 at 4:00 PM, Issac Goldstand [EMAIL PROTECTED] wrote: Right - I know that in theory, but was worried about the disk/ram/cpu overhead of replicating the writes to all of the slave servers offsetting that benefit... Good point. I'd suggest you look at how much RAM you can

Re: segfault with perl 5.10 + MasonX::Request::WithApacheSession

2008-05-19 Thread Perrin Harkins
On Mon, May 19, 2008 at 5:12 AM, Louis-David Mitterrand ## When commented out perl 5.10 works fine request_class = 'MasonX::Request::WithApacheSession', session_class = 'Apache::Session::Postgres',

Re: Help write the mod_perl wiki page at the perl 5 wiki

2008-05-15 Thread Perrin Harkins
On Thu, May 15, 2008 at 9:41 AM, Aaron Trevena [EMAIL PROTECTED] wrote: I've added a little to the stub at http://www.perlfoundation.org/perl5/index.cgi?mod_perl Thanks! but it would be good if we could add more information about mod_perl and how to use it : * Good Articles * Relevent

Re: refactoring client's decision

2008-05-12 Thread Perrin Harkins
On Sun, May 11, 2008 at 2:52 AM, Marc Lambrichs [EMAIL PROTECTED] wrote: Secondly, what if we're running the cgi under speedycgi? You can do this with FastCGI if you run a different FastCGI backend for every virtualhost. The same thing would work with mod_perl if you run a different

Re: Edit HTTP response headers

2008-04-27 Thread Perrin Harkins
On Sun, Apr 27, 2008 at 9:18 AM, J Amuse [EMAIL PROTECTED] wrote: This link references the set method, which will overwrite the header value. I want to append text (i.e. append a secure and httponly flag if there is a Set-Cookie header in the HTTP response). Is this possible with the overlay

Re: [Templates] TT equivilent to Mason autohandler

2008-04-26 Thread Perrin Harkins
On Sat, Apr 26, 2008 at 4:38 AM, Aaron Trevena [EMAIL PROTECTED] wrote: Is there a TT equivalent to HTML::Masons autohandler, or a recipe that avoids needing it? WRAPPER is equivalent to what most people use autohandlers for. http://tt2.org/docs/manual/Directives.html#section_WRAPPER

Re: [Templates] TT equivilent to Mason autohandler

2008-04-26 Thread Perrin Harkins
On Sat, Apr 26, 2008 at 6:20 AM, Mihai Bazon [EMAIL PROTECTED] wrote: Now, in /admin/autohandler you can have the following: % if ($has_admin_privileges) { % $m-next_comp; # display admin page % } else { ... display login form ... % } When /admin/SOMETHING.html is requested, the

Re: [Templates] TT equivilent to Mason autohandler

2008-04-26 Thread Perrin Harkins
On Sat, Apr 26, 2008 at 9:19 AM, Andy Wardley [EMAIL PROTECTED] wrote: This is the bit that TT doesn't support. You have to define a single PROCESS template up front. You can't just drop a new one in a directory like you can with Mason. You sort of can. If you set the INCLUDE_PATH based

Re: Apache::DBI limit on connection pool

2008-04-25 Thread Perrin Harkins
On Fri, Apr 25, 2008 at 9:43 AM, Slinky [EMAIL PROTECTED] wrote: I'm making use of the two to maintain a pool of connections to Oracle. Well, you're not really. :) Apache::DBI doesn't do what most people would consider pooling since sharing connections between processes is not possible. It

Re: Apache::DBI limit on connection pool

2008-04-25 Thread Perrin Harkins
On Fri, Apr 25, 2008 at 3:08 PM, Philip M. Gollucci [EMAIL PROTECTED] wrote: FWIW: For what its worth, Stas and someone where workign on DBI::Pool, but gave up. See Also, httpd's mod_dbd and mod_dbd_mysql which would be cool to get some perl bindings for. If anyone actually needs a

Re: Slow Queries

2008-04-24 Thread Perrin Harkins
On Thu, Apr 24, 2008 at 2:54 AM, Sebastian Mendel [EMAIL PROTECTED] wrote: IMHO not in this case, cause it is just a simple WHERE field IN () I'm pretty sure that just looks like a bunch of ORs to MySQL. If it didn't use the index with OR, it won't use it with IN. What usually works is to

Re: [Newbie] MP2.0: PerlSendHeader versus PerlOptions (and Apache::Registry grrr...)

2008-04-24 Thread Perrin Harkins
On Fri, Apr 25, 2008 at 12:18 AM, Perl Junkie [EMAIL PROTECTED] wrote: PerlOptions ParseHeaders I think that should be +ParseHeaders. See http://perl.apache.org/docs/2.0/user/porting/compat.html#C_PerlSendHeader_ (2) It took me a while to figure out that Apache::Registry has become

Re: Best practices for returning 404/file-not-found pages inside and outside of mod_perl

2008-04-24 Thread Perrin Harkins
On Thu, Apr 24, 2008 at 4:16 PM, Mark Stosberg [EMAIL PROTECTED] wrote: No, I'm not. Are there debugging techniques that help me confirm this? Sorry Mark, I misread your mail. I thought you were using PerlSetVar. What are you doing exactly? PerlSetEnv PERL5LIB? - Perrin

Re: Slow Queries

2008-04-23 Thread Perrin Harkins
On Wed, Apr 23, 2008 at 9:22 PM, D Hill [EMAIL PROTECTED] wrote: Can anyone shed some light if I should index wite_desc to speed things up? No, since you don't use that column at all. If you're not on MySQL 5, upgrading to MySQL 5 will help. Otherwise, you're best bet is to rewrite the query

Re: Edit HTTP response headers

2008-04-23 Thread Perrin Harkins
On Mon, Apr 21, 2008 at 4:30 PM, J Amuse [EMAIL PROTECTED] wrote: when using f-read it appears as though the HTTP headers are not including. I know err_headers_out should have access to the headers, but is there a way to force f-read to access the HTTP headers as well? No, the headers are not

Re: No form data with POST

2008-04-23 Thread Perrin Harkins
On Tue, Apr 22, 2008 at 1:32 PM, Julian Dobson [EMAIL PROTECTED] wrote: I am using Apache/2.2.3 with a PerlTransHandler in which I decline CGI scripts. However, the CGI script isn't getting the data using CGI::Minimal (or any other version of CGI I care to try). Are you reading the POST data

Re: Performance

2008-04-22 Thread Perrin Harkins
On Tue, Apr 22, 2008 at 11:41 AM, Bruno B. B. Magalhães [EMAIL PROTECTED] wrote: I thing the most problematic part of those queries are the date range part, should I use a different index only for this column to maintain the index small? My experience with doing data warehousing in MySQL was

Re: Best practices for returning 404/file-not-found pages inside and outside of mod_perl

2008-04-22 Thread Perrin Harkins
On Tue, Apr 22, 2008 at 2:27 PM, Mark Stosberg [EMAIL PROTECTED] wrote: A. If I just set status = 404 with CGI.pm / Apache::Registry and return nothing, it works the first time, and then after that I get a lot of these errors: [Tue Apr 22 13:47:07 2008] [error] Can't locate

Re: body truncated on extra reads

2008-04-22 Thread Perrin Harkins
On Tue, Apr 22, 2008 at 10:51 AM, John ORourke [EMAIL PROTECTED] wrote: I'm curious - can anyone explain what actually happens internally if you try to read more from $r-read() than specified in the Content-Length header? What used to happen is it would hang the process forever. Not sure if

Re: parameters taintness

2008-04-22 Thread Perrin Harkins
On Mon, Apr 21, 2008 at 3:48 PM, Eli Shemer [EMAIL PROTECTED] wrote: eval{ tie %session, 'Apache::Session::MySQL', $id, { Handle = $dbh, LockHandle = $dbh }; } Same behavior as I previously mentioned when the Tainted is enabled in

Re: [Templates] Ok, which filter do I need this time.

2008-04-21 Thread Perrin Harkins
On Sat, Apr 19, 2008 at 3:59 PM, Sherwood Botsford [EMAIL PROTECTED] wrote: Now when I move foo, all I need to do is update foolinklabel in the database, and all the links are fixed on the next build. This is a basic CMS feature that pretty much all of them have. I've never heard of

Re: [Templates] Ok, which filter do I need this time.

2008-04-21 Thread Perrin Harkins
On Mon, Apr 21, 2008 at 9:59 PM, Sherwood Botsford [EMAIL PROTECTED] wrote: So far TT2+Markdown has been a win-win, except for this cross link problem. Might as well try to extend Markdown or write your own plugin then. One of TT's best features is how easy it is to write a simple perl class

Re: parameters taintness

2008-04-21 Thread Perrin Harkins
On Mon, Apr 21, 2008 at 12:21 PM, Eli Shemer [EMAIL PROTECTED] wrote: Problem is, When DBI Taint is on, the page is completely stuck and I cannot find any errors or warning in the error_log. Can you be a little more descriptive? What does stuck mean in this case? - Perrin

Re: parameters taintness

2008-04-21 Thread Perrin Harkins
On Mon, Apr 21, 2008 at 12:27 PM, Eli Shemer [EMAIL PROTECTED] wrote: Stuck meaning that I cannot logon to my web site at all. I have to close the explorer and open it again. Ok, you need to do some debugging. First I'd try connecting with telnet or a command-line browser like lwp-request so

Re: parameters taintness

2008-04-21 Thread Perrin Harkins
On Mon, Apr 21, 2008 at 12:45 PM, Eli Shemer [EMAIL PROTECTED] wrote: It's stuck on Waiting for... in the status bar Step away from the browser. If you've never learned how to debug a web request with telnet or lwp-request, this is a good time to learn. Just google telnet 80 debugging or

Re: parameters taintness

2008-04-21 Thread Perrin Harkins
On Mon, Apr 21, 2008 at 2:02 PM, Eli Shemer [EMAIL PROTECTED] wrote: Well, for now I've diagnosed it to crook due to the cookies/session operation. Because once I remove the cookie from my browser, everything works correctly. Ok, but you need to find what line in your code is having the

Re: parameters taintness

2008-04-21 Thread Perrin Harkins
On Mon, Apr 21, 2008 at 2:53 PM, Eli Shemer [EMAIL PROTECTED] wrote: I summed it down to this line of code my $id = $cookies{ANONYMOUS_ID}-value; if ($id =~ m/(.+)/) { $id=$1; } tie %session, 'Apache::Session::MySQL', $id, { Handle = $dbh, LockHandle = $dbh }; You need to

Re: [Mason] Help calling native Perl sub

2008-04-20 Thread Perrin Harkins
On Sun, Apr 20, 2008 at 9:22 PM, David Haynes [EMAIL PROTECTED] wrote: That's what I thought but it turns out not be true in my set up. For some reason, I can add 'use Foo' to my perl module and nothing complains. If you can say use NoSuchModule; and not see an error message, then there's a

Re: Installation of mod-perl under Cygwin

2008-04-20 Thread Perrin Harkins
On Fri, Apr 18, 2008 at 12:01 PM, Dunston Rocks [EMAIL PROTECTED] wrote: I have a complete installation of Cygwin on Windows XP Professional and have made the following attempts to install mod-perl 2.0 on the same 1. installed apache 2.2.8 2. Installed ActiveState 10x Hmm, I don't use

Re: [cgiapp] can AUTOLOAD sub be named AUTOLOAD?

2008-04-16 Thread Perrin Harkins
On Tue, Apr 15, 2008 at 11:09 PM, [EMAIL PROTECTED] wrote: Am I forced to name the AUTOLOAD method something other than AUTOLOAD? Doctor, it hurts when I do this... # CGI::Application community mailing list ##

Re: [cgiapp] can AUTOLOAD sub be named AUTOLOAD?

2008-04-16 Thread Perrin Harkins
On Wed, Apr 16, 2008 at 11:30 AM, [EMAIL PROTECTED] wrote: Perrin Harkins [EMAIL PROTECTED] wrote on Wed, Apr 16, 2008 at 09:30:48AM -0400: $self-run_modes(AUTOLOAD = catchall); sub mode1 : Runmode {} sub mode2 : Runmode {} sub catchall {} I'm not a fan of sub attributes

Re: Incorrect results from sum

2008-04-15 Thread Perrin Harkins
On Tue, Apr 15, 2008 at 4:21 AM, Sebastian Mendel [EMAIL PROTECTED] wrote: use UNION You can't use UNION to add the results of two queries. It would return two rows. - Perrin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: SQL query question for GROUP BY

2008-04-15 Thread Perrin Harkins
On Fri, Apr 11, 2008 at 4:01 PM, Victor Danilchenko [EMAIL PROTECTED] wrote: Oooh, this looks evil. It seems like such a simple thing. I guess creating max(log_date) as a field, and then joining on it, is a solution -- but my actual query (not the abridged version) is already half a

Re: reinitializing Perl's notion of $$ in mod_perl

2008-04-15 Thread Perrin Harkins
On Tue, Apr 15, 2008 at 8:51 AM, Mark Blackman [EMAIL PROTECTED] wrote: While I did find Torsten Förtsch's very useful Perl::AfterFork module, surely the mod_perl code must be doing something like this itself, no? I've been using fork, mod_perl, and $$ for years without a single problem. Did

Re: reinitializing Perl's notion of $$ in mod_perl

2008-04-15 Thread Perrin Harkins
On Tue, Apr 15, 2008 at 9:05 AM, Mark Blackman [EMAIL PROTECTED] wrote: My assumption is that perl caches the PID on startup and only reinitializes on perl fork(), thus in the embedded case a fork() outside the perl API doesn't reinitialize $$ at least for some cases. It must be a

Re: reinitializing Perl's notion of $$ in mod_perl

2008-04-15 Thread Perrin Harkins
On Tue, Apr 15, 2008 at 11:00 AM, Torsten Foertsch [EMAIL PROTECTED] wrote: There was/is a problem in mp1 that it did/does not reinitialize $$ and getppid(). Under what circumstances? I use $$ all the time and have never seen any sort of caching behavior from it. I use Linux. - Perrin

Re: Best practices for returning 404/file-not-found pages inside and outside of mod_perl

2008-04-15 Thread Perrin Harkins
On Tue, Apr 15, 2008 at 3:19 PM, Mark Stosberg [EMAIL PROTECTED] wrote: It seems that using CGI, it is too late return a true 404 once the script is processing the request. I thought mod_cgi would handle this, actually. It parses your header output. Apache::Registry has trouble emulating

Re: Incorrect results from sum

2008-04-14 Thread Perrin Harkins
On Mon, Apr 14, 2008 at 5:40 PM, Jonathan Mangin [EMAIL PROTECTED] wrote: select round(sum(my_menu.carb * units) + sum(simple.carb),2) from itemized inner join simple using (uid) left join my_menu on itemized.personal_id = my_menu.id; Instead of 218.3 this returns 602, which is (52.9

Re: Handing over the POST input to a virtual included part?

2008-04-14 Thread Perrin Harkins
On Mon, Apr 14, 2008 at 1:22 PM, Torsten Foertsch [EMAIL PROTECTED] wrote: Thanks, that is at least a starting point to think. But I don't know how large the request body can become. So, I thought of something like read and cache the request body in something like fixup of the main request

Re: Incorrect results from sum

2008-04-05 Thread Perrin Harkins
On Sat, Apr 5, 2008 at 9:28 PM, Jonathan Mangin [EMAIL PROTECTED] wrote: select itemized.day_date as day_date, round(sum(my_menu.carb * units) + simple.carb,2) from itemized inner join simple using (uid) inner join my_menu on itemized.personal_id = my_menu.id where itemized.uid = 'me' and

Re: Data Warehouse on MySQL questions

2008-04-03 Thread Perrin Harkins
On Thu, Apr 3, 2008 at 2:28 PM, Dre [EMAIL PROTECTED] wrote: 1) Several sources seem to suggest MyISAM is a good choice for data warehousing, but due to my lack of experience in a transaction-less world, this makes me a little nervous. MyISAM has the advantage of very fast loading. It's much

Re: share objects

2008-04-03 Thread Perrin Harkins
On Thu, Apr 3, 2008 at 11:32 AM, Felipe de Jesús Molina Bravo [EMAIL PROTECTED] wrote: I know I can share data between processes, but what I also shared objects? It depends on what you mean by share. You can create a simple perl object in startup.pl and access it from all processes later, but

Re: share objects

2008-04-03 Thread Perrin Harkins
On Thu, Apr 3, 2008 at 1:33 PM, Felipe de Jesús Molina Bravo [EMAIL PROTECTED] wrote: It depends on what you mean by share. You can create a simple perl object in startup.pl and access it from all processes later, but if you change it in one process, the change will not be seen in the

Re: perl at apachecon

2008-04-02 Thread Perrin Harkins
On Apr 2, 2008, at 1:07 PM, Brian Millett wrote: Wow, not many proposals. :-( I usually submit one, but the timing of the conference is terrible this year -- right in the middle of the US presidential election. There's no way I can get away from work then. - Perrin

Re: Many handlers in the same module

2008-03-31 Thread Perrin Harkins
On Wed, Mar 19, 2008 at 2:22 PM, Colin Wetherbee [EMAIL PROTECTED] wrote: In order to have many handlers in a file, I've put the following lines and other, similar lines in my virtual host configuration: PerlAccessHandler JetSet::Handler-AccessHandler PerlResponseHandler

<    2   3   4   5   6   7   8   9   10   11   >