Re: Why do RaQ4is run mod_perl so slowly?

2001-08-19 Thread Perrin Harkins
very rare thing: a CPU-intensive web app. Doing some research with Devel::DProf and Time::HiRes is probably your next step. You need to find out where all that work is going. - Perrin

Re: Log Phase

2001-08-18 Thread Perrin Harkins
> Is there any way to get the content handling phase to send the content to > the client before the logging phase executes? Just use a cleanup handler instead of a log handler. - Perrin

Re: Problem with "use" getting the wrong file

2001-08-16 Thread Perrin Harkins
a variable you set with PerlSetVar to something different for each script. - Perrin

Re: PerlModule

2001-08-16 Thread Perrin Harkins
tandard module. Check your error_log for messages. - Perrin

Re: Problem with "use" getting the wrong file

2001-08-16 Thread Perrin Harkins
Is there a CPAN module that I can > import to overload the use command with something that takes the full > pathname into account perhaps? You can specify a full path to use/require. Check man perlfunc for the details. You can also specify a path relative to the current working directory if you don't like hard-coding full paths in your scripts. - Perrin

Re: Socket Nightmare On NT.

2001-08-15 Thread Perrin Harkins
ou should use CGI or PerlEx or something similar. - Perrin

Re: Restricting MP3 files being served

2001-08-14 Thread Perrin Harkins
> I have a lot of large MP3 files, and want to restrict the number that Apache > serves concurrently. Is this possible ? I'm posting it here since I assume > it would require some sort of module to achieve it. ?? (Win 32). You want mod_throttle. I don't know if it works on Windows. - Perrin

Re: mod_perl & s//g

2001-08-14 Thread Perrin Harkins
On Tue, 14 Aug 2001, Rasoul Hajikhani wrote: > Are there any traps that I should be aware of when using s//g? I was > reading the online mod_perl docs and could not find anything to that > effect. But I do recall working with Perrin (correct me if I am wrong > Perrin) that there were

Re: Children dying

2001-08-14 Thread Perrin Harkins
ke the child serves a request and immidiately dies. > > Does anyone have any ideas on how to figure out why this keeps happenning? There is info in the distribution and in the guide (debug section) on how to get stack traces of your code or of Perl itself. - Perrin

Re: HTTPD eating all RAM

2001-08-14 Thread Perrin Harkins
nd out which exactly variable are eating RAM ? > > I'm absolutely sure that I'm not useing global variables. You should read the guide at http://perl.apache.org/guide/ for more info on memory growth. Some growth over time is normal and you might want to use Apache::SizeLimit to control it. - Perrin

Re: url mangling/rewriting

2001-08-13 Thread Perrin Harkins
his solution, but > easy finding of these session ids is not desirable. ;) So, it's not really a session ID then; it's your session data. There are tons of two-way encryption modules on CPAN. Try looking at Crypt::CBC. - Perrin

Re: my OR our that is the question ?!

2001-08-09 Thread Perrin Harkins
> So what is the REASON for this copy-on-first-call behaviour.(there have to > be some reason, if i'm not totaly dull to see it ) It's called a closure. You can read up on it in the Camel book or in Damian Conway's OO book. - Perrin

Re: Compiling with RegistryLoader

2001-08-09 Thread Perrin Harkins
d twice during startup. Try upgrading to mod_perl 1.26, which fixes this bug. - Perrin

Re: Help with cookies

2001-08-08 Thread Perrin Harkins
> Umm... Is > > > return OK; > > the correct thing to return when using multiple handlers? Yes, according the mod_perl docs. It only stops if you return something other than OK or DECLINED. - Perrin

Re: Help with cookies

2001-08-08 Thread Perrin Harkins
>send_http_header or something similar), and print something to the client. Otherwise, your Set-Cookie header will never get sent out. Glad to see you're still mod_perl-ing. - Perrin

Re: Help with cookies

2001-08-08 Thread Perrin Harkins
ng > wrong? It depends on what's happening in that second module. If you don't send an actual response to the client, headers (including cookies) will not be sent out. - Perrin

PerlRequire/PerlModule and %INC

2001-08-06 Thread Perrin Harkins
discussion about this before, but I can't remember what the outcome was and I can't find it in the archive. - Perrin

