Re: load/regression test builders, monitoring tools for mod_perl apps
Does anyone know of any good open source test builders for regression/performance-testing a mod_perl app? This is the essence of what I would want such a suite to do: RECORD: -set up a proxy server to forward HTTP requests to a mod_perl'd server. -capture all GET/POST requests from the client and log them to a file, along with the server's output. The server's output would be the 'master' copy. PLAYBACK (REGRESSION): -play back the GET/POST requests and capture the output. Compare the output against the master copy. Raise an error in the log file if the two differ. PLAYBACK (LOAD): -play back the GET/POST requests according to some load scheme to see how well the application holds up under load. If this doesn't exist, I think it would be easy enough to write using LWP; I just don't want to duplicate anyone's efforts. Not that I know of, but yes LWP should be a good solution. And I would be interested in collaborating on testing this tool, if you choose to work on it! BTW, for client side based benchmarks see: http://perl.apache.org/guide/performance.html#Tuning_the_Apache_s_configuratio I'd also be interested to know if anyone knows of any good webserver monitoring programs that could automatically kill spinning httpds, short of a CRON job. FYI-- I have encountered mystery spinning httpd's as well, but I have always been able to pin it down on bad/risk code or thrashing. At any rate, I still need to be able to kill spinning httpds should it come to that. Yup, http://perl.apache.org/guide/control.html#Monitoring_the_Server_A_watchdo http://perl.apache.org/guide/control.html#Preventing_from_modperl_process_ ___ Stas Bekman mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC www.apache.org www.perl.com == www.modperl.com || perl.apache.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: [SITE] the great redesign of 1999
At 09:12 19/10/1999 +0200, Stas Bekman wrote: We were planning to put a good deal of the stuff into a db too I think. I guess it doesn't matter too much if we have duplicated content as long as it is in sync. We will have to take into account what you are doing so that we can cross-link whenever it makes sense. Of course it does matter not to have the stuff duplicated, since it's a nightmare to keep 2 things in sync, but why should we doing that? I don't see any reason... We wanted to do that to complement the current site, if you are going to do that anyway, there is no reason, why we wouldn't put our efforts to create other useful things... Sorry, I tend to shorten what I think too much to say what I really think, ah! if only we had lossless expression ;-) Yes of course it does matter if we are duplicating the information *source*. What I meant to say is that if the same information makes sense in two different contexts -- even very close context -- then it doesn't matter if it is available in both (imho). What I'm worried/thinking about is layout disparity. I think that information pertaining to jobs or success stories needs to be present on the mod_perl site. It would feel awkward to jump to another site for that, even when both layouts are good if they are (too) different it looks messy. So if that information is meaningful within modperl.sourcegarden.org and within perl.apache.org, mirroring the info in a database daily (or using one source) really doesn't sound like a dreadful technical challenge to me. But I must add to that that there is something within me that wishes to speak against duplication, even if it doesn't become a technical nightmare. However, it can't seem to find arguments to support itself. I am totally open to discussion on this point. Anyway, let's stop talking about "you" and "we", we are all "we" :) No competition, only collaboration. You'd expect competition to have crossed my mind and be rejected, but it actually hasn't. I am very happy to learn that part of the job has been / is being done. I think one important thing would be to decide what goes into modperl.sourcegarden.org, what goes into perl.apache.org and perhaps what goes into both. Duplicating efforts would be of course stupid, and drawing the line between site that intertwine and sites that truly overlap can only help. James is working on this application, which is in pretty good stage (James?), why in the world would you want to write something else from scratch? James' tool will be able to index jobs, ISPs, application, modules whatever... So I think that the best idea would be to join James, and in a joint effort deliver it sooner, influencing on the way the final set of features... I totally agree. But as always, I might be wrong, so it's just an idea... I'm very delighted to know that you started to work on the new site and I'm in no way would try to stop or provide deconstructing thoughts :) I might be wrong too, otherwise I probably wouldn't bother discussing these projects :-) Your thoughts are very far from deconstructive to say the least, and I hope mine aren't either. If they sound like they are, I've probably misexpressed myself. Matt and I are working on an outline, we probably should share what we've got. PS: maybe we should take this discussion to the mod-cvs list ? .Robin Critic, n.: A person who boasts himself hard to please because nobody tries to please him.
Re: [SITE] the great redesign of 1999
At 09:12 19/10/1999 +0200, Stas Bekman wrote: We were planning to put a good deal of the stuff into a db too I think. I guess it doesn't matter too much if we have duplicated content as long as it is in sync. We will have to take into account what you are doing so that we can cross-link whenever it makes sense. Of course it does matter not to have the stuff duplicated, since it's a nightmare to keep 2 things in sync, but why should we doing that? I don't see any reason... We wanted to do that to complement the current site, if you are going to do that anyway, there is no reason, why we wouldn't put our efforts to create other useful things... Sorry, I tend to shorten what I think too much to say what I really think, ah! if only we had lossless expression ;-) Yes of course it does matter if we are duplicating the information *source*. What I meant to say is that if the same information makes sense in two different contexts -- even very close context -- then it doesn't matter if it is available in both (imho). That makes sense. But you should understand my motives for moving to modperl.sourcegarden.org. Otherwise there was no reason not do everything at perl.apache.org. So, perl.apache.org is just a VH at apache.org. You have almost no ability to add components to the system, and of course no root access. Installing mod_perl, mysql, modules is absolutely possible technically, but in reality it isn't, because no matter whether you have a root access or not, the resources are limited... I guess other resources to... With SourceGarden I've everything I want and need, thanks to Scream Design team folks! That's why I feel much better creating for this site, and I cannot tell myself, I don't feel like adding this feature, since it's a headache to ask permission to do that and chances that the it would be approved... So we (the folks behind SourceGarden) have no excuses not to do something, so we do it... I'm not sure whether you have thought about the described limitations as part of your plan. But if you come up with solution that will allows us to run mod_perl and mysql at perl.apache.org - I think we would be delighted to have James' tool running on perl.apache.org, so you wouldn't jump between sites... For me as of this moment perl.apache.org is a gopher site (remember that name?), with links for downloading docs and mod_perl. And that's not far from truth. If we succeed to revive perl.apache.org to make it a dynamic site, I don't see any reason to have all the functionality we wanted to add to SourceGarden there. Our main goal is different - a greenhouse for mod_perl sw. That's it I think! But as always, I might be wrong, so it's just an idea... I'm very delighted to know that you started to work on the new site and I'm in no way would try to stop or provide deconstructing thoughts :) I might be wrong too, otherwise I probably wouldn't bother discussing these projects :-) Your thoughts are very far from deconstructive to say the least, and I hope mine aren't either. If they sound like they are, I've probably misexpressed myself. Argh... Just wanted to keep your spirit up :) Matt and I are working on an outline, we probably should share what we've got. PS: maybe we should take this discussion to the mod-cvs list ? The problem is that not many people are subscribed on this list and I still beleive that more people might be interested in providing a feedback. As long as we keep [SITE] token in the subject I think it can be easily discarded by uninterested folks. Correct me if I'm wrong... ___ Stas Bekman mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC www.apache.org www.perl.com == www.modperl.com || perl.apache.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
RE: unresolved symbols in Embperl make test (was: new for embperl...)
I'm sorry that I misunderstood your mail last time. Do I have to reinstall apache or both apache and mod_perl. yes I couldn't find the hints in the FAQ. Could you please point me out where the document is located. Look at http://perl.apache.org/embperl/Faq.pod.1.html#Running_make_test_fails_with_a Which OS you are using? On my Linux box I can use "nm" to show the symbols Apache exports, e.g. nm apache_1.3.9/src/httpd shows all the symbols. If there is nothing shown you have to rebuild Apache, until you see the symbols, that are showns in the make test error message. Hope this helps Gerald Thank you very much, --apple Gerald --- Gerald Richter ecos electronic communication services gmbh Internet - Infodatenbanken - Apache - Perl - mod_perl - Embperl E-Mail: [EMAIL PROTECTED] Tel:+49-6133/925151 WWW:http://www.ecos.de Fax:+49-6133/925152 ---
RE: Embperl and Apache LogLevel configuration
Nothing gets reported to the error log when those lines are commented out, no matter apache's LogLevel setting. The entry in the logfile that I'm seeing is apparently coming from the printing to stderr. I also have the same problem under a simpler configuration on Solaris (no ssl, no added CFLAGS). I did very standard things in the installation: ...and Embperl runs under mod_perl? Not as CGI? In CGI Mode the only chance is to print to stderr, which always shows up in the error log. Under mod_perl, the timestamp should apear and the message only get's logged when loglevel is error or below. If you run under mod_perl, how do you call the page? Gerald --- Gerald Richter ecos electronic communication services gmbh Internet - Infodatenbanken - Apache - Perl - mod_perl - Embperl E-Mail: [EMAIL PROTECTED] Tel:+49-6133/925151 WWW:http://www.ecos.de Fax:+49-6133/925152 ---
Re: [SITE] the great redesign of 1999
Stas Bekman [EMAIL PROTECTED] wrote: Anyway, let's stop talking about "you" and "we", we are all "we" :) No competition, only collaboration. James is working on this application, which is in pretty good stage (James?), why in the world would you want to write something else from scratch? James' tool will be able to index jobs, ISPs, application, modules whatever... So I think that the best idea would be to join James, and in a joint effort deliver it sooner, influencing on the way the final set of features... But as always, I might be wrong, so it's just an idea... I'm very delighted to know that you started to work on the new site and I'm in no way would try to stop or provide deconstructing thoughts :) Since you asked :), I thought I'd give a brief description of where the code is: Fresh::Index - Database viewer - provides indexes and record views Fresh::User - Manages user accounts - requests, editing, resetting Fresh::DBI - Manages direct database interaction - used by other Fresh:: modules I would put Fresh::Index at 75% finished, Fresh::User at 50% and Fresh::DBI at 80%. Module configuration is a combination of database tables and PerlSetVar directives. Fresh::Index needs a bit more configurability and Fresh::DBI needs to treat user data and application data as unconnected, allowing one user database for a set of application databases (mod_perl, mod_php, ...). -- James Smith [EMAIL PROTECTED], 409-862-3725 Texas AM CIS Operating Systems Group, Unix
RE: Embperl and Apache LogLevel configuration
...and Embperl runs under mod_perl? Not as CGI? In CGI Mode the only chance is to print to stderr, which always shows up in the error log. Under mod_perl, the timestamp should apear and the message only get's logged when loglevel is error or below. If you run under mod_perl, how do you call the page? Here's the portion of my httpd.conf that deals with Embperl: # startup.perl loads all functions that we want to use within mod_perl Perlrequire /www/www/lib/modperl-startup.pl SetEnv EMBPERL_LOG /dev/null # Below environment tells embperl to pass errors through and not complain # as well as to not chdir on each request SetEnv EMBPERL_OPTIONS 130 # Below environment tells embperl to log only grievous errors SetEnv EMBPERL_DEBUG 1 # We could use the below to parse and re-mail errors SetEnv EMBPERL_MAIL_ERRORS_TO embperl FilesMatch ".*\.html$" SetHandler perl-script PerlHandler HTML::Embperl Options +ExecCGI /FilesMatch Here's modperl-strartup.pl: # @(#) SID: 1.1; module: modperl-startup.pl; last changed: 10/19/99 10:30:06use strict; #modify @INC if needed use lib qw(/www/www/lib); # make sure we are in a sane environment. $ENV{GATEWAY_INTERFACE} =~ /^CGI-Perl/ or die "GATEWAY_INTERFACE not Perl!"; # for things in the "/perl" URL use Apache::Registry; #load perl modules of your choice here #this code is interpreted *once* when the server starts use LWP::UserAgent (); use HTML::Embperl; #home-grown html border production use Borders; # tell me more about warnings #use Carp (); #$SIG{__WARN__} = \Carp::cluck; # Load CGI.pm and call its compile() method to precompile # (but not to import) its autoloaded methods. #use CGI (); #CGI-compile(':all'); # Switch to the below when 2.49 is installed use CGI qw(-compile :all); 1; Here's a portion of error_log and access_log: [Tue Oct 19 10:33:46 1999] [notice] Apache/1.3.9 (Unix) mod_perl/1.21 mod_ssl/2.4.2 OpenSSL/0.9.4 configured -- resuming normal operations [Tue Oct 19 10:33:46 1999] [notice] suEXEC mechanism enabled (wrapper: /www/www/apache/bin/suexec) [4834290]ERR: 30: Line 1: Not found /www/www/research/reports/1099.html bual.research.att.com - - [19/Oct/1999:10:33:50 -0400] "GET /reports/1099.html HTTP/1.0" 404 335 "-" "Mozilla/4.61 [en] (X11; U; SunOS 5.7 sun4u)" By the way, even though I "SetEnv EMBPERL_LOG /dev/null", /tmp/embperl.log still is written to. I had to set that file to be a symlink to /dev/null. Regards, Christian
RegistryLoader causes subroutine redefined errors on import?
I know this topic has been discussed to death, but I think I can add something new. :-) Upon using Apache::RegistryLoader, I noticed my error logs started filling up with the dreaded "subroutine redefined" error. These errors occur at the moment my scripts scripts are preloaded using Apache::RegistryLoader. I put together a minimalistic example to demonstrate the problem. Consider the following module where function "foo" is exported by default and "bar" is exported on request. ### package Foo; use strict; use vars qw(@ISA @EXPORT @EXPORT_OK); use Exporter (); @ISA = ('Exporter'); @EXPORT = qw(foo); @EXPORT_OK = qw(bar); sub foo { return "foo"; } sub bar { return "bar"; } 1; ### And consider the following script served by Apache::Registry: ### #!/usr/bin/perl -w use strict; use CGI (); use Foo (); # works okay, no error #use Foo; # causes "Subroutine foo redefined..." error #use Foo qw(bar); # causes "Subroutine bar redefined..." error #use Foo qw(:DEFAULT bar); # causes errors for both foo and bar my $q = CGI-new(); print $q-header(); print "Hello World\n"; ### I tried the above script while "use"-ing Foo using the above techniques (stopping and starting the server each time to retest Apache::RegistryLoader.) Upon each server start, RegistryLoader kicked out the error(s) shown commented above. So it seems to be the import process causing the error. In all cases, the Apache::Registry script works fine. The error only appears when the script is preloaded using Apache::RegistryLoader -- I can suppress the error by not using RegistryLoader. So what's causing the error? Why is the subroutine being redefined? Thanks, Matt apache 1.3.6 mod_perl 1.21 perl 5.00503 Apache::Registry 2.01 Apache::RegistryLoader 1.90
Re: RegistryLoader causes subroutine redefined errors on import?
I know this topic has been discussed to death, but I think I can add something new. :-) Upon using Apache::RegistryLoader, I noticed my error logs started filling up with the dreaded "subroutine redefined" error. These errors occur at the moment my scripts scripts are preloaded using Apache::RegistryLoader. I put together a minimalistic example to demonstrate the problem. Consider the following module where function "foo" is exported by default and "bar" is exported on request. I couldn't reproduce the warns you are talking about. I think your Apache::RegistryLoader just didn't load the file... Try the latest version from cvs (I've modified it to provide a better diagnostics on failure to preload). Try it first... I'm Apache/1.3.10-dev (Unix) mod_perl/1.21_01-dev (linux/perl5.005_03) ### package Foo; use strict; use vars qw(@ISA @EXPORT @EXPORT_OK); use Exporter (); @ISA = ('Exporter'); @EXPORT = qw(foo); @EXPORT_OK = qw(bar); sub foo { return "foo"; } sub bar { return "bar"; } 1; ### And consider the following script served by Apache::Registry: ### #!/usr/bin/perl -w use strict; use CGI (); use Foo (); # works okay, no error #use Foo; # causes "Subroutine foo redefined..." error #use Foo qw(bar); # causes "Subroutine bar redefined..." error #use Foo qw(:DEFAULT bar); # causes errors for both foo and bar my $q = CGI-new(); print $q-header(); print "Hello World\n"; ### I tried the above script while "use"-ing Foo using the above techniques (stopping and starting the server each time to retest Apache::RegistryLoader.) Upon each server start, RegistryLoader kicked out the error(s) shown commented above. So it seems to be the import process causing the error. In all cases, the Apache::Registry script works fine. The error only appears when the script is preloaded using Apache::RegistryLoader -- I can suppress the error by not using RegistryLoader. So what's causing the error? Why is the subroutine being redefined? Thanks, Matt apache 1.3.6 mod_perl 1.21 perl 5.00503 Apache::Registry 2.01 Apache::RegistryLoader 1.90 ___ Stas Bekman mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC www.apache.org www.perl.com == www.modperl.com || perl.apache.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
Re: PerlTransHandler
Eric Cholet wrote: On Tuesday, October 19, 1999 4:13 AM, William Deegan [SMTP:[EMAIL PROTECTED]] wrote: How can I change the environment variables that get passed to a perl script running under Apache::Registry from a PerlTransHandler? I'm using the PerlTransHandler to do a sort of dynamic mod_rewrite functionality. Since you've got mod_perl on both sides, I'd suggest you don't use env variables (which are expensive). Your Trans handler can just set package variables which will be picked up by the registry script. Alternatives are using $r-dir_config, or $r-notes. I'll look into that. For now though all of our scripts are set up to check for an enviroment variable set for some virtual hosts, now we'd like a way to set these same variables using a PerlTransHandler. So how do I go about setting the enviroment variables. Assuming that I don't care about the cost. Thanks, Bill - Buy and sell safely on the Internet with i-Escrow. For details visit http://www.iescrow.com/ - begin:vcard n:Deegan;William tel;fax:650-638-7890 tel;work:650-638-7975 x-mozilla-html:FALSE url:http://www.iescrow.com org:iEscrow,Inc. version:2.1 email;internet:[EMAIL PROTECTED] title:Web Site Operations Manager note:http://www.orangefood.com/baddog adr;quoted-printable:;;1730 South Amphlett Blvd=0D=0ASuite 215;San Mateo;CA;94402; x-mozilla-cpt:;18272 fn:William Deegan end:vcard
RE: Embperl and Apache LogLevel configuration
Here's the portion of my httpd.conf that deals with Embperl: That's ok. I think I found the reason: [3396892]ERR: 30: Line 1: Not found /usr/lund/wwwfiles/wnetdoc/map.c.html As always there is an expection to the rule. The "Not found" (and FORBIDDEN) errors are not going thru the Apache ap_log_error function, because Embperl checks these things before it has setup it's internal data structures. So all error messages are affected by the LogLevel (and get a timestamp) except these two. These two errors are always printed to stderr. I try to corrected this in the next release. By the way, even though I "SetEnv EMBPERL_LOG /dev/null", /tmp/embperl.log still is written to. I had to set that file to be a symlink to /dev/null. Yes, that isn't surprising. The docs about EMBPERL_LOG says: NOTE: When running under mod_perl you need to use PerlSetEnv for setting the logfile path, and mod_perl = 1.07_03 if you load Embperl at server startup (with PerlScript or PerlModule). So use PerlSetEnv instead of SetEnv, because the values set with SetEnv are not available at server startup time. BTW Setting EMBPERL_DEBUG to 0 should supress any output to the Embperl logfile. Gerald
RE: unresolved symbols in Embperl make test (was: new for embperl...)
I'm sorry that I misunderstood your mail last time. Do I have to reinstall apache or both apache and mod_perl. yes I couldn't find the hints in the FAQ. Could you please point me out where the document is located. Look at http://perl.apache.org/embperl/Faq.pod.1.html#Running_make_test_fails_with_a OK. It is my fault again. I went there before but I did realize about the note "NOTE: answer _no_ to mod_perl support. (This is important!) " Which OS you are using? On my Linux box I can use "nm" to show the symbols Apache exports, e.g. nm apache_1.3.9/src/httpd My machine is Origin200 run IRIX6.4 as an OS. Do I have to set any flag that related to export or symbol) when I rebuild the apache? How I can check the Apache exports on my SGI? shows all the symbols. If there is nothing shown you have to rebuild Apache, until you see the symbols, that are showns in the make test error message. Hope this helps Gerald Thank you very much, --apple
Apache::Session hangs script
I'm using Apache/1.3.9 (Unix), mod_perl/1.21, Apache-Session-1.03, with MySQL 3.22.25. I'm using the the Apache::Session::DBI module with MySQL to provide some simple session management. I'm running the script as a PerlHandler... I'm storing the session ID as a hidden variable, which I retrieve on subsequent calls to the script, and use it to re-open the session object as described in the Apache::Session doc. 1 or 2 calls _after_ the intial invocation of the script, my browser hangs. Using the debugger, I've found where it seems to get hung up -- see below. Is this some sort of lock blocking, or stale lock or something? Any help would be appreciated. Thanks, --kip =-=-=-=-=-=-=-= Debugging Output =-=-=-=-=-=-=-= DB1 s Apache::Session::SysVSemaphoreLocker::acquire_read_lock(/usr/lib/perl5/site_perl/5.005/Apache/Session/SysVSemaphoreLocker.pm:50): 50: $self-{sem}-op($self-{read_sem} + $self-{nsems}/2, 0, SEM_UNDO, 51: $self-{read_sem},1, SEM_UNDO); DB1 s IPC::SysV::SEM_UNDO(/usr/lib/perl5/5.00503/IPC/SysV.pm:65535): 65535: DB1 s IPC::SysV::SEM_UNDO(/usr/lib/perl5/5.00503/IPC/SysV.pm:65535): 65535: DB1 s IPC::Semaphore::op(/usr/lib/perl5/5.00503/IPC/Semaphore.pm:88): 88: @_ = 4 || croak '$sem-op( OPLIST )'; DB1 s IPC::Semaphore::op(/usr/lib/perl5/5.00503/IPC/Semaphore.pm:89): 89: my $self = shift; DB1 s IPC::Semaphore::op(/usr/lib/perl5/5.00503/IPC/Semaphore.pm:90): 90: croak 'Bad arg count' if @_ % 3; DB1 s IPC::Semaphore::op(/usr/lib/perl5/5.00503/IPC/Semaphore.pm:91): 91: my $data = pack("s*",@_); DB1 s IPC::Semaphore::op(/usr/lib/perl5/5.00503/IPC/Semaphore.pm:92): 92: semop($$self,$data); DB1 s /\ | | ---| Hangs Here...
Redhat httpsd with mod_perl
hi there. i'm having problems with my redhat secure server and mod_perl combo (mod_perl as a DSO). i'm new to mod_perl (and system administration) but obviously am looking forward to getting everything figured out. i believe there is some kind of memory leak (not sure exactly), but when i start the server a typical process has the following characteristics: PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND 6143 nobody 2 0 10720 10M 10072 S 0 0.0 4.1 0:00 httpsd but after running it for about a day (while hitting it with 20 page requests per minute (pages use Apache::ASP and mysql) top shows: PID USER PRI NI SIZE RSS SHARE STAT LIB %CPU %MEM TIME COMMAND 4722 nobody 0 0 18232 14M 3148 S 0 0.0 5.5 0:25 httpsd also, at this point the 'Requests per second' and 'Transfer rate' (as told by ApacheBench) have dropped off significantly. can someone point me in the right direction for optimizing this setup? thanks! remi = __ Do You Yahoo!? Bid and sell for free at http://auctions.yahoo.com
Embperl [$ sub $] question
Can the new sub meta-command not be used to define functions? I tried: [$ sub foo $] [+ shift +] [$ endsub $] [+ sub("bar") +] and got 0. --- Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems That boy doesn't know the difference between the Internet and a hair net. -- Jason Bodnar
eval'ed Apache::Session tie panics with POPSTACK?
I wanted to trap non-existant session-id's by bracketing the tie %{$href}, 'Apache::Session::DBI', $id, { DataSource = 'dbi:mysql:sessions', UserName = 'db_user', Password = 'db_passwd' }; with an eval { }; block. Once I've done this and send a non-existant session-id I get the following in my error_log: panic: POPSTACK Callback called exit. Without the eval around the tie the script dies with: [Tue Oct 19 16:55:09 1999] [error] Object does not exist in the data store at /usr/local2/lib/perl5/si te_perl/5.005/Apache/Session/DBIStore.pm line 192. So, do I have to look check the database myself for the session-id? Should I modify DBIStore.pm to not die, but do something else? Is this related to: http://x31.deja.com/getdoc.xp?AN=536753692CONTEXT=940379169.1854472193hitn um=1 Cheers Tobias
Apache::ASP, catching redirect from a downstream filter
Hi, I'm redirecting an output of an ASP to my own module (w/Apache::Filter). In the module I want to check if the ASP has issued a redirect. I've tried looking at $r-status, but it always contains 200. I can see that the outbound headers contain 'Location', but I can't find the proper return code. Where should I be looking? Thanks --- Dmitry Beransky Programmer/Analyst University of California, San Diego Multimedia Interactive Learning Lab (http://mill.ucsd.edu)
Re: Apache::ASP - accessing Session data from Application
Thanks, Joshua. I tested out your development version 0.17 and it worked perfect for me. One thing I noticed was that if GetSession is improperly used, it could cause big security holes. By nature it will be used to access someone else's session, so the application should take care not to send the other SessionID across the net. Even within an SSL connection (as I'm using) it's not wise to even let one other person know the SessionID of another user. I made an internal 1:1 reference map of SessionIDs to unique identifiers which then can be sent over the net safely, to allow controlled access to other sessions. Anyway, just thought I'd mention this, though I'm sure you already realized it. You might want to put a note in your API documentation to take care not to reveal the SessionID when you use GetSession. - Adi Joshua Chamas wrote: I have added an $Application-GetSession($session_id) API extension to Apache::ASP. I'll send you my latest dev version in a separate email. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NODEWORKS free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Porting to Apache::Registry
I'm just starting in on porting some scripts over to either Apache::Registry or Apache::PerlRun, and trying to absorb as much as I can. It's seems a bit overwhelming at first. My scripts are reasonably clean, running under -w and use strict, yet I'm sure I have lots of porting issues to deal with. I understand that it's hard to answer without knowing details about my setup, but in general are the speed gains with Apahce::Registry over Apache::PerlRun worth the extra porting work? Besides all the information at perl.apache.org, can you recommend any good resources (book, web pages) that stand out in your memory as being very helpful when you were starting out? I have a bunch of questions, of course, such as: Under Apache::Registry do I have to be aware of other Apache::Registry scripts that may be running under the same server process as my program? For example, I often open STDERR to a log file in my CGI scripts. Will all scripts running on that process then write to my log file? And I often have a public CGI script, and an 'Admin' script where the public script opens a log file (using STDERR) with a share lock, but the 'Admin' script opens with an exclusive lock on the same file when updating config files. It would seem to make sense to not have to open and close the log file for each execution, but rather leave the file open and just grab and release the lock during execution.But I'm really unclear how to set this up under Apache::Registry and if there are race conditions to worry about. Anyway, I'm really seeking pointers on good references for just starting out that will help me answer these type of questions and keep me quite for a while. Thanks very much, Bill Moseley mailto:[EMAIL PROTECTED]
Re: Apache::ASP - accessing Session data from Application
Yeah, I'd be happy to. I'm not quite done with my app-specific version, but once I get done I'll genericize it and send it along. I'll have to write up some documentation, too. It'll probably be a week or two before I have something worthy of publication. - Adi Joshua Chamas wrote: About your session manager, I have been thinking about starting up some sample applications repository for PerlScript ASP applications, which could be easily distributed with Apache::ASP. Would you be interested in publishing some genericized version of your session manager? It seems like a cool app. -- Joshua _ Joshua Chamas Chamas Enterprises Inc. NODEWORKS free web link monitoring Huntington Beach, CA USA http://www.nodeworks.com1-714-625-4051
Re: Embperl [$ sub $] question
It should be [- foo("bar") -] - Robert Jason Bodnar wrote: Can the new sub meta-command not be used to define functions? I tried: [$ sub foo $] [+ shift +] [$ endsub $] [+ sub("bar") +] and got 0. --- Jason Bodnar + [EMAIL PROTECTED] + Tivoli Systems That boy doesn't know the difference between the Internet and a hair net. -- Jason Bodnar
Re: Porting to Apache::Registry
I'm just starting in on porting some scripts over to either Apache::Registry or Apache::PerlRun, and trying to absorb as much as I can. It's seems a bit overwhelming at first. My scripts are reasonably clean, running under -w and use strict, yet I'm sure I have lots of porting issues to deal with. I understand that it's hard to answer without knowing details about my setup, but in general are the speed gains with Apahce::Registry over Apache::PerlRun worth the extra porting work? Besides all the information at perl.apache.org, can you recommend any good resources (book, web pages) that stand out in your memory as being very helpful when you were starting out? I'm not sure why have you discarded the docs at perl.apache.org so fast, did you read them at all? Did you take a look at the guide? perl.apache.org/guide I have a bunch of questions, of course, such as: Under Apache::Registry do I have to be aware of other Apache::Registry scripts that may be running under the same server process as my program? For example, I often open STDERR to a log file in my CGI scripts. Will all scripts running on that process then write to my log file? And I often have a public CGI script, and an 'Admin' script where the public script opens a log file (using STDERR) with a share lock, but the 'Admin' script opens with an exclusive lock on the same file when updating config files. It would seem to make sense to not have to open and close the log file for each execution, but rather leave the file open and just grab and release the lock during execution.But I'm really unclear how to set this up under Apache::Registry and if there are race conditions to worry about. Anyway, I'm really seeking pointers on good references for just starting out that will help me answer these type of questions and keep me quite for a while. Thanks very much, Bill Moseley mailto:[EMAIL PROTECTED] ___ Stas Bekman mailto:[EMAIL PROTECTED]www.singlesheaven.com/stas Perl,CGI,Apache,Linux,Web,Java,PC at www.singlesheaven.com/stas/TULARC www.apache.org www.perl.com == www.modperl.com || perl.apache.org single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com