Caching with $r-no_cache(1)

2000-01-07 Thread Randy Harmon


I notice that the Guide omits the mention of Netscape's ignorance of
Expires: set to the same as Date: when it mentions $r-no_cache(1)
performing that function.  

Currently, I'm experiencing the problem with Netscape 4.7, although I seem
to recall the same problem in earlier releases, in the case where the target
browser's clock is slow.

Of course, the server-side workaround (since we can't just fix our visitor's
clocks) is to set an Expires header that significantly in the past, for some
definition of 'significant'.

I'm going to assume that $r-no_cache(1) won't be kludged to fix Netscape's
bug, although some would argue that it should be 'fixed' in mod_perl.

As an update to /guide/correct_headers.html#2_1_3_Expires_and_Cache_Control,
I'd suggest adding the following text at the end:

[ ... works with the major browsers. ] However, Netscape clients with slow
clocks may not honor the 'immediate' timeout, cacheing pages anyway. 
This can be corrected by explicitly setting an Expires header that's in
the past.  How far in the past depends on how lenient you wish to be with
browsers with slow clocks.

Something between 5 and 30 minutes seems reasonable to me, but discussion
may demonstrate a different approach and/or timeframe.

Thoughts?

Randy



Re: Looking for Maurice Aubrey maurice@hevanet.com

2000-01-07 Thread Matt Sergeant

On Fri, 07 Jan 2000, Sam Tregar wrote:
 Hello all.  Has anyone heard from Maurice Aubrey lately?  Does anyone know
 how I could contact him (other than his email above)?  My searches show
 that he last posted here in '98, and I can't find any further traces of
 him after that.  Emails have gone unanswered.
 
 I'm looking for him because I'm using his *excelent* IPC::ShareLite module
 in my HTML::Template module.  I found, and fixed, a seg-fault in
 IPC::ShareLite which HTML::Template triggers.  Currently I'm holding up
 releasing a new version of HTML::Template that uses IPC::ShareLite until
 the fix can get into a real version.

If you can't find him, provided it's Artistic Licenced, just release you
version to CPAN as IPC::ShareLite2 - it's perfectly legit. That's the
beauty of free software.

-- 
Matt/

Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.



Re: Looking for Maurice Aubrey maurice@hevanet.com

2000-01-07 Thread Ask Bjoern Hansen

On Fri, 7 Jan 2000, Matt Sergeant wrote:

...
  releasing a new version of HTML::Template that uses IPC::ShareLite until
  the fix can get into a real version.
 
 If you can't find him, provided it's Artistic Licenced, just release you
 version to CPAN as IPC::ShareLite2 - it's perfectly legit. That's the
 beauty of free software.

or better talk to [EMAIL PROTECTED] about "getting" the namespace until
Maurice shows up again.


 - ask

-- 
ask bjoern hansen - http://www.netcetera.dk/~ask/
more than 60M impressions per day, http://valueclick.com



Re: Caching with $r-no_cache(1)

2000-01-07 Thread Ask Bjoern Hansen

On Fri, 7 Jan 2000, Ask Bjoern Hansen wrote:

 On Fri, 7 Jan 2000, Randy Harmon wrote:
 
 The latest version from CVS also sets the Cache-Control: and the Pragma:
 headers when you use $r-no_cache(1).

(latest version of mod_perl that is, not Apache).


 - ask

-- 
ask bjoern hansen - http://www.netcetera.dk/~ask/
more than 60M impressions per day, http://valueclick.com



Re: Caching with $r-no_cache(1)

2000-01-07 Thread G.W. Haywood

Hi there,

On Fri, 7 Jan 2000, Randy Harmon wrote:

 Currently, I'm experiencing the problem with Netscape 4.7, although I seem
 to recall the same problem in earlier releases, in the case where the target
 browser's clock is slow.
 
 [snip] can be corrected by explicitly setting an Expires header that's in
 the past.  How far in the past depends on how lenient you wish to be with
 browsers with slow clocks.
 
 Something between 5 and 30 minutes seems reasonable to me, but discussion
 may demonstrate a different approach and/or timeframe.
 
 Thoughts?

