questions on $r-lookup_uri
1 - Why was no documentation for this method found in the manpage for Apache::Request? Where should I have looked for docs on this? 2 - I did manage to find some docs for this in Ch. 4 of the Stein/Maceachern book, but am wondering why lookup_uri() goes through all phases of request processing up to but not including the content handler. It would seem that looking up a URI would only need to go through the URI translation phase of the subrequest to lookup a URI.
Re: questions on $r-lookup_uri
1 - Why was no documentation for this method found in the manpage for Apache::Request? Where should I have looked for docs on this? perldoc Apache There are some Apache API docs on ap_sub_req_lookup_uri here: http://httpd.apache.org/docs/misc/API.html#req_orig Though they may not help much in your situation, as they indicate that each sub-request function constructs a new request_rec structure and processes it as you would expect. :) 2 - I did manage to find some docs for this in Ch. 4 of the Stein/Maceachern book, but am wondering why lookup_uri() goes through all phases of request processing up to but not including the content handler. It would seem that looking up a URI would only need to go through the URI translation phase of the subrequest to lookup a URI. From 'perldoc Apache': Apache provides a sub-request mechanism to lookup a uri or filename, performing all access checks, etc., without actually running the response phase of the given request. So presumably it is important that sub-requests get run through standard authentication/authorization/access checks for that particular URI. Among other things. bye, Ben
Perl/Apache question
I sincerely appologize if this question is in the wrong mailing list. But I'm not really sure where it belongs. I installed Demarc and Snort. Demarc is a Perl script, which does work when executed from the console. But when hit from the web, it just returns the source code. How do I configure Apache so it executes the Perl script instead of sending the contents of the script? _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
Re: Perl/Apache question
On Sun, 26 Aug 2001, Mathew Benson wrote: Hi, I sincerely appologize if this question is in the wrong mailing list. But I'm not really sure where it belongs. I installed Demarc and Snort. Demarc is a Perl script, which does work when executed from the console. But when hit from the web, it just returns the source code. How do I configure Apache so it executes the Perl script instead of sending the contents of the script? You probably misconfigured. What you might need is to add a handler to run this script. The easiest way will be something like: AddHandler perl-script .pl PerlHandler +Apache::Registry or some modification hereof. You may need more, depending on your current configuration. Check the guide: http://perl.apache.org/guide for all information you need. Bye, Remco
Re: Perl/Apache question
Hi there, On Sun, 26 Aug 2001, Remco Schaar wrote: On Sun, 26 Aug 2001, Mathew Benson wrote: I sincerely appologize if this question is in the wrong mailing list. But I'm not really sure where it belongs. I installed Demarc and Snort. [snip] You probably misconfigured. What you might need is to add a handler to run this script. The easiest way will be something like: AddHandler perl-script .pl PerlHandler +Apache::Registry or some modification hereof. You may need more, depending on your current configuration. Check the guide: http://perl.apache.org/guide This of course assumes Mr. Benson is using mod_perl. Is he? 73, Ged.
Re: Perl/Apache question
On Sun, 26 Aug 2001, Ged Haywood wrote: Hi there, hi, On Sun, 26 Aug 2001, Remco Schaar wrote: On Sun, 26 Aug 2001, Mathew Benson wrote: I sincerely appologize if this question is in the wrong mailing list. But I'm not really sure where it belongs. I installed Demarc and Snort. [snip] You probably misconfigured. What you might need is to add a handler to run this script. The easiest way will be something like: AddHandler perl-script .pl PerlHandler +Apache::Registry or some modification hereof. You may need more, depending on your current configuration. Check the guide: http://perl.apache.org/guide This of course assumes Mr. Benson is using mod_perl. Is he? Oh, you're right... But testing that is in the guide as well :-) 73, Ged. Bye, remco
httpd.conf - random caching (2nd try)
im a bit confused or perhaps bewildered about finally having installed mod_perl on mac osX. these questions should apply cross platform 1) yesterday im quite sure my httpd.conf file was /usr/local/apache/conf/httpd.conf. today (after having played around) it suddenly appears to be /etc/httpd/httpd.conf can this be? and can i actually tell the server somehow to use the one in /usr/local/apache/conf where the other conf files are. the only reason i discovered this was because i wanted to change the number of child processes to only one. which brings me to: 2) im experiencing some heavy modoule-caching annoyance i guess. if i run the simple hello.pm (see below) and make a very small change - the change might take effect immediately in the browser but more frequently it will show a random cached version of the page. (i noticed a pattern in my access_log that the very last number-field on each line would be the same if the page didnt change) i have read a little about this problem in the online manual and the writing apache modules book, but dont understand the soloution(s). for instance what is the exact procedure for httpd -x? is it like this command: [localhost:/usr/local/apache/sbin] aju% httpd -x this command will do nothing on my system, not even complain. if i manually configure my httpd.conf file to only one server-child i sometimes get two children? also there are some talk about global variables, but looking at the code i dont see any? could there be other reeasons for this random caching? thanks allan --hello.pm (from writing apache modules book)- package Apache::Hello; use strict; use Apache::Constants qw(:common); sub handler { my $r = shift; $r-content_type('text/html'); $r-send_http_header; return OK if $r-header_only; my $host = $r-get_remote_host; $r-print(END); HTML HEADER TITLEHello There/TITLE /HEADER BODY H1Hello $host/H1 Who would take this book seriously if the first example didn't say hello world? /BODY /HTML END return OK; } 1; __END__
RE: questions on $r-lookup_uri
-Original Message- From: princepawn To: [EMAIL PROTECTED] Sent: 8/26/01 1:29 PM Subject: questions on $r-lookup_uri 1 - Why was no documentation for this method found in the manpage for Apache::Request? Where should I have looked for docs on this? man Apache 2 - I did manage to find some docs for this in Ch. 4 of the Stein/Maceachern book, but am wondering why lookup_uri() goes through all phases of request processing up to but not including the content handler. It would seem that looking up a URI would only need to go through the URI translation phase of the subrequest to lookup a URI. what if you don't have permission to access the resource? subrequests have a number of uses besides determining 404, such as 403, or $sub-content_type... HTH --Geoff
Re: getting a normal html-page (2nd try)
changed port in httpd.conf to port 80 - it works! ___cliff rayman___ wrote: mac osX might also have the following mac like command: lsof -nPi TCP | grep httpd | less what does your's show? mine show: lsof: WARNING: compiled for Darwin release 1.0; this is 1.3.7. alastair wrote: On Fri, Aug 24, 2001 at 01:12:09AM +0200, allan wrote: how come i cant even get a straigt html-page? So what port is apache listening on then? Are you sure it's port 80? Check httpd.conf..
Re: server log oddness
was there ever a response to this message? i don't recall one, but i may have missed it. thanks. On Sat, 4 Aug 2001, brian moseley wrote: when exactly is the server log (Apache-server-log) shut down? i've registered a server cleanup handler that, among other things, tries to write some debugging messages to the server log. however, it seems that calling $slog-debug somehow silently dies; my code stops executing at the point i call that method, as if the method died, but i don't catch an exception when i wrap my code in eval. anybody seen anything like this before? bcm@hojmo:~ perl -v This is perl, v5.6.0 built for i586-linux
cvs commit: modperl/lib/Apache test.pm
dougm 01/08/26 11:29:55 Modified:.Changes lib/Apache test.pm Log: require URI::URL to work with newer libwww-perl Revision ChangesPath 1.620 +2 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.619 retrieving revision 1.620 diff -u -r1.619 -r1.620 --- Changes 2001/08/25 19:55:03 1.619 +++ Changes 2001/08/26 18:29:55 1.620 @@ -10,6 +10,8 @@ =item 1.26_01-dev +require URI::URL to work with newer libwww-perl + allow overriding of container directive handlers using the func parameter [Geoffrey Young [EMAIL PROTECTED]] 1.23 +1 -0 modperl/lib/Apache/test.pm Index: test.pm === RCS file: /home/cvs/modperl/lib/Apache/test.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- test.pm 2001/02/12 09:04:40 1.22 +++ test.pm 2001/08/26 18:29:55 1.23 @@ -37,6 +37,7 @@ eval { require LWP::UserAgent; +require URI::URL; $UA = LWP::UserAgent-new; };
cvs commit: modperl/t/internal hooks.t
dougm 01/08/26 11:31:29 Modified:t/internal hooks.t Log: require URI::URL to work with newer libwww-perl Revision ChangesPath 1.5 +1 -0 modperl/t/internal/hooks.t Index: hooks.t === RCS file: /home/cvs/modperl/t/internal/hooks.t,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- hooks.t 1999/01/20 23:16:38 1.4 +++ hooks.t 2001/08/26 18:31:29 1.5 @@ -7,6 +7,7 @@ use ExtUtils::testlib; BEGIN { require net/config.pl; } require LWP::UserAgent; +require URI::URL; #first one queries httpd for enabled hooks, #generating a hook::handler() for each and writing t/docs/.htaccess