Re: odd behavior with Cache::Cache

2001-08-05 Thread Perrin Harkins
s a separate locking API used to implement Apache::Session, it should be possible to just use, for example, Apache::Session::Lock::Semaphore without using any other part of Apache::Session. - Perrin

Re: odd behavior with Cache::Cache

2001-08-05 Thread Perrin Harkins
his way. It seems that the session pattern is generally used for transient data where last-save-wins is fine as long as the integrity of the data is protected during the actual writes. If you need fancier locking, you could try ripping the lock stuff out of Apache::Session. - Perrin

Re: Again, Modperl running scripts slower than non-modperl!?

2001-08-05 Thread Perrin Harkins
ode that hogs memory, and you'll need to control it somehow. Most people have servers more in the range of 10-40MB, with a bunch of that shared. - Perrin

Re: dbi abstraction layer on perlmonks

2001-08-03 Thread Perrin Harkins
Robert Landrum wrote: > The guide is a great thing, and removing items from it is risky. Think of it as refactoring.

Re: dbi abstraction layer on perlmonks

2001-08-03 Thread Perrin Harkins
sanity. >I'd also start working on the new docs for mod_perl 2.0, so I can see an >extended chapter on databases and persistence layers in the users guide. > I vote to cover only the mod_perl specific stuff in there, as you said above. >Perrin, would you like to be the da

Re: require v.s. do in modperl

2001-08-01 Thread Perrin Harkins
Gunther Birznieks wrote: > > At 07:16 PM 8/1/2001 -0400, Perrin Harkins wrote: > > > I have a CGI application where I do: > > > > > > require 'db.pl'; > > > > > > where db.pl defines some functions and variables related to connecting t

Re: Apache::DBI Oracle LOB problem

2001-08-01 Thread Perrin Harkins
ave you followed all the documentation on using LOBs in DBD::Oracle? Are you sure that LongReadLen is set high enough? - Perrin

Re: require v.s. do in modperl

2001-08-01 Thread Perrin Harkins
that the > "correct" way of doing things? No. Put the connect stuff in a subroutine and call it from your application. Things in the main section of a required file are only supposed to run once. - Perrin

Re: [OT] Inspired by closing comments from the UBB thread.

2001-08-01 Thread Perrin Harkins
> http://axkit.org/docs/presentations/tpc2001/anydbd.axp Is this basically a hash of SQL statements, indexed by DBD type? Or is there something more that I'm missing? (I should have gone to your TPC talk...)

Re: Not embedding SQL in perl

2001-08-01 Thread Perrin Harkins
f you keep changing them with each new value in the WHERE clause.) > Using RPC calls instead of language commands also improves speed, and > solves the "quoting" problem, too. The same goes for bind variables. - Perrin

Re: [OT] Inspired by closing comments from the UBB thread.

2001-08-01 Thread Perrin Harkins
working on one, but it's a big job and he's busy with Mason. - Perrin

Re: [OT] Inspired by closing comments from the UBB thread.

2001-08-01 Thread Perrin Harkins
.org/features/tmpl-cmp.html for a description of the available options. - Perrin

Re: [OT] Inspired by closing comments from the UBB thread.

2001-08-01 Thread Perrin Harkins
could put your SQL in a separate file, but I don't like that approach because it doesn't seem like you would be changing SQL without changing the other code very often. Having your SQL right next to where it's being used is convenient, and a HERE doc makes it easy to read. - Perrin

Re: More stuff not working with conversion to modperl?

2001-08-01 Thread Perrin Harkins
John Buwa wrote: > Isnt there a way to clear global variable to a null after a web transaction > is complete? Apache::PerlRun does that. - Perrin

[ANNOUNCE] Perl Templating Guide, v 0.9

2001-07-31 Thread Perrin Harkins
d practices for using templates in general Slouching towards 1.0, Perrin

Re: Buffering Output

2001-07-31 Thread Perrin Harkins
> Anybody know if exist some module how CGI::Out for buffering output in CGI script ? Is there a reason you can't just append everything to a variable until the end? If that won't work, you can tie STDOUT. Apache::Filter might help. - Perrin