Well, quite a lot of computers now fire up with the clock saying some
time around 4 Jan 1980.  Just how far do you let this go?  My view is
that if he suspects that it may cause a problem, one should tell his
user to make sure the clock is right.  Caveat browsor.  I feel sure
that deliberately lying about the time is a dangerous path to tread.
Of course we can't (yet) expect everyone to be running ntpd, and five
minutes doesn't initially seem unreasonable, but we could then expect
biennial fun and games when daylight savings time kicks in and out, or
not, as the case often may be.  The software industry has a bad enough
reputation as it is, without yet another kind of periodic Y2k bug.

Maybe a Request For Comment?

Or a word in someone's ear at the browser development labs?

73
Ged.



Re: Looking for Maurice Aubrey maurice@hevanet.com

2000-01-07 Thread Gunther Birznieks

Before taking the drastic step of grabbing a hold of the IPC::ShareLite
namespace (I prefer this to a branch split), how long have you been trying
to contact him?

Where I live, I know a few people that took off big time during the
Millenium holiday. I don't think it is unusual that someone might have
taken a month off to party and vacation around this time.

Later,
  Gunther

On Fri, 7 Jan 2000, Matt Sergeant wrote:

 On Fri, 07 Jan 2000, Sam Tregar wrote:
  Hello all.  Has anyone heard from Maurice Aubrey lately?  Does anyone know
  how I could contact him (other than his email above)?  My searches show
  that he last posted here in '98, and I can't find any further traces of
  him after that.  Emails have gone unanswered.
  
  I'm looking for him because I'm using his *excelent* IPC::ShareLite module
  in my HTML::Template module.  I found, and fixed, a seg-fault in
  IPC::ShareLite which HTML::Template triggers.  Currently I'm holding up
  releasing a new version of HTML::Template that uses IPC::ShareLite until
  the fix can get into a real version.
 
 If you can't find him, provided it's Artistic Licenced, just release you
 version to CPAN as IPC::ShareLite2 - it's perfectly legit. That's the
 beauty of free software.
 
 -- 
 Matt/
 
 Details: FastNet Software Ltd - XML, Perl, Databases.
 Tagline: High Performance Web Solutions
 Web Sites: http://come.to/fastnet http://sergeant.org
 Available for Consultancy, Contracts and Training.
 



RE: Caching with $r-no_cache(1)

2000-01-07 Thread Eric Cholet

Doug has made the following modification to modperl (in the CVS tree):

  $r-no_cache(1) will now set the r-headers_out "Pragma" and
  "Cache-control" to "no-cache"

This should work even with buggy browsers.

--
Eric


 I notice that the Guide omits the mention of Netscape's ignorance of
 Expires: set to the same as Date: when it mentions $r-no_cache(1)
 performing that function.  
 
 Currently, I'm experiencing the problem with Netscape 4.7, although I seem
 to recall the same problem in earlier releases, in the case where the target
 browser's clock is slow.
 
 Of course, the server-side workaround (since we can't just fix our visitor's
 clocks) is to set an Expires header that significantly in the past, for some
 definition of 'significant'.
 
 I'm going to assume that $r-no_cache(1) won't be kludged to fix Netscape's
 bug, although some would argue that it should be 'fixed' in mod_perl.
 
 As an update to /guide/correct_headers.html#2_1_3_Expires_and_Cache_Control,
 I'd suggest adding the following text at the end:
 
 [ ... works with the major browsers. ] However, Netscape clients with slow
 clocks may not honor the 'immediate' timeout, cacheing pages anyway. 
 This can be corrected by explicitly setting an Expires header that's in
 the past.  How far in the past depends on how lenient you wish to be with
 browsers with slow clocks.
 
 Something between 5 and 30 minutes seems reasonable to me, but discussion
 may demonstrate a different approach and/or timeframe.
 
 Thoughts?
 
 Randy
 




RE: Embperl under cgiwraper

2000-01-07 Thread Gerald Richter


 unshift(@INC, '/home/sites/home/HTML-Embperl-1.2.0/blib/lib' );
 print "@INC\n";


You don't need this, if you have run "make install"



 [11765]ERR:  30: Line 1: Not found ?

