Re: Touble getting apache going...

2001-09-11 Thread Jon Molin

Tim J Spriggs wrote:
 
 I am running Debian Linux(Woody) and installed apache-perl and all of the
 supporting libraries. Whenever Apache is run I get the error message:
 
 ---
 [Mon Sep 10 16:50:03 2001] [error] Can't locate Apache.pm in @INC (@INC
 contains: /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1
 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.6.1 /usr/share/perl/5.6.1
 /usr/local/lib/site_perl /usr/lib/perl5/5.6 /usr/lib/perl5/5.005 .
 /etc/apache/ /etc/apache/lib/perl) at (eval 1) line 3.
 ---
 
 If I goto the /usr/share/perl/5.6.1/CGI where Apache.pm is located and
 try to start apache it simply says apache cannot be started and in the
 logfile it says:

might not be this but shouldn't you have '/usr/share/perl/5.6.1/CGI' in
your @INC to? 

 
 ---
 Apache.pm failed to load!.
 ---
 
 Thank you in advance for any help given.
 
 -Tim([EMAIL PROTECTED])



Re: Virtual Host?

2001-09-11 Thread Rafiq Ismail

I set up something similar recently.  What I would recommend is setting up
a separate samba view to 'just' that dirctory on your unix disk which you
wish to make publically accessible - set this up in your smb.conf file.  
You can specify valid users (just the webserver?), whether it is writable
accross the network, default netmask etc.

You can then set appropriate write permissions on it, without making your
whole secure and wonderful unix partion vulnerable to access from your not
so wonderful NT server.  If you only need a view to those files which you
want to add to your web server readable directories, there is no need to
make the whole drive visible from the outside.  Just map that view to a
drive, point your httpd.conf at the drive and you're sorted.

R.

On Mon, 10 Sep 2001, Medi Montaseri wrote:

 
 I think people are responding with how to fix this on a Unix. He is on
 a NT.
 
 Assuming the disk is on the Unix and the Unix is running Samba, then
 just define a network drive on your NT, say 
 
 V: which mapps to \\yourunixbox\disk7
 
 

-- 
Rafiq Ismail

Software Engineer and Systems Administrator
http://www.codix.net


All the best people in life seem to like Linux. - Steve Wozniak







AxKit Last-Modified header

2001-09-11 Thread Brian Wheeler

Since AxKit is down and this is really a mod-perl issue, I'll ask it
here :)

I'm having problems with the browser caching to much info.  Here's my
situation:  I'm using authcookie to do authentication and my pages are
generated via axkit.  after logging in (and the cookie set), the browser
decides its already seen the pages and doesn't re-request the page
(which has login status on it).

AxKit is doing caching correctly (I've wrote an extension which handles
the login status).

If I set it to no-cache, I can't use the back button on forms.  Using
normal caching, it works ok on all the dynamic pages (CGI and
Apache::ASP which generate xml which is passed to axkit) but the static
pages don't notice the change.

The only difference between the two (request-wise) is that static pages
return a Last-Modified header and dynamic data doesn't.  It seems to
me that if I drop that header, everything will work :)

I've tried doing:

$r-header_out(Last-Modified='');
and
$r-header_out(Last-Modified=undef);

but the header still comes out.

Thoughts?  Am I on the right track?

Brian




RE: AxKit Last-Modified header

2001-09-11 Thread Matt Sergeant

 -Original Message-
 From: Brian Wheeler [mailto:[EMAIL PROTECTED]]
 
 $r-header_out(Last-Modified='');
 and
 $r-header_out(Last-Modified=undef);
 
 but the header still comes out.
 
 Thoughts?  Am I on the right track?

Maybe:

  $r-headers_out-unset('Last-Modified');

Matt.


This email has been scanned for all viruses by the Star Internet Virus Screen.
The service is provided in partnership with MessageLabs, the email security company.
For more information on a higher level of virus protection visit www.star.net.uk




RE: AxKit Last-Modified header