Re: RewriteRule Proxy problems

2001-07-30 Thread Perrin Harkins
might try ^/(.*)\.asp(.*)$ for matching the whole query string, but I wouldn't thing it would be necessary with a greedy regex. - Perrin

Re: RewriteRule Proxy problems

2001-07-30 Thread Perrin Harkins
0 > (that's the same URL, but with a query string added), then I get a "404 > Not Found" error. Of course you do. Your regex ^/(.*)\.asp doesn't match that URL with the query string. - Perrin

Re: modperl confusing file/package

2001-07-28 Thread perrin
ne. One package name, one variable name = one variable. If you need two, they need to have different package names or different variable names. The file name is irrelevant. - Perrin

Re: Porting CGI scripts help needed

2001-07-26 Thread perrin
::compar_2ecgi::checkUser called at See http://perl.apache.org/guide/porting.html#Name_collisions_with_Modules_and The short answer is that all of your required files need to declare a package name, and then you can either use the full name to access their functions or have them export the function names. - Perrin

Re: Increasing Shared Memory

2001-07-25 Thread perrin
> > Shouldn't the libs load into shared memory? If so, how? DBI->install_driver() See http://perl.apache.org/guide/performance.html#Initializing_DBI_pm for more. - Perrin

Re: Increasing Shared Memory

2001-07-24 Thread perrin
connect to the database exit after the current request. Newly spawned children seem to connect okay. - Perrin

Re: Child Interprocess Data

2001-07-23 Thread Perrin Harkins
;s easy to get started with is the MLDBM::Sync module, which uses dbm files for sharing. - Perrin

Re: custom config directives

2001-07-14 Thread Perrin Harkins
> is there any good thorough documentation on building custom > config directives other than what's in the eagle book? i > left mine back in au and i don't really want to buy another > one :) You're in luck, that chapter is on-line: http://www.modperl.com/book/chapters/ch8.html

Re: Using mod_perl handlers for max speed?

2001-07-11 Thread Perrin Harkins
ripts? You can read more here: http://perl.apache.org/guide/porting.html#Transitioning_from_Apache_Regis - Perrin

Re: [ANNOUNCE] Hello World Benchmarks, updated

2001-07-11 Thread Perrin Harkins
s and averaging. I think it helps smooth out random bad runs, which do happen now and then. Any numbers on the new Apache::ASP CGI mode? - Perrin

Re: [ANNOUNCE] Hello World Benchmarks, updated

2001-07-11 Thread Perrin Harkins
uch! I would think it's worth doing one full run to prime each system. Or do you feel a need to include the initial compilation time? - Perrin

Re: [ANNOUNCE] Hello World Benchmarks, updated

2001-07-11 Thread Perrin Harkins
uch! I would think it's worth doing one full run to prime each system. Or do you feel a need to include the initial compilation time? - Perrin

Re: help about ap_pool in Perl