This error message comes from Embperl. So the embpcgi.pl is still found,
otherwise you wouldn't see this message, but Embperl didn't a/the file which
should be processed. From the error message it seems you didn't give Embperl
any sourcefile to process.


You must request it like this:

http://localhost/cgi-bin/embpcgi.pl/path/to/the/source.html

where /path/to/the/source.html is your source file, that means, if you
request only

http://localhost/path/to/the/source.html

you should simply see your raw source.


Hope this helps

Gerald



RE: Embperl under cgiwraper (2)

2000-01-07 Thread Gerald Richter

 From the error message it seems you didn't
 give Embperl
 any sourcefile to process.


 You must request it like this:

 http://localhost/cgi-bin/embpcgi.pl/path/to/the/source.html


The other possibilty is, that cgiwrapper does not set the environement
variable PATH_TRANSLATED. This is required by Embperl in cgi mode

Gerald



send_fd and timeout problem

2000-01-07 Thread Martin Lichtin

Hi,

I'm using send_fd() to send relatively large files. Apache's Timeout is 
currently set to 60s and indeed, mod_perl aborts as soon as the minute 
elapses. (error msg: mod_perl: Apache-print timed out). 
However, it shouldn't do that, right? 

As ap_send_fd_length() does 8k chunking and uses a soft timeout, 
reset for each chunk, I would have expected that it would only abort if
it couldn't send 8k within a minute. This would also match Apache's Timeout
documentation saying "The amount of time between ACKs on transmissions of 
TCP packets in responses".

Any suggestions? 
Thanks,
Martin



RE: Embperl under cgiwraper (2)

2000-01-07 Thread Vivek Khera

 "GR" == Gerald Richter [EMAIL PROTECTED] writes:

GR The other possibilty is, that cgiwrapper does not set the environement
GR variable PATH_TRANSLATED. This is required by Embperl in cgi mode

My experience tells me that cgiwrap steals PATH_INFO and
PATH_TRANSLATED for its own purpose, to find the "real" executable.
If you try to run a program under cgiwrap that has PATH_INFO on it,
cgiwrap won't find the program.  This is on a Cobalt RaQ2 with the
latest cgiwrap patch Cobalt released.




Re: Embperl under cgiwraper

2000-01-07 Thread Vijay

Hello,

I have setup srm.conf as given below.

Directory /home/sites/home/web
Action text/html /scripts/embpcgi.pl
/Directory

I believe that by default all html files under this directory should be
processed by embpcgi.pl. This is what is not happening.

I may have not set up properly. I have installed embperl without
support for mod_perl. I want to use it as CGI.

Thanks for all help.

Vijay Nair
- Original Message -
From: Gerald Richter [EMAIL PROTECTED]
To: Vijay [EMAIL PROTECTED]
Cc: mod_perl Maillinglist [EMAIL PROTECTED]
Sent: Friday, January 07, 2000 1:36 PM
Subject: RE: Embperl under cgiwraper


 
  unshift(@INC, '/home/sites/home/HTML-Embperl-1.2.0/blib/lib' );
  print "@INC\n";
 

 You don't need this, if you have run "make install"


 
  [11765]ERR:  30: Line 1: Not found ?

 This error message comes from Embperl. So the embpcgi.pl is still found,
 otherwise you wouldn't see this message, but Embperl didn't a/the file
which
 should be processed. From the error message it seems you didn't give
Embperl
 any sourcefile to process.


 You must request it like this:

 http://localhost/cgi-bin/embpcgi.pl/path/to/the/source.html

 where /path/to/the/source.html is your source file, that means, if you
 request only

 http://localhost/path/to/the/source.html

 you should simply see your raw source.


 Hope this helps

 Gerald




Apache::DBI Problem

2000-01-07 Thread Dennis Megarry

This message was sent from Geocrawler.com by "Dennis Megarry" [EMAIL PROTECTED]
Be sure to reply to that address.

Everything was running fine, i installed mod_perl 
and ApacheDBI, now, I get errors trying to 
connect to mySQL, the message showing up in my 
error_log file is this:

