Re: Apache is exiting....

2003-03-03 Thread Paolo Campanella
On Fri, 28 Feb 2003 12:15:32 -0800
Kyle Oppenheim [EMAIL PROTECTED] wrote:

 It looks like the parent server will exit if one of its children exits
 with APEXIT_CHILDFATAL.  Unfortunately, if you grep for that in the
 Apache source, it comes up more than a few times.  A stacktrace would be
 useful. Try setting a breakpoint on clean_child_exit() or use a call
 tracing utility like Solaris' truss.

gdb reports that clean_child_exit is not defined - perhaps you are
looking at newer sources than mine (1.3.22).

 Without a stacktrace, you could try to work around the problem.  It

Accept mutexes didn't solve it, but I have a reasonable workaround at
the code level to make it relatively safe - I think this is where I'm
going to leave it. Thanks for the comments though.

Bye

Paolo





Re: Override Authentication for one sub directory

2003-03-03 Thread Geoffrey Young


Scott Alexander wrote:
Hi,

I'm using Apache-AuthCookie-3.04 for authentication
I have a protected directory with 10 sub directories, one directory needs
to be open to any user.
I could write 10 Directory /usr/local/systems/work/directory_1 or use a
PERL section in the conf file to create the 10 directory directives.
Can I override the settings for one directory somehow? So any user with no
login or password will get in. Actually I don't even want the login prompt
to appear.
we talk about this in the cookbook - recipe 13.5.

basically, you need to disable authentication for the directories in 
question.  see

http://www.modperlcookbook.org/code/ch13/Cookbook/PassLocalIP.pm

for the example from the book, which disables auth phases for allowed IPs.

also keep in mind the Satisfy Any directive, which is what you probably 
should use if you're thinking about IP based stuff :)

HTH

--Geoff



Re: Apache is exiting....

2003-03-03 Thread Paolo Campanella
On Fri, 28 Feb 2003 12:12:48 -0500
Perrin Harkins [EMAIL PROTECTED] wrote:

  Exception 415: UnableToReadFont
  (@/usr/X11R6/lib/X11/fonts/ttf/Ritalin.ttf) at /path/to/script line
  584.[Fri Feb 28 14:31:49 2003] [alert] Child 1216 returned a Fatal
  error... Apache is exiting!
 
 That's bad.  Sounds like an apache bug to me.  Can anyone else confirm 
 if this is intended behavior or not?  You might want to check the httpd 
 lists and newsgroups for info about this.

I haven't been able to find anything relevant in list  newsgroups. But
I'm going to call it quits  just try to make sure at the code level
that nothing similar has a chance to happen. Thanks for all the help.

Bye

Paolo



Re: Apache is exiting....

2003-03-03 Thread Ged Haywood
Hi there,

On Mon, 3 Mar 2003, Paolo Campanella wrote:

 gdb reports that clean_child_exit is not defined - perhaps you are
 looking at newer sources than mine (1.3.22).

Is there a reason why you don't want to upgrade to 1.3.27?

73,
Ged.



Problem with PHP install: Invalid MySQL directory

2003-03-03 Thread mel awaisi
hi

i downloaded Apache-1.3.27 on my Red hat machine and it all worked 
perfectly. now i am tryin to set PHP but i got a error saying

configure: error: Invalid MySQL directory - unable to find libmysqlclient.a 
or libmysqlclient.so.

any ideas.

Mel

_
Overloaded with spam? With MSN 8, you can filter it out 
http://join.msn.com/?page=features/junkmailpgmarket=en-gbXAPID=32DI=1059



Re: Problem with PHP install: Invalid MySQL directory

2003-03-03 Thread mel awaisi
hi

its ok i have solved it.
i needed to add in the configuration command where mysql was, hence
--with-mysql=/usr/local/mysql/
Mel

_
Express yourself with cool emoticons http://messenger.msn.co.uk


Problem with PHP install: Invalid MySQL directory

2003-03-03 Thread mel awaisi
hi