2001-07-11 Thread Perrin Harkins
> I need to save some status informations about each request (in my > "filter" each request passes through 3 phases : PerlTransHandler, > PerlAccessHandler and PerlHandler. You want $r->pnotes. - Perrin

Re: detecting ssl

2001-07-10 Thread Perrin Harkins
> no need to do a lookup or rely on PerlSetupEnv On I wouldn't think... > > my $ssl = Apache::URI->parse($r)->scheme =~ m/^https/; Or maybe just look at the port # of the request. - Perrin

Re: The latest templating system: PSP in DDJ

2001-07-09 Thread Perrin Harkins
27;s problems, but it might help some people find a tool that suits them. - Perrin

Re: CGI module or Apache

2001-07-09 Thread Perrin Harkins
Take a look at http://perl.apache.org/guide/ and read the stuff on libapreq. - Perrin

Re: Apache::SimpleTemplate (don't do it!)

2001-07-09 Thread Perrin Harkins
ols that compile in-line perl, because it doesn't eval anything or cache anything. The only real downside of this module is that coding repeated sections (loops) can't be done in-line, i.e. you have to use multiple files. That's a bit of a pain. - Perrin

Re: 2 questions

2001-07-09 Thread Perrin Harkins
t want your designers to have to think about it, you could pre-process the templates to translate the form elements to TT syntax. There's plenty of documentation for this module that covers the details of plugins and filters. - Perrin

Re: Apache::SimpleTemplate

2001-07-08 Thread Perrin Harkins
y to be database work or IPC of some kind that slows down an application. Under CGI, the caching schemes of many of these systems don't work. That does make a difference. - Perrin

RE: ePerl (fragment of Re: Apache::SimpleTemplate)

2001-07-08 Thread Perrin Harkins
perfect for some people who just want a simple solution that stays out of their way. Also, I believe that security issue Ged referred to was fixed by the author. - Perrin

Re: The latest templating system: PSP in DDJ

2001-07-07 Thread Perrin Harkins
aviors and business rules into simple > XML-like elements that content developers can use. > PSP shares the same basic elements with JSP..." Good grief! This sounds exactly like Apache::ASP with its XMLSubs feature. I give up. - Perrin

Re: Apache::SimpleTemplate

2001-07-07 Thread Perrin Harkins
going to be at the upcoming Perl conference in San Diego, you might enjoy my session called "Choosing a Perl Templating System." I'll be surveying the popular options and explaining some of the things that differentiate them. - Perrin

Re: Apache::SimpleTemplate

2001-07-07 Thread Perrin Harkins
.cpan.org/search?mode=module&query=template - Perrin

Re: returning one instance of an object per request

2001-07-06 Thread Perrin Harkins
turn $user; } Put it in some utility class that your other classes all use. Alternatively, you could make your User class cache itself in pnotes and just have everyone call new(), but that assumes you'll never want to use it outside of mod_perl. Also see Class::Singleton. - Perrin

Re: mod_perl child processes using way too much RAM

2001-07-02 Thread Perrin Harkins
> 2. Cause any httpd_perl child process which exceeds 20 megabytes in > memory usage to terminate after it's done. Apache::SizeLimit (and others) can do this. - Perrin

Re: API Design Question

2001-06-30 Thread Perrin Harkins
em during startup, since they won't be shared between child processes. - Perrin

Re: SSI Lost with Mod Perl?

2001-06-26 Thread Perrin Harkins
hing in a Brooklyn Larger Bath when this is done. I prefer the IPA, taken orally. - Perrin

Re: SSI Lost with Mod Perl?

2001-06-24 Thread Perrin Harkins
> IS there a way of pre-processing and post processing a handler? Only by using something like Apache::Filter. Apache itself does not support chaining handlers. - Perrin

Re: SSI Lost with Mod Perl?

2001-06-23 Thread Perrin Harkins
th SSI. The only way to do that is by using Apache::SSI and Apache::Filter, as described here: http://search.cpan.org/doc/KWILLIAMS/Apache-SSI-2.16/SSI.pm - Perrin

Re: SSI advocacy Was:: Multiple AddHandler statements

2001-06-23 Thread Perrin Harkins
the templating tools are pretty solid as well. - Perrin

Re: SSI Lost with Mod Perl?

2001-06-23 Thread Perrin Harkins
ache::SSI either alone or as a filter with Apache::Filter. Does that help? - Perrin (P.S. I'm in Brooklyn too!)

Re: SSI advocacy Was:: Multiple AddHandler statements

2001-06-22 Thread Perrin Harkins
d you can call for this. You could also look at CGI::SSI_Parser, which I have not used. - Perrin

Re: Curious About Require

2001-06-20 Thread Perrin Harkins
this way. Of course, do() doesn't check to see if your module returned true, but they are basically equivalent. TMTOWTDI. - Perrin

Re: ModPerl package Q

2001-06-20 Thread Perrin Harkins
nother reply to the server and never gets another > response back? But yes, it creates a new socket ref each time? It looks to me like you have a problem with scoping and closures. Try making $sock a global, i.e. change "my $sock;" to "use vars qw($sock);". Then put your close and undef stuff back in. - Perrin

Re: Curious About Require

2001-06-20 Thread Perrin Harkins
ime. Can't remember about PerlRun. > BTW, here is shorter version of your suggestion: > > BEGIN { do '/foo/bar/query.pl'; } That's what I used when porting someone's old perl4-ish code to PerlRun. Both of these quick fixes waste memory though. - Perrin

Re: Curious About Require

2001-06-20 Thread Perrin Harkins
: BEGIN { do "mail.pl"; } That will work, but it wastes memory by loading them multiple times per child. If you make them into real modules, they can be loaded from startup.pl and thus be in shared memory. - Perrin

Re: Cached Code Disappeared?

2001-06-19 Thread Perrin Harkins
ke sure that you aren't trying to open a socket (or filehandle, or database handle) in the parent process (during startup) and use it in the children. Each child will have to make a new socket the first time. Hope that helps, Perrin

Re: Capturing CGI output

2001-06-17 Thread Perrin Harkins
processing. Is there some way to capture that information? You could use LWP to make the request instead of using a subrequest, or you could use a modified version of Apache::PerlRun or Apache::Registry that fakes CGI and captures the output. You can look at Apache::Filter for some ideas. - Perrin

Re: templating benchmarks...

2001-06-13 Thread Perrin Harkins
I suspect that it's a combination of the database access and the network transfer. There is no difference in the amount of parsing going on, since it's all cached after the first time (per child). - Perrin

Re: templating benchmarks...

2001-06-13 Thread Perrin Harkins
lication (like this benchmark). Nevertheless, it's good to see some numbers, if only to convince Andy to finish his optimized XS version of the TT stash. - Perrin

Re: Apache pnotes

2001-06-11 Thread Perrin Harkins
ent that it will get cleared at the end of the request, even if your code dies for some reason. It's safer than doing the same thing with a cleanup handler that manually clears a global. - Perrin

Re: IP based instant throttle?

2001-06-11 Thread Perrin Harkins
IP) problem, but you still have to make exceptions for things like AOL proxies that can blast you with legitimate traffic. If thousands of AOL users all click on an ad banner in the same 10 seconds, you don't want to ban them. - Perrin

Re: Apache::Session / No-Cookie-Tracking

2001-05-25 Thread Perrin Harkins
TimeStamp + "R" + Unknown number + "E" > > By the way, the session only seems to active until the browser completely > shuts down. Any ideas? Sure sounds like a cookie to me. What makes you think it isn't one? Or else they just don't care who you are until you hit the shopping cart, and then they keep your identity with URLs and hidden form fields. - Perrin

Re: mod_perl and 700k files...

2001-05-12 Thread Perrin Harkins
certainly check it out. The only trouble with that is that you will have a separate copy in every child taking up 700K or more. You can only avoid that if you restart the server or use some kind of shared memory approach. - Perrin

Re: mod_perl and 700k files...

2001-05-10 Thread Perrin Harkins
hareLite or IPC::MM, but I think you'll still end with a scalar that takes up more than 700K in each child. If you can't live with that, you might try breaking up the file more so that you can access it in smaller chunks. - Perrin

Re: looking for a functin to move %fdat to the symbol table..

2001-05-10 Thread Perrin Harkins
It's not hard to do, but it is potentially dangerous since you could overwrite globals like $/ and change the behavior of your program. In general, it's best to avoid cluttering the symbol table. - Perrin

Re: mod_perl and 700k files...

2001-05-09 Thread Perrin Harkins
ge amount of memory. You might have better luck using dbm files or something similar that doesn't need to keep the whole thing in memory at once. - Perrin

Re: Throwing die in Apache::Registry

2001-05-04 Thread Perrin Harkins
handling this by > putting > the code in an eval block, but this no longer works since all Registry scripts > are already in one huge eval block. It should still work. An eval{} is scoped like any other block. Maybe you have a typo? Post your code and we'll look at it. - Perrin

Re: Exception modules

2001-04-30 Thread Perrin Harkins
or not bad user input should be handled with exceptions at all, but since I like to keep the controller code simple and let the data model objects do the input checking, you have to bubble it back up somehow. I'm still kind of unsatisfied with how difficult some of the user exception handling turned out to be, and I'll probably try something different next time - Perrin

Re: modperl/ASP and MVC design pattern

2001-04-20 Thread Perrin Harkins
ttp://www.template-toolkit.org/docs/default/index.html. - Perrin

Re: Fast DB access

2001-04-18 Thread Perrin Harkins
les. The developers give the code away for free, and do not hide the fact that it doesn't support transactions. There's no need for this kind of vitriol. - Perrin

Re: Fast DB access

2001-04-17 Thread Perrin Harkins
steal code from there. However, dbm is a good choice for this. You may find SDBM_File faster than DB_File if your records are small enough for it (I think the limit is 2K per record). - Perrin

Re: from the "quick hacks" department... x-bit controls mod_cgi

2001-04-16 Thread Perrin Harkins
here: http://groups.yahoo.com/group/modperl/message/27908 http://groups.yahoo.com/group/modperl/message/27943 - Perrin

Re: Dynamic httpd.conf file using mod_perl...

2001-04-16 Thread Perrin Harkins
> > It might be easier and more bulletproof to build the conf file > > off-line with > > a simple perl script and a templating tool. We did this with Template > > Toolkit and it worked well. > > - Perrin > > That would be fine and dandy, but it's not exa

Re: Dynamic httpd.conf file using mod_perl...

2001-04-16 Thread Perrin Harkins
worked well. - Perrin

Re: mac_check in eagle book

2001-04-16 Thread Perrin Harkins
where... The crypto section in Mastering Algoritms with Perl is a pretty good overview. - Perrin

Re: negative LocationMatch syntax?

2001-04-12 Thread Perrin Harkins
Matt Sergeant wrote: > > Is there a way I could use to specify a not condition? > > as in > > > > SSLVerifyClient require > > > > > > That would let me list the exceptions, and everything else would be > > restricted by default.. > > It's really frustrating, but this is *not* possible...

Re: Cutting down on the DEBUG bloat...

2001-04-10 Thread Perrin Harkins
t; syntactic sugar.. You could use Filter::CPP with #ifdefs for this. #ifdef DEBUGGING print STDERR $some_thing; #endif - Perrin

Re: mirroring data across a server cluster

2001-04-01 Thread Perrin Harkins
y not sound like such a bad idea after you examine some of the alternatives. It's really just one group's solution to the problem you're posing. There are replication tools for MySQL which are supposedly fairly easy to run. - Perrin

Re: Storable (lock_store lock_retrieve) question

2001-04-01 Thread Perrin Harkins
other processes may have done. If you want to avoid this, you'll need to do your own locking, or just use Apache::Session. - Perrin

Re: ASP / Apache

2001-03-28 Thread Perrin Harkins
small site should do fine on NFS. Since NFS-shared sessions already work with Apache::ASP, you could try it, benchmark it for your expected traffic, and then decide. - Perrin

Re: Getting a Cache::SharedMemoryCache started

2001-03-27 Thread Perrin Harkins
and only for that, but your Cache::* modules will work with any combination of threads and processes since the data is really stored outside of the interpreter in shared memory or files. Even if you use globals, they are only global to the current thread. - Perrin

Re: Getting a Cache::SharedMemoryCache started

2001-03-27 Thread Perrin Harkins
les on CPAN may have to change. - Perrin

Re: [ANNOUNCE} mod_perl moduile you may be interested in

2001-03-25 Thread Perrin Harkins
> have done a search on CPAN for "resume" and "cv" did not come up with anything > like what i am doing http://www.zeuscat.com/andrew/work/resume/formats.shtml - Perrin

Re: dbm locking info in the guide

2001-03-21 Thread Perrin Harkins
s David Harris pointed out, if it does do the right thing and re-read from disk, it's probably not much better than re-opening the database. I suppose it would avoid some Perl object creation though, so it would be at least a little faster. - Perrin

Re: dbm locking info in the guide

2001-03-20 Thread Perrin Harkins
long as you have a read-only app. For read/write, you have to tie/untie every time. Or use BerkeleyDB. - Perrin

Re: dbm locking info in the guide

2001-03-20 Thread Perrin Harkins
ut an external file! I think you'll still have problems with this technique, unless you tie/untie every time. I'm looking at the perldoc for DB_File version 1.76, at the section titled "Locking: the trouble with fd". At the very least, you'd have to call sync after acquiring a write lock but before writing anything. - Perrin

<    5   6   7   8   9   10   11   12   13   14   >