2001-09-11 Thread Geoffrey Young



 -Original Message-
 From: Matt Sergeant [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, September 11, 2001 5:36 AM
 To: 'Brian Wheeler'; [EMAIL PROTECTED]
 Subject: RE: AxKit  Last-Modified header
 
 
  -Original Message-
  From: Brian Wheeler [mailto:[EMAIL PROTECTED]]
  
  $r-header_out(Last-Modified='');
  and
  $r-header_out(Last-Modified=undef);
  
  but the header still comes out.
  
  Thoughts?  Am I on the right track?
 
 Maybe:
 
   $r-headers_out-unset('Last-Modified');

hmmm, I don't know the AxKit architecture really, but I don't think you can
get rid of the Last-Modified header when using default-handler since it
calls set_last_modified() explicitly. IIRC AxKit uses the default-handler as
its caching engine, right?

if that's true, you might want to try fiddling with mod_expires and see if
you can get the results you want from it.

from mod_perl you might be able to enforce a stale page by setting
$r-mtime(0) before the Apache default content handler runs, which ought to
result in a Last-Modified header of Jan 1, 1970 (untested, but I'm pretty
sure I tried it once)

HTH

--Geoff



RE: AxKit Last-Modified header

2001-09-11 Thread Matt Sergeant

 -Original Message-
 From: Geoffrey Young [mailto:[EMAIL PROTECTED]]
 
  -Original Message-
  From: Matt Sergeant [mailto:[EMAIL PROTECTED]]
  
   -Original Message-
   From: Brian Wheeler [mailto:[EMAIL PROTECTED]]
   
   $r-header_out(Last-Modified='');
   and
   $r-header_out(Last-Modified=undef);
   
   but the header still comes out.
   
   Thoughts?  Am I on the right track?
  
  Maybe:
  
$r-headers_out-unset('Last-Modified');
 
 hmmm, I don't know the AxKit architecture really, but I don't 
 think you can
 get rid of the Last-Modified header when using 
 default-handler since it
 calls set_last_modified() explicitly. IIRC AxKit uses the 
 default-handler as
 its caching engine, right?

It depends :-)

But yes, you might be right, depending on how the content gets delivered.

You could always add in a blank AxOutputTransformer, which will force AxKit
to just use print(), even for cached content.

Matt.


This email has been scanned for all viruses by the Star Internet Virus Screen.
The service is provided in partnership with MessageLabs, the email security company.
For more information on a higher level of virus protection visit www.star.net.uk




Re: Touble getting apache going...

2001-09-11 Thread Remco Schaar


sorry, forgot the list...

On Tue, 11 Sep 01:54 Tim J Spriggs wrote:
 I am running Debian Linux(Woody) and installed apache-perl and all of the
 supporting libraries. Whenever Apache is run I get the error message:
 
 
 ---
 [Mon Sep 10 16:50:03 2001] [error] Can't locate Apache.pm in @INC (@INC
 contains: /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1
 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.6.1 /usr/share/perl/5.6.1
 /usr/local/lib/site_perl /usr/lib/perl5/5.6 /usr/lib/perl5/5.005 .
 /etc/apache/ /etc/apache/lib/perl) at (eval 1) line 3.
 ---

This is a Debian bug. There are allready several bugs reported (you might
want to check http://bugs.debian.org/libapache-mod-perl). This is the
result of Debian testing/unstable distribution transition from perl-5.6.0
to perl-5.6.1.

The file you are looking for is still in /usr/lib/perl/5.6.0, while
/usr/lib/perl/5.6.1 is in your path. There are two quite easy solutions:
- Add /usr/lib/perl/5.6.0 to your path, or (TMTOWTDI)
- Create symlinks from /usr/lib/perl/5.6.1/Apache.pm to
/usr/lib/perl/5.6.0/Apache.pm, and all mod_perl stuff etc...

Of course some things might break, but I only ran into trouble using the
XML::Parser (still have to report/test that one, tough). Don't forget about
your solution when the package is upgraded...

 If I goto the /usr/share/perl/5.6.1/CGI where Apache.pm is located and
 try to start apache it simply says apache cannot be started and in the
 logfile it says:

If you read the file yourself, you notice this is some CGI::Apache
backward-compatible file of some sort... the Apache.pm you need is in one
of the above mentioned directory.

 ---
 Apache.pm failed to load!.
 ---
 
 Thank you in advance for any help given.
 
 -Tim([EMAIL PROTECTED])

Bye, 
Remco





RE: AxKit Last-Modified header

2001-09-11 Thread Brian Wheeler

On Tue, 2001-09-11 at 06:41, Matt Sergeant wrote:
  -Original Message-
  From: Geoffrey Young [mailto:[EMAIL PROTECTED]]
  
   -Original Message-
   From: Matt Sergeant [mailto:[EMAIL PROTECTED]]
   
-Original Message-
From: Brian Wheeler [mailto:[EMAIL PROTECTED]]

$r-header_out(Last-Modified='');
and
$r-header_out(Last-Modified=undef);

but the header still comes out.

Thoughts?  Am I on the right track?
   
   Maybe:
   
 $r-headers_out-unset('Last-Modified');
  
  hmmm, I don't know the AxKit architecture really, but I don't 
  think you can
  get rid of the Last-Modified header when using 
  default-handler since it
  calls set_last_modified() explicitly. IIRC AxKit uses the 
  default-handler as
  its caching engine, right?
 
 It depends :-)
 
 But yes, you might be right, depending on how the content gets delivered.
 
 You could always add in a blank AxOutputTransformer, which will force AxKit
 to just use print(), even for cached content.
 
 Matt.
 