i downloaded Apache-1.3.27 on my Red hat machine and it all worked
perfectly. now i am tryin to set PHP but i got a error saying
configure: error: Invalid MySQL directory - unable to find
libmysqlclient.a or libmysqlclient.so.
I downloaded MySQL automatically with Red Hat 8, but when i type locate 
libmysqlclient.so, i get 2 files, which dont seem to be the right files. Do 
i need to download more packages?

any ideas.

Mel

_
Stay in touch with MSN Messenger http://messenger.msn.co.uk


Re: Override Authentication for one sub directory

2003-03-03 Thread Jean-Michel Hiver
This might be a bit OT, but since I've read somewhere on apache.org that
Apache2 was using the same regex engine as Perl 5's...

So I'm under the impression that with Apache2 you could do something
like:

DirectoryMatch ^/usr/local/systems/works/(?!open/)
   # your auth handler goes here
/DirectoryMatch

Cheers,
-- 
Building a better web - http://www.mkdoc.com/
-
Jean-Michel Hiver
[EMAIL PROTECTED]  - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/


Re: Problems installing mod_perl2 on Apache2 on Win200

2003-03-03 Thread Richard Heintze
Apache HTTPD seems to be running fine.

Do I have the right version of apache and mod_perl?
I'm unpacking mod_perl2.tar. perl mpinstall does not
seem to be giving me any errors.

Apache installed itself in the directory program
files/apache group/apache2 so I think this means I'm
running apache2.

What should I do next? Maybe I should build mod_perl
myself. Which compiler do you recommend for building
mod_perl on NT4 or Windows 2000?

   Siegfried

--- Randy Kobes [EMAIL PROTECTED] wrote:
 On Sun, 2 Mar 2003, Richard Heintze wrote:
 
  I have followed the instructions at
 

http://perl.apache.org/docs/1.0/os/win32/install.html
  
  I've put the following in my httpd.conf file:
  LoadFile c:/Perl/bin/perl58.dll
  LoadModule mod_perl modules/mod_perl.so
  PerlRequire C:/Apache2/conf/extra.pl
 
 Hi,
Does Apache run OK without mod_perl?
 
Did you intend to have extra.pl under
 C:/Apache2/conf/, when the rest of the stuff is
 under C:/Program Files/Apache Group/Apache2/?
 It's no problem if you do ...
 
  I have expanded mod_perl-2.tar and extracted
  mod_perl.so into modules\mod_perl.so.
 
 And also did the 'ppm install mod_perl' to install
 the Perl side?
  
  I have c:perl\bin in my path. And still I get the
  error below.
   Can someone help me?
Sieg
  
  C:\C:\Program Files\Apache
  Group\Apache2\bin\Apache.exe -w -f C:\Program
 Fil
  es\Apache Group\Apache2\conf\httpd.conf -d
  C:\Program Files\Apache Group\Apach
  e2\.
  Syntax error on line 135 of C:/Program
 Files/Apache
  Group/Apache2/conf/httpd.con
  f:
  Cannot load C:/Program Files/Apache
  Group/Apache2/modules/mod_perl.so into serve
  r: The specified module could not be found.
  Note the errors or messages above, and press the
 ESC
  key to exit.  0
  C:\
 
 Assuming you're using a recent mod_perl 2 ppm
 package,
 is your Apache version at least 2.0.43? Prior
 versions
 may not be compatible with this mod_perl, which was 
 compiled against 2.0.44.
 
 Other than that, if at all possible, an idea might
 be
 to install Apache into a directory that doesn't
 contain
 spaces (eg, C:\Apache2). Or if that's not possible,
 try
 using DOS short path names for the directories in
 httpd.conf.
 
 -- 
 best regards,
 randy kobes
 


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/


Re: mod_perl headers

2003-03-03 Thread Cure





Ged Haywood wrote:

  Hi there,

On Sun, 2 Mar 2003, Cure wrote:

  
  
Does Apache submit headers when a error occurs ?
Trying to display an error message to the browser.

I use mason for the web, so if I have die() statement in my code
mason will display the error to the browser.