httpd: [Thu Jan  6 22:45:23 2000] [error] 
Undefined subroutine 
Apache::ROOTwww_2eelite_2ecom::cgi_2dbin::get_2ec
gi::configure called at /user3/elite/cgi-
bin/get.cgi line 16.

Also, when I try to start the startup.pl file 
that came with ApapcheDBI i get this error 
message:

Can't locate object method "module" via 
package "Apache" at /usr/local/lib/perl5
/site_perl/5.005/Apache/DBI.pm line 202.
BEGIN failed--compilation aborted at startup.pl 
line 11.

Anyone have an idea what I'm doing wrong?

Dennis



Geocrawler.com - The Knowledge Archive



mod_rewrite and -U Problems

2000-01-07 Thread Jason Simms

I have a question about the -U test under mod_rewrite.  The docs state that 
the test "Checks if TestString is a valid URL and accessible...".  Well, the 
problem I am having is that if I give it a path the clearly does not exist 
on my system, the logs report that it does the check and returns a 200(OK).  
For instance, if I have a a URL that I send it:

http://test.mydomain.com/click?url=hjk

And then if I extract and do a -U test on 'hjk', it will report a 200 OK and 
try to redirect (I have indicated in my scripts to redirect only if the URL 
is valid, which is what I thought -U would accomplish).  I have the log 
verbosity on 9, so I am certain that it is using _only_ the 'hjk', and not 
extra stuff.  Specifically, the flow from the logs is:

xxx.xxx.xxx.xxx - - [07/Jan/2000:16:59:13 -0500] 
[xxx.xxx.com/sid#8100034][rid#81a8034/initial] (5) RewriteCond URI (-U) 
check: path=hjk - status=200

xxx.xxx.xxx.xxx - - [07/Jan/2000:16:59:13 -0500] 
[xxx.xxx.com/sid#8100034][rid#81a8034/initial] (4) RewriteCond: input='hjk' 
pattern='-U' = matched

xxx.xxx.xxx.xxx - - [07/Jan/2000:16:59:13 -0500] 
[xxx.xxx.com/sid#8100034][rid#81a8034/initial] (2) local path result: jh

Does anyone know the inner workings of this module who could give me some 
insight as to why this happens?  Is there another way that I can verify the 
validity of a URL, external or internal, from within mod_rewrite (or 
anything else I can use from within a configuration file)?  Thanks!

Jason Simms
__
Get Your Private, Free Email at http://www.hotmail.com



Re: Weird message from make test

2000-01-07 Thread Nancy Lin


Thanks for all the pointers.  Do you know where I can find the CGI.pm
changes file?

Here's my question, why do I really need to figure this out in the first
place?  Shouldn't modperl (at least its test scripts) work w/ any version
of CGI.pm?  Could I assume that the test script is wrong somehow?  If it's
not the test script that's bad, then it would have to be CGI.pm, no?

Thanks

-- 
Nancy


On Fri, 7 Jan 2000, Stas Bekman wrote:

  The permissions are correct:
  drwxrwxrwt  19 root root 2048 Jan  6 14:07 /tmp/
  drwxrwxrwt   2 root root 1024 Jan  6 14:07 /var/tmp/
  
  I was running CGI.pm version 2.56.  After I reverted back to 2.46, make
  test worked.  Not sure what other versions between 2.46 and 2.56 works
  also.  I don't really have time to track down the reason.  But if anyone
  finds out, please let me know.
 
 try to read the CGI.pm changes file, look for the tempfile notes.
 
  
  Thanks
  
  -- 
  Nancy
  
  
  On Fri, 7 Jan 2000, Stas Bekman wrote:
  
I'm compiling apache 1.3.9 and mod_perl 1.21 on redhat 6.0.

make test for modperl fails on modules/cgi.t test #4.  The message from
the error log shows:

[Thu Jan  6 13:22:25 2000] [error] CGI open of tmpfile: Permission denied
   
   I'm not sure but possibly it's a CGI.pm's problem when it tries to open a
   temp file. If it's you have a problem with your /tmp or /var/tmp dirs make
   sure you have the following permissions:
   
   drwxrwxrwt  14 root root 4096 Jan  6 18:30 tmp/
   
   if you have something different, please correct it and try again.
   
Here are the steps I took (using perl 5.005_03)

1. perl Makefile.PL APACHE_SRC=/opt/apache/apache_1.3.9/src
DO_HTTPD=1 USE_APACI=1 PREP_HTTPD=1 EVERYTHING=1 APACI_ARGS='--verbose'

2.  make

3.  cd ../apache_1.3.9

4.  ./configure \
--prefix=/opt/apache \
--mandir=/usr/local/man \
--enable-shared=expires \
--enable-module=expires \
--enable-shared=rewrite \
--enable-module=rewrite \
--enable-shared=proxy \
--enable-module=proxy \
--activate-module=src/modules/perl/libperl.a \
--enable-module=so

5.  make

6.  cd ../mod_perl-1.21

7.  make test


Any help is greatly appreciated.  I'm starting to get queasy from
looking at this all morning.

-- 
Nancy



   
   
   
   ___
   Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
   Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
   perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
   single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
   
   
  
  
  
  
 
 
 
 ___
 Stas Bekmanmailto:[EMAIL PROTECTED]  http://www.stason.org/stas
 Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
 perl.apache.orgmodperl.sourcegarden.org   perlmonth.comperl.org
 single o- + single o-+ = singlesheavenhttp://www.singlesheaven.com
 
 



Re: question about global.asa

2000-01-07 Thread Joshua Chamas

[EMAIL PROTECTED] wrote:
 
 Hi Joshua,
 
 I am using Apache::ASP module for my web site. Say, my
 documentroot is set to /web/htdocs. Under this dir, I have
 several sub directories (say, abc, xyz etc.). Each of these
 sub-directories are supposed to be working as separate
 applications. Currently, I am not using VirtualHosts or
 .htaccess file.
 My question is: Can I use global.asa in each of these sub-
 directories *without* using .htaccess file (where I would be
 declaring the StateDir variable normally)? The "Global"
 variable in my httpd.conf file is set to "."
 My concern is that if I do not set the StateDir variable for
 each application and use global.asa in one, will it mess up
 the other applications?? I don't want to use .htaccess as it
 slows down the application quite a bit.
 
 You have solved my global.asa problems before also! Thanks
 in advance :)
 ...

[response sent to Ritu already]

I would put this kind of information in your *.conf files, 
not .htaccess like you say.  You could set each Global to
"..", and set each StateDir separately, or you could symlink
the global.asa - ../global.asa, either way should work fine.

-- Joshua
_
Joshua Chamas   Chamas Enterprises Inc.
NodeWorks  free web link monitoring   Huntington Beach, CA  USA 
http://www.nodeworks.com1-714-625-4051



problems with Apache::DBI

2000-01-07 Thread Cere M. Davis


I am trying to get the DBI::Ingres stuff to work with Apache::DBI.

Once the server tries to open the inital connections through the
startup.pl file with the "Apache::DBI-connect_on_init" command it throws
an error message like this:

168 Apache::DBI PerlChildInitHandler
[Fri Jan  7 12:46:35 2000] [error] install_driver(Ingres) failed: Can't
load
'/uns/mind/usr/local/perl5/lib/site_perl/5.005/alpha-dec_osf/auto/DBD/Ingres/Ing
res.so'
for module DBD::Ingres: dlopen: cannot load
/uns/mind/usr/local/perl5/lib/site_perl/5.005/alpha-dec_osf/auto/DBD/Ingres/Ingr
es.so
at /uns/mind/usr/local/perl5/lib/5.00503/alpha-dec_osf/DynaLoader.pm
line 169.

 at (eval 15) line 3

 at /uns/mind/usr/local/perl5/lib/site_perl/5.005/Apache/DBI.pm line 138


in the error_log when I run httpsd -X (single thread mode).

I can run the DBI drivers to ingres with no problems outside

of Apache just not with the Apache mod_perl stuff.

Does anyone know what's going on here?  I expect that DynaLoader

is used to load the DBI standalone stuff - and that works fine -

so why is it that DynaLoader would have trouble loading Ingres.so

when requested through Apache::DBI?

-Cere


*
Cere Davis  *
Systems Administrator   *
MCIS University of Washington   *
206.221.4717*
[EMAIL PROTECTED]   *
*