I don't see AxOutputTransformer in the docs...do you have an example
which would do this?

(the $r-headers_out-unset didn't work)


Thanks!
Brian




 
 This email has been scanned for all viruses by the Star Internet Virus Screen.
 The service is provided in partnership with MessageLabs, the email security company.
 For more information on a higher level of virus protection visit www.star.net.uk
 





Re: AxKit Last-Modified header

2001-09-11 Thread Robin Berjon

On Tuesday 11 September 2001 16:01, Brian Wheeler wrote:
 On Tue, 2001-09-11 at 06:41, Matt Sergeant wrote:
  You could always add in a blank AxOutputTransformer, which will force
  AxKit to just use print(), even for cached content.

 I don't see AxOutputTransformer in the docs...do you have an example
 which would do this?

 (the $r-headers_out-unset didn't work)

Off the top of my head:

package MyDeleteLMod;

sub del {
Apache-request-headers_out('do whatever'); # not sure this is needed
    return @_;
}
1;

then in httpd.conf:

PerlModule MyDeleteLMod
AxAddOutputTransformer MyDeleteLMod::del

I'm not sure you need to actually munge the headers if you do that or if 
it'll influence AxKit's caching by itself (it always runs after caching).

-- 
___
Robin Berjon [EMAIL PROTECTED] -- CTO
k n o w s c a p e : // venture knowledge agency www.knowscape.com
---
Smoking is one of the leading causes of statistics.




uploads with Apache::Request failing

2001-09-11 Thread John Saylor

Hi

I'm trying to use Apache::Request to upload a file, but it's not
working.

Here's how I initalize the object:
 $s = shift;
 $apr = Apache::Request-new ( $s,
DISABLE_UPLOADS = 0 );

And here's the upload code:
  # using $rv for something beside a return value
  $rv = $params-{path_dir} . '/list.txt';
  $fh = new IO::File  $rv;

  if ( defined $fh ) {
$s = $apr-upload ( 'list_file' );

if ( ! defined $s ) {
  $s = 'could not get object from $apr-upload';
  push ( @{$errors}, $s );
}
else {
  $upload = $s-fh;
  while ( $upload ) {
$fh-print ( $_ );
  }
  $fh-close;
}
  }
  else {
$s = 'could not write to ' . $rv . ': ' . $!;
push ( @{$errors}, $s );
  }

And $s never gets defined on this line:
$s = $apr-upload ( 'list_file' );

Any clues, suggestions, c. welcome.

-- 
\js




Callback called exit. x 100000

2001-09-11 Thread Christoph Bergmann

Hi...

I have a problem with an apache_mod_perl-server which flushes the
httpd.error_log-file with the following lines:

Attempt to free unreferenced scalar during global destruction.
Attempt to free unreferenced scalar during global destruction.
Attempt to free unreferenced scalar during global destruction.
Attempt to free unreferenced scalar during global destruction.
Out of memory!
Callback called exit.
Callback called exit.
Callback called exit.
Callback called exit.
Callback called exit.
Callback called exit.
Callback called exit.
Callback called exit.
...etc.


The last line Callback called exit. is repeated a million times until
the whole disc is full. It happens from time to time, I can't say when.
Maybe it has something to do with heavy load, the webserver has about 10
hits / second, in peak times more.

I'm not sure it has _definitely_ something to do with mod_perl, but I
guess so, because of the Attempt to free unreferenced scalar during
global destruction. lines before...


Does anybody know what happens here and what to do?


Thanx in advance!


Best regards,

Christoph Bergmann



RE: Callback called exit. x 100000

2001-09-11 Thread Rob Bloodgood

 Attempt to free unreferenced scalar during global destruction.
 Attempt to free unreferenced scalar during global destruction.
 Attempt to free unreferenced scalar during global destruction.
 Attempt to free unreferenced scalar during global destruction.
 Out of memory!
 Callback called exit.
 Callback called exit.
 Callback called exit.
 Callback called exit.
 Callback called exit.
 Callback called exit.
 Callback called exit.
 Callback called exit.
 etc.


 The last line Callback called exit. is repeated a million times until
 the whole disc is full. It happens from time to time, I can't say when.
 Maybe it has something to do with heavy load, the webserver has about 10
 hits / second, in peak times more.

Your webserver has run out of memory.

as in, you have NOT limited the allowable resources that apache/mod_perl can
use
and have exceeded both RAM and swap.

Look into Apache::SizeLimit.

HTH!


L8r,
Rob

#!/usr/bin/perl -w
use Disclaimer qw/:standard/;





RE: Callback called exit. x 100000, additional info

2001-09-11 Thread Rob Bloodgood


Also, look into the MaxServers settings, and memory calculations in the
Guide:


http://perl.apache.org/guide/config.html#MinSpareServers_MaxSpareServers_

And especially
http://perl.apache.org/guide/performance.html#Choosing_MaxClients

GOOD LUCK!

L8r,
Rob




keeping client images private

2001-09-11 Thread will trillich

y'all seem to have some clever brains out here, so i'm wondering
if some of you can offer suggestions--

what's a good clean way to keep images private per customer?

i'm using mod_perl and HTML::Mason with session cookies, but
coming up with a paradigm for storing and revealing images
privately has got me a bit flummoxed.

mr. smith has pix which he can see when he logs in to the
website, and mr. brown has pix of his own, but neither can
see the other's images. each customer can have two levels of
imagery (main images/subsidiary images).

i could have a handler intercept image requests and deny access
if session-user isn't valid ... should i just make an apache
alias to handle images as if they're from a certain subdir? and
then use mod_perl to redirect the requests to the actual images
internally?

or actually store the images in actual subdirs of the
documentroot?

is there a better/faster/cheaper way?

i'm sure there's more than one way to do this -- and before i
take the likely-to-be-most-circuituitous route, i thought i'd
cull advice from the clever minds on this list...

-- 
[EMAIL PROTECTED]
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!



Re: Callback called exit. x 100000

2001-09-11 Thread Adi Fairbank

I had this problem a while back and it turned out to be an infinite loop in
my code.  I found it by writing in better logging mechanisms which
pinpointed exactly where the infinite loop was.

HTH,
Adi

Christoph Bergmann wrote:
 
 Hi...
 
 I have a problem with an apache_mod_perl-server which flushes the
 httpd.error_log-file with the following lines:
 
 Attempt to free unreferenced scalar during global destruction.
 Attempt to free unreferenced scalar during global destruction.
 Attempt to free unreferenced scalar during global destruction.
 Attempt to free unreferenced scalar during global destruction.
 Out of memory!
 Callback called exit.
 Callback called exit.
 Callback called exit.
 Callback called exit.
 Callback called exit.
 Callback called exit.
 Callback called exit.
 Callback called exit.
 ...etc.
 
 The last line Callback called exit. is repeated a million times until
 the whole disc is full. It happens from time to time, I can't say when.
 Maybe it has something to do with heavy load, the webserver has about 10
 hits / second, in peak times more.
 
 I'm not sure it has _definitely_ something to do with mod_perl, but I
 guess so, because of the Attempt to free unreferenced scalar during
 global destruction. lines before...
 
 Does anybody know what happens here and what to do?
 
 Thanx in advance!
 
 Best regards,
 
 Christoph Bergmann




ANNOUNCE: Apache::ImageMagick 2.0b3

2001-09-11 Thread Gerald Richter

The URL

ftp://ftp.dev.ecos.de/pub/perl/image/Apache-ImageMagick-2.0b3.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/G/GR/GRICHTER/Apache-ImageMagick-2.0b3.tar.gz
  size: 10596 bytes
   md5: 52cc19c99c0d1cf6922a612bc3527511



NAME

Apache::ImageMagick - Convert and manipulate images on the fly

DESCRIPTION

This module uses the Image::Magick library to process or create an image on
the fly. It is able to convert the source image to any type you request that
is supported by Image::Magick (e.g. TIFF, PPM, PGM, PPB, GIF, JPEG and
more).
Additionaly you can specify (multiple) image manipulation filters in the
additional path info and format options in the query string.
Apache::ImageMagick caches the result image so multiple requested with
the same parameters only needs one computation. To do more sophisticated
manipulation, Apache::ImageMagick can run a script that does the image
manipulation/creation. Last but not least Apache::ImageMagick comes with
a proxy module, that can be linked into a non mod_perl frontend proxy server
and which will delivers cached images which highest possible speed.

For detailed information see

  perldoc Apache::ImageMagick


AUTHOR

G.Richter ([EMAIL PROTECTED])

Based on work from Lincoln Stein and Doug MacEachern publish in
Writing Apache Modules with Perl and C see www.modperl.com


-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-