If I use an Apache handler - the error doesn't get displayed to the screen,
not sure why. It seems apache submits headers along with my headers when
an error occurs.

  
  
Have you checked in the mod_perl Guide?

There are several sections related to sending headers, you'll probably
find your answer in there.  Have you got 'PerlSendHeader ON' in your
configuration somewhere?

73,
Ged.



Have you got 'PerlSendHeader ON' in your
configuration somewhere?  answer:--- NO


Cure


  


  






Apache::DBI on mp2

2003-03-03 Thread Haroon Rafique
My setup is as follows:

Apache/2.0.44 (Gentoo/Linux) mod_perl/1.99_08 Perl/v5.8.0

mod_perl was built from CVS.

I was interested in getting Apache::DBI to run under mp2. I did read 
Ask's message at 
http://marc.theaimsgroup.com/?l=apache-modperlm=104225578207460w=2
which leads me to my question. What would it take to get connect_on_init 
to run under mp2?

With the following patch I was able to get connect_on_init to work under 
mp2. Remember that my objective was to JUST get it to run. This is NOT 
release quality code. I'm happy to report that it works for me, so far. 
Anyone else who is running mp2 (no compat mode) willing to give it a try?
Of course, then the gurus can come in and clean up the code so that it 
works under either mp1 or mp2.

diff -u DBI.pm /usr/lib/perl5/site_perl/5.8.0/Apache/DBI.pm 
--- DBI.pm  2003-02-17 08:04:19.0 -0500
+++ /usr/lib/perl5/site_perl/5.8.0/Apache/DBI.pm2003-03-03 
12:03:06.0 -0500
@@ -7,6 +7,8 @@
 use DBI ();
 use Carp qw(carp);
 
+use Apache::ServerUtil ();
+
 require_version DBI 1.00;
 
 $Apache::DBI::VERSION = '0.91';
@@ -32,9 +34,8 @@
 # provide a handler which creates all connections during server 
startup
 
 # TODO - Should check for mod_perl 2 and do the right thing there
-carp Apache.pm was not loaded\n and return unless 
$INC{'Apache.pm'};
-if([EMAIL PROTECTED] and Apache-can('push_handlers')) {
-Apache-push_handlers(PerlChildInitHandler = \childinit);
+if([EMAIL PROTECTED]) {
+Apache-server-push_handlers(PerlChildInitHandler = 
\childinit);
 }
 # store connections
 push @ChildConnect, [EMAIL PROTECTED];
@@ -89,9 +90,9 @@
 # this PerlCleanupHandler is supposed to initiate a rollback after 
the script has finished if AutoCommit is off.
 my $needCleanup = ($Idx =~ /AutoCommit[^\d]+0/) ? 1 : 0;
 # TODO - Fix mod_perl 2.0 here
-if(!$Rollback{$Idx} and $needCleanup and 
Apache-can('push_handlers')) {
+if(!$Rollback{$Idx} and $needCleanup) {
 print STDERR $prefix push PerlCleanupHandler \n if 
$Apache::DBI::DEBUG  1;
-Apache-push_handlers(PerlCleanupHandler, \cleanup);
+Apache-server-push_handlers(PerlCleanupHandler, \cleanup);
 # make sure, that the rollback is called only once for every 
 # request, even if the script calls connect more than once
 $Rollback{$Idx} = 1;


--
Haroon Rafique
[EMAIL PROTECTED]



prompting for secure data during startup.pl

2003-03-03 Thread Aaron J Mackey

I need to make some secure data available to mod_perl handlers, without
having it physically stored in a file, database, or named shared memory
(since if someone can read the handlers' code, then they could read the
sensitive data as well).  So I need to prompt for it during server
(re)start-up, and stuff it away into a lexical variable that only the
handler can get at (i.e. another piece of code, or even another handler,
that blesses itself into my handler's package still cannot access the
data).  Every httpd child process should have their own copy of the data.
Is there a solution or cookbook recipe for this yet?

Said another way, here's my basic handler code:

package MyHandler;
use Apache::Constants qw(OK DECLINED);

my $SECRET = secret;
my $SECRETSET = 0;

# only allow the secret to be set once, by startup.pl
sub set_secret { $SECRET = shift unless $SECRETSET++; }

sub handler($$) {

if ($SECRET eq secret) {
return DECLINED;
} else {
# go ahead, make use of $SECRET
# ...
return OK;
}
}
1;
__END__

And I want startup.pl to do this:

use Term::ReadPassword;
use MyHandler;

MyHandler::set_secret(read_password(Enter secret:));
__END__

Does this make sense?  Will this work?  Will this be secure? (as long as
no one intercepts my call to set_secret() in startup.pl by installing a
bogus MyHandler.pm in my lib search path ...).

Thanks,

-Aaron

-- 
 Aaron J Mackey
 Pearson Laboratory
 University of Virginia
 (434) 924-2821
 [EMAIL PROTECTED]




Re: prompting for secure data during startup.pl

2003-03-03 Thread Perrin Harkins
Aaron J Mackey wrote:
I need to make some secure data available to mod_perl handlers, without
having it physically stored in a file, database, or named shared memory
(since if someone can read the handlers' code, then they could read the
sensitive data as well).  So I need to prompt for it during server
(re)start-up, and stuff it away into a lexical variable that only the
handler can get at (i.e. another piece of code, or even another handler,
that blesses itself into my handler's package still cannot access the
data).  Every httpd child process should have their own copy of the data.
Is there a solution or cookbook recipe for this yet?
What you're doing looks fine, as far as it goes.  By making these 
variables part of a closure, you are making it impossible for people to 
read it directly with Perl code.  Of course there is nothing you can do 
to prevent someone with full access to your server from running C code 
that will walk Perl's variables until it finds $secret.  They could 
probably do this with creative of some of the B:: modules.

- Perrin



Re: mod_perl headers

2003-03-03 Thread Perrin Harkins
Cure wrote:
Does Apache submit headers when a error occurs ?
No.  You sent the headers with your send_http_header command.  Mason 
doesn't have this issue because it waits and builds up the entire output 
in a string before it sends any headers out.  You can do the same in 
your script if you want to.

Take a look at 
http://perl.apache.org/docs/1.0/guide/snippets.html#Redirecting_Errors_to_the_Client_Instead_of_error_log 
for more info on these issues.

$r-('HI');
That's not a method of $r.  Don't do that.

- Perrin



Re: mod_perl headers

2003-03-03 Thread Cure
Perrin Harkins wrote:

Cure wrote:

Does Apache submit headers when a error occurs ?


No.  You sent the headers with your send_http_header command.  Mason 
doesn't have this issue because it waits and builds up the entire 
output in a string before it sends any headers out.  You can do the 
same in your script if you want to.

Take a look at 
http://perl.apache.org/docs/1.0/guide/snippets.html#Redirecting_Errors_to_the_Client_Instead_of_error_log 
for more info on these issues.

$r-('HI');


That's not a method of $r.  Don't do that.

- Perrin

I had  $r-print('HI') in my script. I made a typo when typing into 
this document.

I know -- I submit the headers but why does it show the headers on 
the browser, doesn't
that mean the headers wre submitted twice ?


error --

hiHTTP/1.1 200 OK Date: Mon, 03 Mar 2003 04:34:04 GMT Server: 
Apache/1.3.26 (Win32) mod_perl/1.27_01-dev Connection: close 
Transfer-Encoding: chunked Content-Type: text/html; charset=iso-8859-1
OK
The server encountered an internal error or misconfiguration and was 
unable to complete your request.
Please contact the server administrator, [EMAIL PROTECTED] and inform 
them of the time the error occurred, and anything you might have done 
that may have caused the error.

More information about this error may be available in the server error log.




Re: mod_perl headers

2003-03-03 Thread Cure
and I used use CGI::Carp qw(fatalsToBrowser)  in my script. It still 
didn't print the error to the browser

Cure

Perrin Harkins wrote:

Cure wrote:

Does Apache submit headers when a error occurs ?


No.  You sent the headers with your send_http_header command.  Mason 
doesn't have this issue because it waits and builds up the entire 
output in a string before it sends any headers out.  You can do the 
same in your script if you want to.

Take a look at 
http://perl.apache.org/docs/1.0/guide/snippets.html#Redirecting_Errors_to_the_Client_Instead_of_error_log 
for more info on these issues.

$r-('HI');


That's not a method of $r.  Don't do that.

- Perrin






ANNOUNCE: Apache::SessionX 2.00b5

2003-03-03 Thread Gerald Richter

The URL

ftp://ftp.dev.ecos.de/pub/perl/session/Apache-SessionX-2.00b5.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/Apache-SessionX-2.00b5.tar.gz
  size: 11981 bytes
   md5: d9bb7317e8ffed14ebdb276cd3b729b4

Apache::SessionX extents Apache::Session. It was initialy written to
use Apache::Session from inside of Embperl, but is seems to be
usefull outside of Embperl as well, so here is it as standalone module.

Apache::Session is a persistence framework which is particularly useful
for tracking session data between httpd requests.  Apache::Session is
designed to work with Apache and mod_perl, but it should work under
CGI and other web servers, and it also works outside of a web server
alltogether.

Addtionaly to Apache::Session, Apache::SessionX provides the following
possibilites:

- Configuration: Makefile.PL checks which componemnts are installed
  on the system and interactivly builds a set of configuration,
  including a default one. This configurations are saved and can
  be used by name later on. The default configuration is used, if
  no parameters are given to Apache::SessionX. This simplifies
  the configuration and usage.

- Lazy operation: Apache::SessionX supports lazy operation, that means
  that the actual data access only takes place if the session data is
  needed, so you are able to setup the session object, without worrying
  about performance in case you don't access the session data.

- Specifing the ID: Apache::SessionX can use a given ID instead of
  creating it's own one. You can also give an string which is used to
  generate the ID

- Genrate unique ID: Apache::SessionX is able to save the session with
  an new ID every time data is modified. This make it possible to keep
  an history.

- Addtionaly methods are provided to get the ID, the inital ID, the
  modified status and to close a session, without destroying the
  session object itself.

Additional features like session expiration are partial implemented.

Enjoy

Gerald

Changes since 2.00b3:

 - make test now works without Timer::HiRes installed
 - included patch from Robert for iteration over all sessions
 - created new class Apache::SessionX::Manager, which is used
   to performs actions on multiple sessions. (first, next, count)
   (Only File Store currently supports this methods).
 - Use Digest::MD5 instead of MD5


--
Gerald Richter ecos electronic communication services gmbh
IT-Securitylösungen * dynamische Webapplikationen * Consulting

Post:   Tulpenstrasse 5  D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED]  Voice:   +49 6133 939-122
WWW:http://www.ecos.de/  Fax: +49 6133 939-333
--
|
|   Besuchen Sie uns auf der CeBIT vom 12. - 19. März 2003
|   Messe Hannover * Halle 17 * Stand F 36
|   http://www.cebit.de/
|
+-



Re: WEb hosting..

2003-03-03 Thread Stas Bekman
Fco. Valladolid wrote:

I'am introductory o newbie user of mod_perl.. so what book or tutorial 
recommend for me..
Please always reply to the list!

Online docs:
http://perl.apache.org/docs/index.html
Books:
http://perl.apache.org/docs/offsite/books.html
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: mod_perl headers

2003-03-03 Thread Perrin Harkins
Cure wrote:
I know -- I submit the headers but why does it show the headers on 
the browser, doesn't
that mean the headers wre submitted twice ?
Why don't you take a look at the raw output (with LWP's GET script or 
something) and see?

I misread your question before -- apache does send a hardcoded message 
with headers by default when your program crashes.  In your case, you 
have also sent some headers but I think those will be buffered while the 
error headers will not, causing the effect that you're seeing.

I can't advise you about why CGI::Carp isn't working for you.  It might 
be caused by you already having sent some output at the time your script 
died.  People often complain about CGI::Carp problems, so it seems to be 
a pretty fragile module.  You can see some other people's discussions 
about it in the mailing list archives.  They might have possible 
solutions for you.

- Perrin



Re: mod_perl headers

2003-03-03 Thread Cure
Perrin Harkins wrote:

Cure wrote:

I know -- I submit the headers but why does it show the headers on 
the browser, doesn't
that mean the headers wre submitted twice ?

Why don't you take a look at the raw output (with LWP's GET script or 
something) and see?

I misread your question before -- apache does send a hardcoded message 
with headers by default when your program crashes.  In your case, you 
have also sent some headers but I think those will be buffered while 
the error headers will not, causing the effect that you're seeing.

I can't advise you about why CGI::Carp isn't working for you.  It 
might be caused by you already having sent some output at the time 
your script died.  People often complain about CGI::Carp problems, so 
it seems to be a pretty fragile module.  You can see some other 
people's discussions about it in the mailing list archives.  They 
might have possible solutions for you.

- Perrin 


Thxs Perrin

Cure








Re: WEb hosting..

2003-03-03 Thread Stas Bekman
Fco. Valladolid wrote:
http://www.upnix.com
David Emery wrote:
 http://www.mediatemple.net
please specify where the companies are based, since our list is sorted by 
country. Thanks.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: WEb hosting..

2003-03-03 Thread Fco. Valladolid
Stas Bekman wrote:
Fco. Valladolid wrote:

http://www.upnix.com


David Emery wrote:
  http://www.mediatemple.net
please specify where the companies are based, since our list is sorted 
by country. Thanks.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


http://www.upnix.com  is located in Calgary, Alberta Canada.

Regards.

--
Fco. Valladolid Hdez.
---
Consultante
[EMAIL PROTECTED]
[EMAIL PROTECTED]


Re: Apache::DBI on mp2

2003-03-03 Thread Stas Bekman
FWIW, we are discussing the internal DBI pooling mechanism at the dbi-dev list 
and having already a sort-of-working prototype. So hopefully there will be no 
need for Apache::DBI in the near future, as DBI will be able to handle pooling 
internally. However it may take some time, as the drivers will have to adjust 
to support the new functionality.

You can see the thread here:
http://archive.develooper.com/[EMAIL PROTECTED]/index.html#02118
Some working examples are attached to this message:
http://archive.develooper.com/[EMAIL PROTECTED]/msg02134.html
Haroon Rafique wrote:
My setup is as follows:

Apache/2.0.44 (Gentoo/Linux) mod_perl/1.99_08 Perl/v5.8.0

mod_perl was built from CVS.

I was interested in getting Apache::DBI to run under mp2. I did read 
Ask's message at 
http://marc.theaimsgroup.com/?l=apache-modperlm=104225578207460w=2
which leads me to my question. What would it take to get connect_on_init 
to run under mp2?

With the following patch I was able to get connect_on_init to work under 
mp2. Remember that my objective was to JUST get it to run. This is NOT 
release quality code. I'm happy to report that it works for me, so far. 
Anyone else who is running mp2 (no compat mode) willing to give it a try?
Of course, then the gurus can come in and clean up the code so that it 
works under either mp1 or mp2.
If you apply the following patch (will commit it soon) against the modperl-2.0 
source, you will be able to use connect_on_init unmodified, assuming that 
Apache::compat was loaded before Apache::DBI. Let me know whether it works for 
you.

Index: lib/Apache/compat.pm
===
RCS file: /home/cvs/modperl-2.0/lib/Apache/compat.pm,v
retrieving revision 1.81
diff -u -r1.81 compat.pm
--- lib/Apache/compat.pm19 Feb 2003 23:55:23 -  1.81
+++ lib/Apache/compat.pm3 Mar 2003 23:49:19 -
@@ -125,6 +125,16 @@
 die $err if $err;
 }
+sub push_handlers {
+shift;
+Apache-server-push_handlers(@_);
+}
+
+sub set_handlers {
+shift;
+Apache-server-set_handlers(@_);
+}
+
 package Apache::Constants;
 use Apache::Const ();



__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: WEb hosting..

2003-03-03 Thread David Emery
On 2003.Mar.4, at 08:36 Asia/Tokyo, Stas Bekman wrote:

Fco. Valladolid wrote:
http://www.upnix.com
David Emery wrote:
 http://www.mediatemple.net
mediatemple.net is located in Los Angeles


please specify where the companies are based, since our list is sorted 
by country. Thanks.

__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




getting at http.conf from startup.pl

2003-03-03 Thread Aaron J Mackey

I need to access some of the information in http.conf during startup.pl
(more than what Apache::Server and/or dir_config can tell me).  It seems
that there are at least 3 httpd.conf parsing Apache::* modules out there,
so:

 a) which one is recommended by gurus?
 b) can I find out the path to httpd.conf via Apache::Server?

Thanks,

-Aaron



[mp2] disabling a perl handler within a specific location

2003-03-03 Thread Matt Avitable
Hi list :-)

Does anyone know how one goes about disabling a particular handler 
within a specific location?  For example, consider the following:

   Location /
PerlInitHandler config
PerlOutputFilterHandler filter
/Location
   LocationMatch /(images|gfx)/
## what can I put here to say don't run to the above handlers?
   /Location
## OR

Files ~ \.(jpg|jpe?g|gif|png)$
## something here...
/Files
For all HTTP requests for files everywhere excluding directories with 
/images/ and /gfx/ in it, I want to
run my PerlInitHandler and my PerlOutputFilterHandler.  All my handlers 
do is set up some config variables
and run an xml filter.  It's useless overhead to run these handlers on 
images.

I'd change the directory structure so the image dirs and the perl 
locations don't overlap, but its just not practical for this app.
I figure I can test for file/mime types of the requested file in my 
handlers, but I'd love to be able to deal with this issue from within 
httpd.conf.

Here is my setup, in case you need it:
mp 1.99_08
apache 2.0.44
Linux RH  7.2
I would appreciate any thoughts about this at all!  Even a 'I think 
your going about this entirely the wrong way' would be helpful.  This 
is all development software I'm working on, so I'm free to change alot.

Thanks!

-m

## Matt J. Avitable ([EMAIL PROTECTED])
## General Partner / Programmer
## Escapement Arts And Media
## http://www.escapement.net/
## Phone: (804) 400-0605


Re: [mp2] disabling a perl handler within a specific location

2003-03-03 Thread Stas Bekman
Matt Avitable wrote:
Hi list :-)

Does anyone know how one goes about disabling a particular handler 
within a specific location?  For example, consider the following:

   Location /
PerlInitHandler config
PerlOutputFilterHandler filter
/Location
   LocationMatch /(images|gfx)/
## what can I put here to say don't run to the above handlers?
   /Location
## OR

Files ~ \.(jpg|jpe?g|gif|png)$
## something here...
/Files
For all HTTP requests for files everywhere excluding directories with 
/images/ and /gfx/ in it, I want to
run my PerlInitHandler and my PerlOutputFilterHandler.  All my handlers 
do is set up some config variables
and run an xml filter.  It's useless overhead to run these handlers on 
images.
This is not really a mp2 specific question I believe, unless I'm missing 
something. You have to do the same in mp1.

I guess there might be a way to do that, but the simplest idiomatic modperl 
approach is to make the decisions once you are inside the Init handler.

  Location /
 PerlInitHandler Foo::handler
  /Location
package Foo;
# load the modules/constants here
sub handler {
  my $r = shift;
  return Apache::DECLINED if $r-uri =~ /(?:jpe?g|gif|png)$/;
  $r-push_handlers(PerlOutputFilterHandler = \filter_handler);
  return Apache::OK;
}
1;
p.s. I've optimized your /jpg|jpe?g/ regex ;)

Also you may need this :)
http://perl.apache.org/docs/2.0/api/ModPerl/MethodLookup.html
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com