Re: 2.0.31 shutdown after heavy load + core dumps on heavy load

2002-02-04 Thread Adam Sussman


I'm seeing the same thing with the prefork mpm under linux with lots of load.  
Possibly it
is something outside of the mpms themselves?  The processes definitly don't go away 
until
you kill them with SIGKILL a few times.  One thing I noticed is that, under load, 
processes
seem to spend a lot of time in the 'close connection' state.  By the time you have to 
issue
the kills, mod_status shows idle children.  Perhaps there is something that is not 
getting
cleaned up properly?

On a possibly related note, I am seeing segfaults in prefork children under load when 
the
number of children is high (over 1000).  The stacktrace looks like so and doesn't make
a lot of sense:

#0  pthread_sighandler (signo=11, ctx=
  {gs = 0, __gsh = 0, fs = 0, __fsh = 0, es = 43, __esh = 0, ds = 43, __dsh = 0, 
edi = 1076506184, esi = 0, ebp = 3221223720, esp = 3221223680, ebx = 1076516568, edx = 
1, ecx = 0, eax = 0, trapno = 13, err = 0, eip = 1076467940, cs = 35, __csh = 0, 
eflags = 66070, esp_at_signal = 3221223680, ss = 43, __ssh = 0, fpstate = 0xb680, 
oldmask = 2147483648, cr2 = 0}) at signals.c:87
87  signals.c: No such file or directory.
in signals.c
(gdb) where
#0  pthread_sighandler (signo=11, ctx=
  {gs = 0, __gsh = 0, fs = 0, __fsh = 0, es = 43, __esh = 0, ds = 43, __dsh = 0, 
edi = 1076506184, esi = 0, ebp = 3221223720, esp = 3221223680, ebx = 1076516568, edx = 
1, ecx = 0, eax = 0, trapno = 13, err = 0, eip = 1076467940, cs = 35, __csh = 0, 
eflags = 66070, esp_at_signal = 3221223680, ss = 43, __ssh = 0, fpstate = 0xb680, 
oldmask = 2147483648, cr2 = 0}) at signals.c:87
#1  
#2  __pthread_reset_main_thread () at internals.h:372
#3  0x402990e5 in __fork () at ptfork.c:92
#4  0x0809b2cd in ap_graceful_stop_signalled () at eval.c:41
#5  0x0809b643 in ap_graceful_stop_signalled () at eval.c:41
#6  0x0809ba62 in ap_mpm_run () at eval.c:41
#7  0x080a24ee in main () at eval.c:41
#8  0x402c2177 in __libc_start_main (main=0x80a1b9c , argc=1, ubp_av=0xbb44, 
init=0x80637a8 <_init>, 
fini=0x80c2f50 <_fini>, rtld_fini=0x4000e184 <_dl_fini>, stack_end=0xbb3c) at 
../sysdeps/generic/libc-start.c:129

Anyone have an idea how to track this down?  The ap_graceful_stop_signalled function
does *nothing* in the prefork mpm.

-adam


On Mon, Feb 04, 2002 at 02:13:52PM -0500, MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) 
wrote:
> This was with the worker MPM.. I initially suspected the latency - 'waited
> for about 5 minutes, and then nothing happened till I issued a "kill -9"
> command. I'll try again today, and will probably post the stack trace of the
> parent process when it happens.
> 
> Thanks
> -Madhu
> 
> -Original Message-
> From: Greg Ames [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 04, 2002 9:58 AM
> To: [EMAIL PROTECTED]
> Subject: Re: 2.0.31 shutdown after heavy load
> 
> 
> "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" wrote:
> > 
> > Hi,
> > I'm getting the following message when I try to stop apache after
> a
> > stress-test on HPUX (using webstone).. Inspite of the SIGKILL message, the
> > process does not exit.. A second attempt is successful.. Any clues
> regarding
> > what may be happening is appreciated..
> > 
> >  [error] child process 5891 still did not exit, sending a SIGKILL.
> 
> which MPM?  and have you tried this test with different results before?
> 
> I didn't think we could do anything to block SIGKILL.  Could this be just
> dispatching latency?
> 
> Greg

-- 

"I believe in Kadath in the cold waste, and Ultima Thule. But you
 cannot prove to me that Harvard Law School actually exists."
- Theodora Goss

"I'm not like that, I have a cat, I don't need you.. My cat, and
 about 18 lines of bourne shell code replace you in life."
- anonymous


Adam Sussman
Vidya Media Ventures

[EMAIL PROTECTED]




mod_rewrite.h:133:18: ndbm.h: No such file or directory

2002-02-04 Thread Jie Gao

Hi All,

It's that problem again, this time with apache_1.3.23 on linux (rh7.2).

I am building it with php4 and most of other modules. Here's my config:

#! /bin/sh
EAPI_MM=SYSTEM
export EAPI_MM

INCLUDES="-I/usr/include/db1 -I/usr/local/BerkeleyDB.4.0/include -I/usr/local/include" 
\
LDFLAGS="-L/usr/local/BerkeleyDB.4.0/lib -L/usr/local/lib 
-L/usr/local/src/openldap/lib" \
EAPI_MM=SYSTEM \
CC=gcc LIBS="-lldap -llber -ldb" OPTIM="-O2" \
./configure \
--prefix=/usr/local/apache_1.3.23+mod_ssl+php \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=ssl \
--enable-module=php4 \
--enable-module=most

Error:

gcc -c  -I../../os/unix -I../../include  -O2 -DLINUX=22 -DMOD_SSL=208106 
-I/usr/local/src/php
-I/usr/local/src/php/main -I/usr/local/src/php/main -I/usr/local/src/php/Zend 
-I/usr/local/src/php/Zend
-I/usr/local/src/php/TSRM -I/usr/local/src/php/TSRM -I/usr/local/src/php -DEAPI 
-DEAPI_MM -DNO_DL_NEEDED
`../../apaci` mod_rewrite.c
In file included from mod_rewrite.c:93:
mod_rewrite.h:133:18: ndbm.h: No such file or directory
make[4]: *** [mod_rewrite.o] Error 1
make[3]: *** [all] Error 1
make[2]: *** [subdirs] Error 1
make[2]: Leaving directory `/usr/local/src/apache_1.3.23+mod_ssl+php/src'
make[1]: *** [build-std] Error 2
make[1]: Leaving directory `/usr/local/src/apache_1.3.23+mod_ssl+php'
make: *** [build] Error 2

Without LIBS=, apache will add -I/usr/include/db1 and there would be no
problem with mod_rewrite; otherwise, apache won't be able to find the
ldap library files. I added INCLUDES=, but it gets ignored.

Thanks,



Jie




Re: more minor 2.0.31 breakage

2002-02-04 Thread William A. Rowe, Jr.

From: "Stas Bekman" <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 11:18 PM


> >>I think it's a bug. The sub-directory can be password-protected. Does it 
> >>mean that mod_autoindex won't display it, since it'll fail to run the 
> >>sub-request?
> >>
> > 
> > By design, for better or worse [feel free to debate here.]
> > 
> > The new logic [perhaps 1.3 as well, you would have to look] does a subrequest 
> > on the /~stas/ url ... and decides it's broken [or inaccessable, or whatever] 
> > and autoindex won't display it.  What's broken about not displaying things that
> > the user cannot access?
> 
> I gave an example of a password protected sub-directory. You say that 
> it's correct not to display it then? How do you know whether the user 
> cannot access this directory? May be he does have the needed access 
> credentials.

Fair enough - we can rescope the rules.  Right now 200s and 300s pass.  The test
is right there in autoindex if you would like to change it.

Personally, I never want to see 500'ed resources return OK ;-/




Re: more minor 2.0.31 breakage

2002-02-04 Thread Stas Bekman

William A. Rowe, Jr. wrote:

> From: "Stas Bekman" <[EMAIL PROTECTED]>
> Sent: Monday, February 04, 2002 8:39 PM
> 
> 
> 
>>Rodent of Unusual Size wrote:
>>
>>
>>>Greg Ames wrote:
>>>
>>>
I just noticed that autoindex listings from apache.org no
longer display the folder icon for directories.  You see
a '?' icon instead.  The Rodent tells me there's some kind
of magic type that mod_autoindex uses to figure this out.
Not debugged yet.


>>>As an unsubstantiated WAG, I would guess that the subrequest
>>>that's sent off to determine the content-type is running
>>>afoul of mod_dir somehow, and S_ISDIR isn't set correctly
>>>when it comes back.
>>>
>>
>>BTW, since you are talkinga about mod_autoindex, I don't recall that it 
>>was working this way before:
>>
>>I've uploaded a dir with files to apache.org/~stas/. as of that moment 
>>apache.org was running 2.0.28. I was trying to view apache.org/~stas/, 
>>all the files/dirs showed up, but not this new sub-dir. When I've tried 
>>to enter the new directory manually 
>>http://apache.org/~stas/modperl-site/ I've got 500 error. Looking at 
>>error_log revealed that I had a broken .htaccess in that directory. I 
>>don't understand why mod_autoindex won't display the directory in the 
>>index's listing.
>>
>>I think it's a bug. The sub-directory can be password-protected. Does it 
>>mean that mod_autoindex won't display it, since it'll fail to run the 
>>sub-request?
>>
> 
> By design, for better or worse [feel free to debate here.]
> 
> The new logic [perhaps 1.3 as well, you would have to look] does a subrequest 
> on the /~stas/ url ... and decides it's broken [or inaccessable, or whatever] 
> and autoindex won't display it.  What's broken about not displaying things that
> the user cannot access?

I gave an example of a password protected sub-directory. You say that 
it's correct not to display it then? How do you know whether the user 
cannot access this directory? May be he does have the needed access 
credentials.

-- 


_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Re: Wondering what I'm missing...

2002-02-04 Thread William A. Rowe, Jr.

Recognize that rmm_malloc returns apr_rmm_off_t's into an apr_rmm_t...
you need to port all of the calls to deref through apr_rmm_baseaddr_get(),
but be careful, don't store dereferenced real addresses in the rmm itself!

- Original Message - 
From: "Aaron Bannert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 10:02 PM
Subject: Re: Wondering what I'm missing...


> On Mon, Feb 04, 2002 at 09:27:53PM -0500, Paul J. Reder wrote:
> > Perhaps I'm just really dense, but I don't see where (in the
> > mod_auth_digest.c code in httpd-2.0 HEAD) the following variable:
> ... 
> > What obvious point am I missing?
> 
> Unless we're both blind, it's missing a call to apr_rmm_init().
> 
> -aaron
> 




Re: Wondering what I'm missing...

2002-02-04 Thread Aaron Bannert

On Mon, Feb 04, 2002 at 09:27:53PM -0500, Paul J. Reder wrote:
> Perhaps I'm just really dense, but I don't see where (in the
> mod_auth_digest.c code in httpd-2.0 HEAD) the following variable:
... 
> What obvious point am I missing?

Unless we're both blind, it's missing a call to apr_rmm_init().

-aaron



Re: versioning process

2002-02-04 Thread Lars Eilebrecht

According to Roy T. Fielding:

> And, personally, I have always hated the stupid alpha/beta/GA distinction.
> Our release process became constipated on the day that was added.

I tend to agree.
And our users get (or area already) confused by this release process.
 
ciao...
-- 
Lars Eilebrecht- vuja de: The feeling that you've *never*,
[EMAIL PROTECTED]   - *ever* been in this situation before.




Re: Apache2 and php

2002-02-04 Thread David Ford

In further trial and error, even that is wrong. You must have both the 
AddType directive as well as the Filter section when trying to use php 
with Apache2.

Now that I have the php engine going, I need to find and fix a segfault. 
I installed phpSysInfo 1.9 in default state. Two things happen.

a) segfault when index.php is loaded and a new child is formed which 
then serves the page
b) if i try to change the template theme, httpd gobbles memory as fast 
as it can before the OOM killer slaps it sideways.

(gdb) bt
#0 0x080989a0 in ap_save_brigade (f=0x81cbd20, saveto=0x81c8304,
b=0xb364, p=0x81c79e0) at util_filter.c:473
#1 0x402785e0 in php_output_filter (f=0x81cbd20, bb=0x81cbe80)
at sapi_apache2.c:330
#2 0x0809891a in ap_pass_brigade (next=0x81cbd20, bb=0x81cbe80)
at util_filter.c:445
#3 0x0809eff6 in default_handler (r=0x81c7a18) at core.c:2992
#4 0x0808df56 in ap_run_handler (r=0x81c7a18) at config.c:185
#5 0x0808e3f1 in ap_invoke_handler (r=0x81c7a18) at config.c:359
#6 0x08075569 in ap_process_request (r=0x81c7a18) at http_request.c:290
#7 0x08071a49 in ap_process_http_connection (c=0x818df10) at http_core.c:287
---Type  to continue, or q  to quit---
#8 0x08096dd6 in ap_run_process_connection (c=0x818df10) at connection.c:86
#9 0x0808ca57 in child_main (child_num_arg=1) at prefork.c:717
#10 0x0808cc00 in make_child (s=0x818cce0, slot=1) at prefork.c:807
#11 0x0808cde5 in perform_idle_server_maintenance (p=0x81003b8)
at prefork.c:948
#12 0x0808d31f in ap_mpm_run (_pconf=0x81003b8, plog=0x8138498, s=0x818cce0)
at prefork.c:1105
#13 0x08091f19 in main (argc=1, argv=0xb6a4) at main.c:501

(gdb) p *e
$2 = {link = {next = 0x819de98, prev = 0x81f4248}, type = 0x814a5e8,
length = 136101408, start = 136101504, data = 0x80a9e00,
free = 0x80a9e00 }

(gdb) p rv
$3 = 1094927173
(gdb) p /x rv
$4 = 0x41434345

(gdb) p *f
$6 = {frec = 0x8186e08, ctx = 0x0, next = 0x81cbd58, r = 0x81c7a18,
c = 0x818df10}
(gdb) p *saveto
$8 = (apr_bucket_brigade *) 0x41434345
(gdb) p **b
$9 = {p = 0x81c79e0, list = {next = 0x819de98, prev = 0x81f4248}}
(gdb) p *p
$10 = {parent = 0x818de08, child = 0x0, sibling = 0x0, ref = 0x818de0c,
cleanups = 0x81cbe90, subprocesses = 0x0, abort_fn = 0, user_data = 0x0,
tag = 0x0, allocator = 0x8153108, active = 0x81cba70, self = 0x81c79d0,
self_first_avail = 0x81c7a18 "?y\034\b\020?\030\b??\030\b"}

Again, your indulgence in helping is appreciated. This is HEAD of httpd2 
and php 4.1.1. php42 HEAD simply does not work,

David


David Ford wrote:

> My apologies, I realized that after I sent it. Actually that is 
> incorrect. This seems to be a fairly unknown answer as nobody was able 
> to answer it for me in the past on either the php or apache groups.
>
> http://marc.theaimsgroup.com/?l=php-dev&m=101180222102820&w=2 
> 
>
>/you must replace :
>
>LoadModule php4_module modules/libphp4.so
>AddType application/x-httpd-php .php
>
>By
>
>LoadModule php4_module modules/libphp4.so
>
>SetOutputFilter PHP
>SetInputFilter PHP
>/
>
> Thank you,
> David 






Re: more minor 2.0.31 breakage

2002-02-04 Thread William A. Rowe, Jr.

From: "Stas Bekman" <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 8:39 PM


> Rodent of Unusual Size wrote:
> 
> > Greg Ames wrote:
> > 
> >>I just noticed that autoindex listings from apache.org no
> >>longer display the folder icon for directories.  You see
> >>a '?' icon instead.  The Rodent tells me there's some kind
> >>of magic type that mod_autoindex uses to figure this out.
> >>Not debugged yet.
> >>
> > 
> > As an unsubstantiated WAG, I would guess that the subrequest
> > that's sent off to determine the content-type is running
> > afoul of mod_dir somehow, and S_ISDIR isn't set correctly
> > when it comes back.
> 
> 
> BTW, since you are talkinga about mod_autoindex, I don't recall that it 
> was working this way before:
> 
> I've uploaded a dir with files to apache.org/~stas/. as of that moment 
> apache.org was running 2.0.28. I was trying to view apache.org/~stas/, 
> all the files/dirs showed up, but not this new sub-dir. When I've tried 
> to enter the new directory manually 
> http://apache.org/~stas/modperl-site/ I've got 500 error. Looking at 
> error_log revealed that I had a broken .htaccess in that directory. I 
> don't understand why mod_autoindex won't display the directory in the 
> index's listing.
> 
> I think it's a bug. The sub-directory can be password-protected. Does it 
> mean that mod_autoindex won't display it, since it'll fail to run the 
> sub-request?

By design, for better or worse [feel free to debate here.]

The new logic [perhaps 1.3 as well, you would have to look] does a subrequest 
on the /~stas/ url ... and decides it's broken [or inaccessable, or whatever] 
and autoindex won't display it.  What's broken about not displaying things that
the user cannot access?

Bill




Re: Wondering what I'm missing...

2002-02-04 Thread Rodent of Unusual Size

* On 2002-02-04 at 22:07,
  Paul J. Reder <[EMAIL PROTECTED]> excited the electrons to say:
> 
> Perhaps I'm just really dense, but I don't see where (in the
> mod_auth_digest.c code in httpd-2.0 HEAD) the following variable:
> 
>   static apr_rmm_t  *client_rmm = NULL;
> 
> ever gets initialized before it is used in the 5 calls to:

Uh, that declaration right there is initialising it to NULL..
-- 
#kenP-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist  http://Apache-Server.Com/

"Millennium hand and shrimp!"



Re: versioning process

2002-02-04 Thread Rodent of Unusual Size

* On 2002-02-04 at 22:07,
  Roy T. Fielding <[EMAIL PROTECTED]> excited the electrons to say:
> 
> After the group spends enough time pounding on a release to call it GA,
> there is no reason why we cannot take the code and reversion it a 2.1.0
> and start treating that as the stable branch.  It may be a little
> confusing to the Linux folks, but we can always skip to 2.2.0 if that
> makes people happier.  Personally, I tend to think that even-numbered
> releases are less reliable than odd ones, because that has been my
> experience with the quality of commercial releases.

Yar.  Lotsa people say, "I never install an x.0 release; I always
wait at least for x.1".  Some manufacturers would make .even
release 'feature' releases, and .odd ones 'fix' releases.

> Of course, the real problem is that httpd developers these days just have
> it too easy.  When I was an RM, we had to get up at 4am and walk through
> snow in our underwear

And it was uphill both ways. :-)
-- 
#kenP-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist  http://Apache-Server.Com/

"Millennium hand and shrimp!"



Re: [PATCH] mod_disk_cache.c mod_cache.c

2002-02-04 Thread Bill Stoddard

Committed. Thanks Joe.

Bill

>
> I made a mimimal set of changes to mod_disk_cache.c so that I could
> simply try out the current mod_disk_cache functionality. This patch
> fixes a few core dumps related to usage of the apr_pstrcat method and
> some minor compiler warnings.
>
>
> Index: modules/experimental/mod_cache.c
> ===
> RCS file: /home/cvspublic/httpd-2.0/modules/experimental/mod_cache.c,v
> retrieving revision 1.25
> diff -u -r1.25 mod_cache.c
> --- modules/experimental/mod_cache.c5 Feb 2002 00:15:42 -   1.25
> +++ modules/experimental/mod_cache.c5 Feb 2002 01:56:28 -
> @@ -931,8 +931,8 @@
>  conf->complete_set = 1;
>  return NULL;
>  }
> -static cache_post_config(apr_pool_t *p, apr_pool_t *plog,
> -apr_pool_t *ptemp, server_rec *s)
> +static int
> +cache_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
>  {
>   /* This is the means by which unusual (non-unix) os's may find alternate
>   * means to run a given command (e.g. shebang/registry parsing on Win32)
> Index: modules/experimental/mod_disk_cache.c
> ===
> RCS file: /home/cvspublic/httpd-2.0/modules/experimental/mod_disk_cache.c,v
> retrieving revision 1.17
> diff -u -r1.17 mod_disk_cache.c
> --- modules/experimental/mod_disk_cache.c   4 Feb 2002 14:43:11 -   1.17
> +++ modules/experimental/mod_disk_cache.c   5 Feb 2002 01:56:28 -
> @@ -59,11 +59,13 @@
>  #include "mod_cache.h"
>  #include "apr_file_io.h"
>  #include "apr_strings.h"
> -#include "http_config.h"
> -#include "http_log.h"
>  #include "util_filter.h"
>  #include "util_script.h"
>
> +#if APR_HAVE_UNISTD_H
> +#include  /* needed for unlink/link */
> +#endif
> +
>  /*
>   * disk_cache_object_t
>   * Pointed to by cache_object_t::vobj
> @@ -116,7 +118,7 @@
>  {
>  char *hashfile;
>  hashfile = generate_name(p, dirlevels, dirlength, name);
> -return apr_pstrcat(p, root, "/", hashfile, CACHE_HEADER_SUFFIX);
> +return apr_pstrcat(p, root, "/", hashfile, CACHE_HEADER_SUFFIX, NULL);
>  }
>
>  static char *data_file(apr_pool_t *p, int dirlevels, int dirlength,
> @@ -124,7 +126,7 @@
>  {
>  char *hashfile;
>  hashfile = generate_name(p, dirlevels, dirlength, name);
> -return apr_pstrcat(p, root, "/", hashfile, CACHE_DATA_SUFFIX);
> +return apr_pstrcat(p, root, "/", hashfile, CACHE_DATA_SUFFIX, NULL);
>  }
>
>  static int mkdir_structure(char *file, const char *root)
> @@ -304,7 +306,7 @@
>  obj->complete = 0;   /* Cache object is not complete */
>
>  info = apr_pcalloc(r->pool, sizeof(cache_info));
> -info->name = key;
> +info->name = (char *) key;
>  obj->info = *(info);
>
>  #ifdef AS400
> @@ -351,7 +353,6 @@
>  {
>  disk_cache_conf *conf = ap_get_module_config(r->server->module_config,
>   &disk_cache_module);
> -apr_status_t ret = DECLINED;
>  apr_status_t rc;
>  char *data = data_file(r->pool, conf->dirlevels, conf->dirlength,
> conf->cache_root, key);
> @@ -366,12 +367,12 @@
>  }
>
>  obj = apr_pcalloc(r->pool, sizeof(cache_object_t));
> -obj->key = key;
> +obj->key = (char *) key;
>
>  rc = apr_file_open(&fd, data, APR_WRITE | APR_READ | APR_BINARY, 0, r->pool);
>  if (rc == APR_SUCCESS) {
>  info = apr_pcalloc(r->pool, sizeof(cache_info));
> -info->name = key;
> +info->name = (char *) key;
>  /* XXX log message */
> info->fd = fd;
> info->datafile = data;
> @@ -403,6 +404,7 @@
>
>  static int remove_url(const char *type, char *key)
>  {
> +  return OK;
>  }
>
>  static int remove_entity(cache_handle_t *h)
> @@ -458,7 +460,7 @@
>  }
>
>  /* XXX log */
> -if(rv = file_cache_read_mydata(fd, info, r) != APR_SUCCESS) {
> +if((rv = file_cache_read_mydata(fd, info, r)) != APR_SUCCESS) {
>  /* XXX log message */
>  apr_file_close(fd);
>  return rv;
> @@ -530,9 +532,9 @@
>  else {
>  /* XXX log message */
>  }
> -if(rc = apr_file_open(&hfd, info->hdrsfile,
> +if((rc = apr_file_open(&hfd, info->hdrsfile,
>APR_WRITE | APR_CREATE | APR_BINARY | APR_EXCL, /* 
>XXX:?
| APR_INHERIT | APR_NONQSYS, */
> -  0, r->pool) != APR_SUCCESS)   {
> +  0, r->pool)) != APR_SUCCESS)   {
>  /* XXX log message */
>  return rc;
>  }
> @@ -555,7 +557,7 @@
>  buf = apr_pstrcat(r->pool, statusbuf, CRLF, NULL);
>  amt = strlen(buf);
>  apr_file_write(hfd, buf, &amt);
> -buf = apr_pstrcat(r->pool, r->status_line, '\n', NULL);
> +buf = apr_pstrcat(r->pool, r->status_line, "\n", NULL);
>  amt = strlen(buf);
>  a

Re: more minor 2.0.31 breakage

2002-02-04 Thread Stas Bekman

Rodent of Unusual Size wrote:

> Greg Ames wrote:
> 
>>I just noticed that autoindex listings from apache.org no
>>longer display the folder icon for directories.  You see
>>a '?' icon instead.  The Rodent tells me there's some kind
>>of magic type that mod_autoindex uses to figure this out.
>>Not debugged yet.
>>
> 
> As an unsubstantiated WAG, I would guess that the subrequest
> that's sent off to determine the content-type is running
> afoul of mod_dir somehow, and S_ISDIR isn't set correctly
> when it comes back.


BTW, since you are talkinga about mod_autoindex, I don't recall that it 
was working this way before:

I've uploaded a dir with files to apache.org/~stas/. as of that moment 
apache.org was running 2.0.28. I was trying to view apache.org/~stas/, 
all the files/dirs showed up, but not this new sub-dir. When I've tried 
to enter the new directory manually 
http://apache.org/~stas/modperl-site/ I've got 500 error. Looking at 
error_log revealed that I had a broken .htaccess in that directory. I 
don't understand why mod_autoindex won't display the directory in the 
index's listing.

I think it's a bug. The sub-directory can be password-protected. Does it 
mean that mod_autoindex won't display it, since it'll fail to run the 
sub-request?





_
Stas Bekman JAm_pH  --   Just Another mod_perl Hacker
http://stason.org/  mod_perl Guide   http://perl.apache.org/guide
mailto:[EMAIL PROTECTED]  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/




Wondering what I'm missing...

2002-02-04 Thread Paul J. Reder

Perhaps I'm just really dense, but I don't see where (in the
mod_auth_digest.c code in httpd-2.0 HEAD) the following variable:

  static apr_rmm_t  *client_rmm = NULL;

ever gets initialized before it is used in the 5 calls to:

  apr_rmm_malloc(client_rmm, ...);

and the single call to:

  apr_rmm_free(client_rmm, (apr_rmm_off_t)entry); call).

Neither of these calls initialize it. It is not referenced anywhere else.
It is static. The functions (apr_rmm_malloc/free) assume that
client_rmm points to a vald struct and they dereference into it.

Some of the calls to malloc are within an #if APR_HAS_SHARED_MEMORY
block, but most of the calls are not.

What obvious point am I missing?

Thanks,

-- 
Paul J. Reder
---
"The strength of the Constitution lies entirely in the determination of each
citizen to defend it.  Only if every single citizen feels duty bound to do
his share in this defense are the constitutional rights secure."
-- Albert Einstein





Insecure installations of cgi wrappers (RTFM people!)

2002-02-04 Thread Nathan Neulinger

This isn't really a reporting of a vulnerability, it's more a reporting
of mind-bogglingly foolish administrators that refuse to follow
installation instructions and read the documentation.

(I've cc'd this to both the cgiwrap and apache development mailing
lists, but I'm sure certain it's not news to readers of either.)

Note the following from cgiwrap documentation:

---
   *VERY IMPORTANT* - Do NOT allow any non-trusted user to run scripts
  directly out of the main cgi-bin directory, as this will allow
  them to use cgiwrap to run any of the other users scripts. The
  reason for this is that if they can run scripts as the same
  userid as the web server, they can subvert some of cgiwrap's
  security checks to allow them to run other users scripts. I
  recommend not running ANY scripts on the web server directly,
  once you have cgiwrap installed.
---

I FREQUENTLY receive messages like this:

---
Hi :

My web host provides us with CgiWrap access.

However they only treat scripts installed inside cgi-bin to run as user
me and not nobody.

I wanted to know if there is a way to get CgiWrap to get
scripts installed outside cgi-bin to run as user me, and not
nobody ?
---

What that tell's me is that web host is a security disaster waiting to
happen because they are allowing both cgiwrap and scripts run directly
from cgi-bin. It won't necessarily give root or anything like that, but
it allows cgi scripts to have their environment COMPLETELY subverted. If
there are any scripts that rely upon the authentication or access
control provided by the web server (such as scripts to administer the
contents of databases), they can be subverted simply because all of that
information is passed via environment variables.

I hate to see cgiwrap or apache/suexec or any of the other wrappers get
the blame for administrators not reading the documentation.

About the only way I can think of getting around this problem would be
to have some sort of web-server -> cgi-wrapper token passing taking
place with a shared secret compiled into the wrapper executable,
combined with non-readable wrapper executables and web server config.
(And I haven't thought about it enough to be sure that wouldn't be
exploitable. With some of the ptrace stuff, I'd bet it probably could be
exploited pretty quick.) To my knowledge, none of the wrappers are
currently doing anything like this. CGIwrap most certainly isn't. 

-- Nathan
(Author of CGIwrap)


Nathan Neulinger   EMail:  [EMAIL PROTECTED]
University of Missouri - Rolla Phone: (573) 341-4841
Computing Services   Fax: (573) 341-4216



versioning process

2002-02-04 Thread Roy T. Fielding

> I know that there have been lots of changes in .32-dev since .31 was
> tagged that have challenged the stability of the current tree.  If
> we took .32 and made it as close to .31 as we could but with the
> *minimum* required changes to make .32, we could be close to a real
> beta.  (This seems to mimic the APACHE_BEST tag I think was proposed
> before my time.)

Actually, that one was during your time.

The fact of the matter is that the RM doesn't even need to tag the tree.
If they *really* want to test a configuration (set of revisions) on all
platforms, then simply checkout HEAD (or whatever) and work within the
checked-out tree, avoiding the use of cvs update except for specific file
changes.  A -dev tarball can be created (with whatever non-version name
you want to give it) from the checked-out tree, which can then be tested
by people with access to the other platforms.  Only after they come back
with a +1 is the checked-out tree tagged with the next version number,
which impacts only those revisions in that tree and not whatever has
happened to HEAD.

I mention this every time the release process is argued:
it is the responsiblility of the RM to tag a version of the tree that
they *think* is stable.  How they come to think that will entirely
depend on how much time, energy, and resources they can throw at the
code *before* it is tagged with a version number.  They can do that
by managing a checked-out tree or by using a temporary non-version tag
to manage a branch of the real tree -- either one is better than tagging
the tree with a public version number and them moving that tag around to
suit the testers.  Once it is tagged with a version number, we need to
simply live with the fact that the version number is HISTORY and stop
arguing about whether one change or another should be included.

BTW, the version number means

   major.minor.patchlevel

After the group spends enough time pounding on a release to call it GA,
there is no reason why we cannot take the code and reversion it a 2.1.0
and start treating that as the stable branch.  It may be a little
confusing to the Linux folks, but we can always skip to 2.2.0 if that
makes people happier.  Personally, I tend to think that even-numbered
releases are less reliable than odd ones, because that has been my
experience with the quality of commercial releases.

And, personally, I have always hated the stupid alpha/beta/GA distinction.
Our release process became constipated on the day that was added.

I guess the point is that we shouldn't let the process of tagging the
tree interfere with getting a complete-revision-set of the server that
is stable enough for a release.  There is really no reason (aside from
a desire to get three +1 votes) for the RM to need to coordinate with
everyone else in the group when a release is ready to be tarballed, nor is
there any reason (aside from the release votes) for the RM to include
everything on HEAD when they do tag a release version.  The only thing
that is really necessary is that the final tarball has at least three +1 
(and a majority positive) before it is placed in www.apache.org/dist/httpd/.

If I were the RM, I'd just work in a tree of relatively stable code and
tag the version when I bloody well felt like it was good enough to stake
my reputation on as being better than the last version released.  No, I don't
have time to be an RM right now.  OTOH, there is also very little reason
why we can't have multiple RMs working in parallel, provided they work
with private tag names and let the group decide which tags to promote to
an official version.

Of course, the real problem is that httpd developers these days just have
it too easy.  When I was an RM, we had to get up at 4am and walk through
snow in our underwear in order get enough carrier pigeons together to
distribute a tarball, and then wait a week for enough pigeons to
come back alive to count it a release.  When it's that hard to do a release,
the RM spends a lot more of their own time proofing a tarball before it
gets out, and makes a habit of doing a release before there are more than
30 or so changes since the last one, because the probability of that
many changes being error-free is approaching zero.

I think people just respect the process too much.  We are here to maintain
and release code -- the process only exists to allow us to get there without
killing each other.  If it isn't working, determine the part that doesn't
work and replace it with something new.  The only things that you cannot
replace are that code must be committed before it is released and the
tarball must be voted on before it is released to the public.

Roy




Re: cvs commit: httpd-2.0 STATUS

2002-02-04 Thread William A. Rowe, Jr.

From: <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 7:01 PM


>   +
>   +* Win32 allows multiple processes to attach to the same port.  This
>   +  means that I can open three DOS prompts, and run the same Apache
>   +  binary with the same config file three different times, and the
>   +  server won't complain.

This becomes more serious ... My XP Home bundled with this new PC seems to
have installed a port 8080 - our 'default' in development.

Definately can't continue this behavior - it goes back to 1.3.x and should
be fixed on both platforms.




[PATCH] mod_disk_cache.c mod_cache.c

2002-02-04 Thread Joseph Wayne Norton


I made a mimimal set of changes to mod_disk_cache.c so that I could
simply try out the current mod_disk_cache functionality. This patch
fixes a few core dumps related to usage of the apr_pstrcat method and
some minor compiler warnings.


Index: modules/experimental/mod_cache.c
===
RCS file: /home/cvspublic/httpd-2.0/modules/experimental/mod_cache.c,v
retrieving revision 1.25
diff -u -r1.25 mod_cache.c
--- modules/experimental/mod_cache.c5 Feb 2002 00:15:42 -   1.25
+++ modules/experimental/mod_cache.c5 Feb 2002 01:56:28 -
@@ -931,8 +931,8 @@
 conf->complete_set = 1;
 return NULL;
 }
-static cache_post_config(apr_pool_t *p, apr_pool_t *plog,
-apr_pool_t *ptemp, server_rec *s)
+static int 
+cache_post_config(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
 {
  /* This is the means by which unusual (non-unix) os's may find alternate
  * means to run a given command (e.g. shebang/registry parsing on Win32)
Index: modules/experimental/mod_disk_cache.c
===
RCS file: /home/cvspublic/httpd-2.0/modules/experimental/mod_disk_cache.c,v
retrieving revision 1.17
diff -u -r1.17 mod_disk_cache.c
--- modules/experimental/mod_disk_cache.c   4 Feb 2002 14:43:11 -   1.17
+++ modules/experimental/mod_disk_cache.c   5 Feb 2002 01:56:28 -
@@ -59,11 +59,13 @@
 #include "mod_cache.h"
 #include "apr_file_io.h"
 #include "apr_strings.h"
-#include "http_config.h"
-#include "http_log.h"
 #include "util_filter.h"
 #include "util_script.h"
 
+#if APR_HAVE_UNISTD_H
+#include  /* needed for unlink/link */
+#endif
+
 /*
  * disk_cache_object_t
  * Pointed to by cache_object_t::vobj
@@ -116,7 +118,7 @@
 {
 char *hashfile;
 hashfile = generate_name(p, dirlevels, dirlength, name);
-return apr_pstrcat(p, root, "/", hashfile, CACHE_HEADER_SUFFIX);
+return apr_pstrcat(p, root, "/", hashfile, CACHE_HEADER_SUFFIX, NULL);
 }
 
 static char *data_file(apr_pool_t *p, int dirlevels, int dirlength, 
@@ -124,7 +126,7 @@
 {
 char *hashfile;
 hashfile = generate_name(p, dirlevels, dirlength, name);
-return apr_pstrcat(p, root, "/", hashfile, CACHE_DATA_SUFFIX);
+return apr_pstrcat(p, root, "/", hashfile, CACHE_DATA_SUFFIX, NULL);
 }
 
 static int mkdir_structure(char *file, const char *root)
@@ -304,7 +306,7 @@
 obj->complete = 0;   /* Cache object is not complete */
 
 info = apr_pcalloc(r->pool, sizeof(cache_info));
-info->name = key;
+info->name = (char *) key;
 obj->info = *(info);
 
 #ifdef AS400
@@ -351,7 +353,6 @@
 {
 disk_cache_conf *conf = ap_get_module_config(r->server->module_config, 
  &disk_cache_module);
-apr_status_t ret = DECLINED;
 apr_status_t rc;
 char *data = data_file(r->pool, conf->dirlevels, conf->dirlength, 
conf->cache_root, key);
@@ -366,12 +367,12 @@
 }
 
 obj = apr_pcalloc(r->pool, sizeof(cache_object_t));
-obj->key = key;
+obj->key = (char *) key;
 
 rc = apr_file_open(&fd, data, APR_WRITE | APR_READ | APR_BINARY, 0, r->pool);
 if (rc == APR_SUCCESS) {
 info = apr_pcalloc(r->pool, sizeof(cache_info));
-info->name = key;
+info->name = (char *) key;
 /* XXX log message */
info->fd = fd;
info->datafile = data;
@@ -403,6 +404,7 @@
 
 static int remove_url(const char *type, char *key) 
 {
+  return OK;
 }
 
 static int remove_entity(cache_handle_t *h) 
@@ -458,7 +460,7 @@
 }
 
 /* XXX log */
-if(rv = file_cache_read_mydata(fd, info, r) != APR_SUCCESS) {
+if((rv = file_cache_read_mydata(fd, info, r)) != APR_SUCCESS) {
 /* XXX log message */
 apr_file_close(fd);
 return rv;
@@ -530,9 +532,9 @@
 else {
 /* XXX log message */
 }
-if(rc = apr_file_open(&hfd, info->hdrsfile,
+if((rc = apr_file_open(&hfd, info->hdrsfile,
   APR_WRITE | APR_CREATE | APR_BINARY | APR_EXCL, /* 
XXX:? | APR_INHERIT | APR_NONQSYS, */
-  0, r->pool) != APR_SUCCESS)   {
+  0, r->pool)) != APR_SUCCESS)   {
 /* XXX log message */
 return rc;
 }
@@ -555,7 +557,7 @@
 buf = apr_pstrcat(r->pool, statusbuf, CRLF, NULL);
 amt = strlen(buf);
 apr_file_write(hfd, buf, &amt);
-buf = apr_pstrcat(r->pool, r->status_line, '\n', NULL);
+buf = apr_pstrcat(r->pool, r->status_line, "\n", NULL);
 amt = strlen(buf);
 apr_file_write(hfd, buf, &amt);
 buf = apr_pstrcat(r->pool, CRLF, NULL);
@@ -608,7 +610,7 @@
  * mod_disk_cache configuration directives handlers.
  */
 static const char
-*set_cache_root(cmd_parms *parms, void *struct_ptr, char *arg)
+*set_cache_root(cmd_parms *pa

Re: 2.0.31 on Windows

2002-02-04 Thread Dwayne Miller

I guess I'm alittle confused... I don't see any errors related to NULL 
file handles.  And the thing about the ServerRoot starting with a /, it 
seems that the process found the config file okay, so wouldn't it also 
know what the ServerRoot should be?

And why doesn't Apache complain about the invalid ServerRoot variable 
when started from the command line?  Even with the -t option, the error 
is unrecognized.

I tried adding the -d option through the Service Manager to use when 
starting the service manually, with no change in behavior.

I'll keep looking...

Tks,
Dwayne

William A. Rowe, Jr. wrote:

>From: "Dwayne Miller" <[EMAIL PROTECTED]>
>Sent: Monday, February 04, 2002 5:13 PM
>
>
>>>Which Win32 OS are you using, exactly?
>>>
>>I'm on Windows 2000, build 2195, SP2
>>
>
>Win2000/XP have NULL stdin/stdout/stderr handles...
>
>the create_process() invokes ap_open_stderr_log() which in turn invokes 
>apr_file_open_stderr() attempting to open a NULL STDERR handle.
>
>The patch I just committed reinvokes ap_open_stderr_log() after we jump into
>the service control manager track with a stderr pipe that we capture to the
>application event log.  
>
>The right solution is to finish the move of the service manager code in the
>apr_app_initialize code (apr_initialize + apr_app_main) which I hadn't finished
>yet, and didn't plan to for a week, maybe two =-/
>
>>I was looking at mpm_winnt.c, where the apr_filepath_merge() call is 
>>made.  It looks like it is trying to build the -d argument to use when 
>>starting the service, but it's obviously not having the desired effect.
>>
>
>That's where things are still goofy... I'm still debugging.
>
>More updates as they become available.
>
>Bill
>





Re: --with-module annoyingness

2002-02-04 Thread Sander van Zoest

On Mon, 4 Feb 2002, Ryan Bloom wrote:

> Would anybody mind if --with-module created a symbolic link in the
> modules/foo/ directory to the specified module?  Right now, we copy the
> module to that directory, which means that if you edit the .c file, it
> gets out of sync with the version in the original directory.  If you
> have the .c file under revision control, that gets annoying quickly.

I would keep in mind that the module could reside on a read-only
file system and make sure it plays well with --srcdir/--shadow.

Cheers,

--
Sander van Zoest  [EMAIL PROTECTED]
San Diego, CA, US http://Sander.vanZoest.com/




Re: 2.0.31 on Windows

2002-02-04 Thread William A. Rowe, Jr.

From: "Dwayne Miller" <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 5:13 PM


> >Which Win32 OS are you using, exactly?
> >
> I'm on Windows 2000, build 2195, SP2

Win2000/XP have NULL stdin/stdout/stderr handles...

the create_process() invokes ap_open_stderr_log() which in turn invokes 
apr_file_open_stderr() attempting to open a NULL STDERR handle.

The patch I just committed reinvokes ap_open_stderr_log() after we jump into
the service control manager track with a stderr pipe that we capture to the
application event log.  

The right solution is to finish the move of the service manager code in the
apr_app_initialize code (apr_initialize + apr_app_main) which I hadn't finished
yet, and didn't plan to for a week, maybe two =-/

> I was looking at mpm_winnt.c, where the apr_filepath_merge() call is 
> made.  It looks like it is trying to build the -d argument to use when 
> starting the service, but it's obviously not having the desired effect.

That's where things are still goofy... I'm still debugging.

More updates as they become available.

Bill




Re: Thoughts on 2.0.32

2002-02-04 Thread William A. Rowe, Jr.

From: "Ryan Bloom" <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 5:52 PM


> > Since it sounds like Win32 is busted (I'd say it'd be fine to
> > say that .31 is beta but doesn't work on Win32, but wrowe doesn't
> > like that),
> 
> IMNSHO, .31 should be released as a beta, with the understanding that it
> doesn't work on Win32.  That is a PITA, but it wouldn't be the first
> time that a release of Apache didn't work the same on all platforms.

.31 is an alpha already.  What is the point of releasing something with such
issues?  I would consider a similar bug exclusively on Linux or Solaris also
a showstopper.


> > how about just taking the .31 tree, tagging *that* as
> > .32, and carefully bumping files that resolve issues into .32 and
> > the RM can carefully decide which other recent commits/changes are
> > worthy of inclusion in .32?
> 
> I strongly disagree with doing this.  Watching each commit to determine
> if it belongs in .32 is completely against our release model.  Either
> the code keeps moving forward or it doesn't, let's not bastardize the
> release model.

Ok, so we shouldn't work through our yet-unproven release model?

If we can't get the release model right in early development, we will end
up on the same treadmill as 1.3.x.  When I joined the list, there hadn't
been a release for a few months.  There wasn't a new release for almost a
year after I started hacking on the server.

The first bug of Win32 is fixed (error logging to the event viewer), the
second is not a showstopper (path names cannot start with /) although I need
to finish testing to assure that this bug isn't harming other aspects of 
the server, and the third I will wrap up in a few hours (bad arguments created
by apache -k install).  

There is little reason not to wait for these two/three patches - checkout
31, cvs up -A server/mpm/winnt, and then release that code.  This cannot
harm Unix (reasonably well tested for a first pass) and the code can be
tested by everyone.

Is anyone besides Ryan concerned about releasing a .32 with alpha-bugs 
only fixed, and then .33 with all the new bells and whistles (or destablizing
code, depending on how you look at it :) ... then .34 with its fixes?
Or are we all happy with the release model as it stands?


Bill




RE: cvs commit: httpd-2.0/server/mpm/worker worker.c

2002-02-04 Thread Ryan Bloom


I finally had time to review this patch, and I have some comments.

>   Log:
>   This patch restores most of Ryan's patch (11/12/2001) to remove the
>   client_socket from the conn_rec.  Diffs from Ryan's patch include:
> 
>   - rename the create_connection hook to install_transport_filters
>   - move the point of invocation of the hook till after the call to
> after ap_update_vhost_given_ip to enable the hook to use vhost
> config info in its decision making.
> 


 
>   -AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c)
>   +AP_CORE_DECLARE(void) ap_process_connection(conn_rec *c,
apr_socket_t *csd)

I was very careful to keep the csd a void * instead of an apr_socket_t
*, because you have no way of knowing that the module that did the
accept will be giving us a socket, or at least not an apr_socket_t.
Right now, Aaron and I are hacking Apache to allow it to accept
connections over a Unix Domain Socket.  This patch will break that
abstraction completely.

>{
>ap_update_vhost_given_ip(c);
> 
>   +ap_run_install_transport_filters(c, csd);
>   +
>ap_run_pre_connection(c);

Why did we create a new hook to put here?  This is the last place a new
hook is needed, in five lines of code in this function, we call three
hooks.  Why not just add an argument to the pre_connection hook that
gives people access to the socket?

Unless there are any complaints, I'll be making both of those changes
today or tomorrow.

Ryan
 




RE: Thoughts on 2.0.32

2002-02-04 Thread Ryan Bloom

> Since it sounds like Win32 is busted (I'd say it'd be fine to
> say that .31 is beta but doesn't work on Win32, but wrowe doesn't
> like that),

IMNSHO, .31 should be released as a beta, with the understanding that it
doesn't work on Win32.  That is a PITA, but it wouldn't be the first
time that a release of Apache didn't work the same on all platforms.

> how about just taking the .31 tree, tagging *that* as
> .32, and carefully bumping files that resolve issues into .32 and
> the RM can carefully decide which other recent commits/changes are
> worthy of inclusion in .32?

I strongly disagree with doing this.  Watching each commit to determine
if it belongs in .32 is completely against our release model.  Either
the code keeps moving forward or it doesn't, let's not bastardize the
release model.


Ryan




Thoughts on 2.0.32

2002-02-04 Thread Justin Erenkrantz

Since it sounds like Win32 is busted (I'd say it'd be fine to
say that .31 is beta but doesn't work on Win32, but wrowe doesn't
like that), how about just taking the .31 tree, tagging *that* as
.32, and carefully bumping files that resolve issues into .32 and
the RM can carefully decide which other recent commits/changes are
worthy of inclusion in .32?

I know that there have been lots of changes in .32-dev since .31 was
tagged that have challenged the stability of the current tree.  If
we took .32 and made it as close to .31 as we could but with the
*minimum* required changes to make .32, we could be close to a real
beta.  (This seems to mimic the APACHE_BEST tag I think was proposed
before my time.)

And, if the only substantive changes in .32 are related to Win32,
we don't lose the testing that has already occurred on Unix
platforms.

Food for thought.  

FWIW, I'd volunteer to be RM, but I won't have the time until
Wednesday at the earliest.  -- justin




Re: 2.0.31 on Windows

2002-02-04 Thread Dwayne Miller



William A. Rowe, Jr. wrote:

>From: "Dwayne Miller" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Monday, February 04, 2002 3:57 PM
>Subject: Re: 2.0.31 on Windows
>
>
>>I tracked down my problem with not being able to run Apache as a 
>>service.  The ServerRoot param was not set correctly.  It was /Apache2 
>>instead of D:/Apache2.  
>>This configuration file error was never logged anywhere.  Not only that, 
>>even with this setting, Apache would run fine from the command line.
>>
>
>The 'service' mode has all sorts of peculiar behaviors.  You've identified
>exactly what I'm seeing today.
>
>Which Win32 OS are you using, exactly?
>
I'm on Windows 2000, build 2195, SP2

>
>>But trying to start as a server, the ap_walk_config() routine, called in 
>>server/config.c returned the error  and called exit(1).
>>
>>Somewhere, this error should be presented to the user.  I'm just not 
>>sure where, or how to do it.
>>
>
>Definately the biggest 'bug' of the hour is the service logging.  It looks
>like some changes a little ways back in main.c borked us.
>
>And the second bug is the lack of -d -f args in the service's Parameters
>registry key ... ConfigArgs is coming up empty.
>
I was looking at mpm_winnt.c, where the apr_filepath_merge() call is 
made.  It looks like it is trying to build the -d argument to use when 
starting the service, but it's obviously not having the desired effect.

>
>The final bug is the simple one.  Why paths can't merge right in the service.
>I suspect that's the whole LocalService/non-Network situation going on... 
>but it's worthless to debug without resolving the bigger error logging fish :)
>
>The only real answer is moving the service code into apr, pre-main() or in
>tandem with apr_initialize() [starting with apr_app_main and getting the
>service stuff tied in.]  But I wanted to wait for .33 on those changes.
>
>Bill
>





Re: Apache2 and php

2002-02-04 Thread David Ford




My apologies, I realized that after I sent it.  Actually that is incorrect.
 This seems to be a fairly unknown answer as nobody was able to answer it
for me in the past on either the php or apache groups.

http://marc.theaimsgroup.com/?l=php-dev&m=101180222102820&w=2

you must replace :LoadModule php4_module modules/libphp4.soAddType application/x-httpd-php .phpByLoadModule php4_module modules/libphp4.soSetOutputFilter PHPSetInputFilter PHP
Thank you,
David

Daniel Lopez wrote:
[EMAIL PROTECTED]">
  This question should be directed to the [EMAIL PROTECTED] listYou need to add the following:AddType application/x-httpd-php .phpDanielOn Mon, Feb 04, 2002 at 05:20:25PM -0500, David Ford wrote:
  
What does apache2 need in httpd.conf to properly shunt php files through the php engine before serving them?Apparently it needs more than just Load libphp4.soNote, I'm using php 4.1.1 with httpd_2_0 HEAD.Thank you,David







Re: cvs commit: httpd-2.0/modules/proxy proxy_ftp.c

2002-02-04 Thread Justin Erenkrantz

On Sun, Feb 03, 2002 at 04:11:38PM -0800, Greg Stein wrote:
> On Sun, Feb 03, 2002 at 05:18:19PM -, [EMAIL PROTECTED] wrote:
> > jerenkrantz02/02/03 09:18:19
> > 
> >   Modified:modules/proxy proxy_ftp.c
> >   Log:
> >   Make sure we include time.h if it is there.  (Other mojo may be needed for
> >   other platforms.)
> 
> Should that code even be using time.h? If it isn't there, then what happens?
> Isn't that what APR is for?

I wish, but Martin added a bunch of code that calls the non-portable
time code directly.  I don't have the time to figure out what he was
trying to do and I just wanted a buildable tree.  -- justin




--with-module annoyingness

2002-02-04 Thread Ryan Bloom

Would anybody mind if --with-module created a symbolic link in the
modules/foo/ directory to the specified module?  Right now, we copy the
module to that directory, which means that if you edit the .c file, it
gets out of sync with the version in the original directory.  If you
have the .c file under revision control, that gets annoying quickly.

If people would rather I didn't create a symlink, I could also just edit
the Makefile to refer to the .c file in the other directory directly.
Either approach is fine with me, but the copy is bothering me to no end.

Ryan

--
Ryan Bloom  [EMAIL PROTECTED]
645 Howard St.  [EMAIL PROTECTED]
San Francisco, CA 





Re: Apache2 and php

2002-02-04 Thread Daniel Lopez


This question should be directed to the [EMAIL PROTECTED] list

You need to add the following:
AddType application/x-httpd-php .php

Daniel

On Mon, Feb 04, 2002 at 05:20:25PM -0500, David Ford wrote:
> What does apache2 need in httpd.conf to properly shunt php files through 
> the php engine before serving them?
> 
> Apparently it needs more than just Load libphp4.so
> 
> Note, I'm using php 4.1.1 with httpd_2_0 HEAD.
> 
> Thank you,
> David
> 
> 



Re: 2.0.31 on Windows

2002-02-04 Thread William A. Rowe, Jr.

From: "Dwayne Miller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 3:57 PM
Subject: Re: 2.0.31 on Windows


> I tracked down my problem with not being able to run Apache as a 
> service.  The ServerRoot param was not set correctly.  It was /Apache2 
> instead of D:/Apache2.  
> This configuration file error was never logged anywhere.  Not only that, 
> even with this setting, Apache would run fine from the command line.

The 'service' mode has all sorts of peculiar behaviors.  You've identified
exactly what I'm seeing today.

Which Win32 OS are you using, exactly?

> But trying to start as a server, the ap_walk_config() routine, called in 
> server/config.c returned the error  and called exit(1).
> 
> Somewhere, this error should be presented to the user.  I'm just not 
> sure where, or how to do it.

Definately the biggest 'bug' of the hour is the service logging.  It looks
like some changes a little ways back in main.c borked us.

And the second bug is the lack of -d -f args in the service's Parameters
registry key ... ConfigArgs is coming up empty.

The final bug is the simple one.  Why paths can't merge right in the service.
I suspect that's the whole LocalService/non-Network situation going on... 
but it's worthless to debug without resolving the bigger error logging fish :)

The only real answer is moving the service code into apr, pre-main() or in
tandem with apr_initialize() [starting with apr_app_main and getting the
service stuff tied in.]  But I wanted to wait for .33 on those changes.

Bill




Apache2 and php

2002-02-04 Thread David Ford

What does apache2 need in httpd.conf to properly shunt php files through 
the php engine before serving them?

Apparently it needs more than just Load libphp4.so

Note, I'm using php 4.1.1 with httpd_2_0 HEAD.

Thank you,
David





Re: 2.0.31 on Windows

2002-02-04 Thread Dwayne Miller

I tracked down my problem with not being able to run Apache as a 
service.  The ServerRoot param was not set correctly.  It was /Apache2 
instead of D:/Apache2.  
This configuration file error was never logged anywhere.  Not only that, 
even with this setting, Apache would run fine from the command line.

But trying to start as a server, the ap_walk_config() routine, called in 
server/config.c returned the error  and called exit(1).

Somewhere, this error should be presented to the user.  I'm just not 
sure where, or how to do it.

Dwayne Miller wrote:

> I'm not familiar with the -n apache2 option, but I was just trying to 
> figure out why I can't get apache to run as a service.  I'm using the 
> -k start option, a message that it's starting the service appears, but 
> nothing happens.  In the service.c file, I added a line to print the 
> 'Failed to start the service' message as I was not seeing this message 
> in any of my log files.  It in fact fails to start the service.
>
> Bill Stoddard wrote:
>
>> Couple of problems noticed in a few minutes of testing
>>
>> 1. apache -k restart -n apache2 is broken. hangs forever and a new 
>> child process is never
>> started.
>>
>> 2. If I kill off the child process (by attaching and detaching a 
>> debugger for instance),
>> the parent should detect the child process exit and start a new child 
>> process. Instead,
>> the parent goes belly up.
>>
>> Beta killers (for Windows at least).
>>
>> Bill
>>
>
>





Re: more minor 2.0.31 breakage

2002-02-04 Thread Greg Ames

Rodent of Unusual Size wrote:
> 
> Greg Ames wrote:
> >
> > I just noticed that autoindex listings from apache.org no
> > longer display the folder icon for directories.  You see
> > a '?' icon instead.  The Rodent tells me there's some kind
> > of magic type that mod_autoindex uses to figure this out.
> > Not debugged yet.
> 
> As an unsubstantiated WAG, I would guess that the subrequest
> that's sent off to determine the content-type is running
> afoul of mod_dir somehow, 

mod_dir is innocent this time.

> and S_ISDIR isn't set correctly when it comes back.

close...dirent->filetype isn't set on Unix when you do a plain ol'
apr_dir_read.  I believe you can ask for it to be set, but that causes extra
stat()s.

veto'ed and backed out the patch which broke this.

Greg



Re: Apache 2_0_31 is now rolled (take 2)

2002-02-04 Thread Jim Jagielski

Victor J. Orlikowski wrote:
> 
> Ugh. Behind on mail.
> 
> My fault; needed it for cadaver for testing... ;)
> 

Why do I feel like I just entered an episode of 6 Feet Under? :)

-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  "A society that will trade a little liberty for a little order
 will lose both and deserve neither" - T.Jefferson



Re: cvs commit: httpd-2.0 STATUS

2002-02-04 Thread William A. Rowe, Jr.

From: "Aaron Bannert" <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 12:59 PM


> > wrowe   02/02/04 10:51:59
> > 
> >   Modified:.STATUS
> >   Log:
> > Brrr... it's frigid in Chicago today!  Hope FirstBill doesn't mind if
> > I speak for us both here.
> >   
> >   Revision  ChangesPath
> >   1.453 +7 -5  httpd-2.0/STATUS
> >   
> >   +
> >   +* FirstBill reports problem [re]starting as-a-service, shared
> >   +  score is suspect.  OtherBill is investigating, definately
> >   +  a showstopper for a .31/.32 beta.  Progress report later today.
> 
> This is a BETA, it is not perfect. The biggest benefit we get from
> releasing a beta is _Beta Testers_. It seems to me that we are *very*
> close to GA, but I will not be in support of a gold release without
> significantly more beta visibility and testing than we've had.

Aaron, it doesn't even friggin work [for the usual Win32 application] :)

> This particular problem aparently has a workaround: Don't run it as a
> service on win32.

That's not an acceptable workaround - we need the BETA to test the robustness
of the service.

> Although it looks like we have a comfortable majority in favor of
> releasing this as a beta, I'd feel better if there were no -1 votes. Can
> I pursuade you to change your mind for the above reasons?

Ahmmm... no, and your vote is invalid at the moment; I'm certain if you give
folks 8 hours to comment; some will agree this is a showstopper.

However, I expect to have this fixed and tested tonight - we should be able
to move on from here fairly quickly.  Critical faults include;

  1. failure to log to the WinNT system event log.

  2. failure to recognize the usual DocRoot/ServerRoot.

It doesn't seem like we have any score problem, but I haven't gotten that
far yet...

Bill




new mod_proxy + multiple set-cookie

2002-02-04 Thread Joshua Slive

Just a heads up:  There are multiple bug reports that claim that the new
mod_proxy is messing up when multiple set-cookie headers are present, which
prevents some sites like hotmail from working correctly.  Anyone who is
interested should check the bug database.

Joshua.




RE: Apache 2_0_31 is now rolled (take 2)

2002-02-04 Thread Victor J. Orlikowski

My apologies.
The context was to provide a semi-humorous reply to the breakage I
caused Jeff by installing Expat on the AIX box we use.

Been a while since the mail, been a while since I posted last.
Grrr. ;)

Victor
-- 
Victor J. Orlikowski   | The Wall is Down, But the Threat Remains!
==
[EMAIL PROTECTED]  | [EMAIL PROTECTED] | [EMAIL PROTECTED]



RE: Apache 2_0_31 is now rolled (take 2)

2002-02-04 Thread Joshua Slive


> From: Victor J. Orlikowski [mailto:[EMAIL PROTECTED]]

> Ugh. Behind on mail.
>
> My fault; needed it for cadaver for testing... ;)

Victor: You need a little context on your mail.  I don't know about others,
but I have no idea what you are replying to.

Joshua.




Re: Apache 2_0_31 is now rolled (take 2)

2002-02-04 Thread Victor J. Orlikowski

Ugh. Behind on mail.

My fault; needed it for cadaver for testing... ;)

Victor
-- 
Victor J. Orlikowski   | The Wall is Down, But the Threat Remains!
==
[EMAIL PROTECTED]  | [EMAIL PROTECTED] | [EMAIL PROTECTED]



Re: more minor 2.0.31 breakage

2002-02-04 Thread Rodent of Unusual Size

Greg Ames wrote:
> 
> I just noticed that autoindex listings from apache.org no
> longer display the folder icon for directories.  You see
> a '?' icon instead.  The Rodent tells me there's some kind
> of magic type that mod_autoindex uses to figure this out.
> Not debugged yet.

As an unsubstantiated WAG, I would guess that the subrequest
that's sent off to determine the content-type is running
afoul of mod_dir somehow, and S_ISDIR isn't set correctly
when it comes back.
-- 
#kenP-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist  http://Apache-Server.Com/

"Millenium hand and shrimp!"



RE: cvs commit: httpd-2.0 STATUS

2002-02-04 Thread MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)

FWIW 2.0.31 compiles fine on HPUX also..

-Madhu

-Original Message-
From: Aaron Bannert [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 10:59 AM
To: [EMAIL PROTECTED]
Subject: Re: cvs commit: httpd-2.0 STATUS


On Mon, Feb 04, 2002 at 06:51:59PM -, [EMAIL PROTECTED] wrote:
> wrowe   02/02/04 10:51:59
> 
>   Modified:.STATUS
>   Log:
> Brrr... it's frigid in Chicago today!  Hope FirstBill doesn't mind if
> I speak for us both here.
>   
>   Revision  ChangesPath
>   1.453 +7 -5  httpd-2.0/STATUS
>   
>   Index: STATUS
>   ===
>   RCS file: /home/cvs/httpd-2.0/STATUS,v
>   retrieving revision 1.452
>   retrieving revision 1.453
>   diff -u -r1.452 -r1.453
>   --- STATUS  4 Feb 2002 18:41:45 -   1.452
>   +++ STATUS  4 Feb 2002 18:51:59 -   1.453
>   @@ -1,5 +1,5 @@
>APACHE 2.0 STATUS: -*-text-*-
>   -Last modified at [$Date: 2002/02/04 18:41:45 $]
>   +Last modified at [$Date: 2002/02/04 18:51:59 $]
>
>Release:
>
>   @@ -45,9 +45,9 @@
>running on Daedalus since  02-Feb-2002 7:58 PST (need 3 days)
>Compiles on : AIX 4.3, Solaris, FreeBSD 3.4 & 4.5, Win32, Linux
2.2 & 2.4
>for beta
>   -+1 : Justin, Ian, Jeff Trawick, BillS, BrianP, Aaron, Jim
>   ++1 : Justin, Ian, Jeff Trawick, BrianP, Aaron, Jim
>+0 : Lars
>   --1 :
>   +-1 : BillS, BillR
>bumps since original tag:
>* mod-dir patch
>* scoreboard x2 : 1 to fix gracefull restarts
>   @@ -77,8 +77,10 @@
>+1: Justin, Cliff, Aaron, BillS, Jim, trawick
>+0:
>-1:
>   -* hasn't run for 3 days on Daedalus 
>   -* the release has underscores instead of periods.
>   +
>   +* FirstBill reports problem [re]starting as-a-service,
shared
>   +  score is suspect.  OtherBill is investigating, definately
>   +  a showstopper for a .31/.32 beta.  Progress report later
today.

This is a BETA, it is not perfect. The biggest benefit we get from
releasing a beta is _Beta Testers_. It seems to me that we are *very*
close to GA, but I will not be in support of a gold release without
significantly more beta visibility and testing than we've had.

This particular problem aparently has a workaround: Don't run it as a
service on win32.

Although it looks like we have a comfortable majority in favor of
releasing this as a beta, I'd feel better if there were no -1 votes. Can
I pursuade you to change your mind for the above reasons?

-aaron



[PATCH] mod_mime.c

2002-02-04 Thread RCHAPACH Rochester

In theme with the "broken module" being allowed in ap_directory_walk()
and ap_file_walk(), find_ct() of mod_mime.c needs the following change
to allow a missing filename to pass through to the handlers. I am pretty
sure that DECLINED is the correct return, but I don't think it matters.


Index: mod_mime.c
===
RCS file: /home/cvs/httpd-2.0/modules/http/mod_mime.c
retrieving revision 1.76
--- mod_mime.cSat Dec 8 02:02:51 2001
+++ mod_mime.cMon Feb  4 09:30:46 2002
@@ -736,6 +736,14 @@
 const char *fn, *type, *charset = NULL;
 int found_metadata = 0;

+/* To allow broken modules to proceed, we allow missing filenames to
pass.
+ * We will catch it later if it's heading for the core handler.
+ * directory_walk already posted an INFO note for module debugging.
+ */
+if (!r->filename) {
+return DECLINED;
+}
+
 if (r->finfo.filetype == APR_DIR) {
 r->content_type = DIR_MAGIC_TYPE;
 return OK;

Kent Bruinsma
[EMAIL PROTECTED]





RE: 2.0.31 shutdown after heavy load

2002-02-04 Thread MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)

This was with the worker MPM.. I initially suspected the latency - 'waited
for about 5 minutes, and then nothing happened till I issued a "kill -9"
command. I'll try again today, and will probably post the stack trace of the
parent process when it happens.

Thanks
-Madhu

-Original Message-
From: Greg Ames [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 04, 2002 9:58 AM
To: [EMAIL PROTECTED]
Subject: Re: 2.0.31 shutdown after heavy load


"MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" wrote:
> 
> Hi,
> I'm getting the following message when I try to stop apache after
a
> stress-test on HPUX (using webstone).. Inspite of the SIGKILL message, the
> process does not exit.. A second attempt is successful.. Any clues
regarding
> what may be happening is appreciated..
> 
>  [error] child process 5891 still did not exit, sending a SIGKILL.

which MPM?  and have you tried this test with different results before?

I didn't think we could do anything to block SIGKILL.  Could this be just
dispatching latency?

Greg



Re: [PATCH] Caseless sorting for mod_autoindex

2002-02-04 Thread William A. Rowe, Jr.

++1 for 2.0 [just saw such a complaint this week.]

-0 for 1.3

Forewarned that

> o abc
> o Abc
> o Bcd
> o bcd
> o xyz
> o Xyz

is equally possible with this patch, it doesn't sort by case at all.

When you look at 2.0, you will notice most of these cosmetics can be
controlled by the query string.  A C=0/C=1[default] would be nice here :)

Bill

- Original Message - 
From: "Rodent of Unusual Size" <[EMAIL PROTECTED]>
To: "Apache Developers" <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 12:56 PM
Subject: [PATCH] Caseless sorting for mod_autoindex


> This got sent to me privately a long time ago, but got
> lost in the maze of twisty little passages that is my mail.
> It's against 1.3, but if approved I'll bring it forward to
> 2.0.  I've reworked the original patch from Tullio Andreatta
> to apply against HEAD.
> 
> The patch adds the IgnoreCase keyword to the IndexOptions directive.
> If active, directory listings are displayed case-insensitively.
> On systems with case-aware/case-sensitive filesystems, this would
> change
> 
> o Abc
> o Bcd
> o Xyz
> o abc
> o bcd
> o xyz
> 
> to
> 
> o Abc
> o abc
> o Bcd
> o bcd
> o Xyz
> o xyz
> 
> which can be a lot easier for humans to scan when looking for
> something specific.
> 
> Index: src/modules/standard/mod_autoindex.c
> ===
> RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
> retrieving revision 1.121
> diff -u -r1.121 mod_autoindex.c
> --- src/modules/standard/mod_autoindex.c17 Nov 2001 03:27:09 -  1.121
> +++ src/modules/standard/mod_autoindex.c4 Feb 2002 18:08:56 -
> @@ -98,6 +98,7 @@
>  #define NO_OPTIONS 256
>  #define FOLDERS_FIRST 512
>  #define TRACK_MODIFIED 1024
> +#define SORT_NOCASE 2048
>  
>  #define K_PAD 1
>  #define K_NOPAD 0
> @@ -411,6 +412,9 @@
> else if (!strcasecmp(w, "TrackModified")) {
>  option = TRACK_MODIFIED;
> }
> +   else if (!strcasecmp(w, "IgnoreCase")) {
> +option = SORT_NOCASE;
> +   }
>  else if (!strcasecmp(w, "None")) {
> if (action != '\0') {
> return "Cannot combine '+' or '-' with 'None' keyword";
> @@ -732,6 +736,7 @@
>  int ascending;
>  int isdir;
>  int checkdir;
> +int ignorecase;
>  char key;
>  };
>  
> @@ -1222,6 +1227,7 @@
>   * rather than CPU.
>   */
>  p->checkdir = ((d->opts & FOLDERS_FIRST) != 0);
> +p->ignorecase = ((d->opts & SORT_NOCASE) != 0);
>  p->key = ap_toupper(keyid);
>  p->ascending = (ap_toupper(direction) == D_ASCENDING);
>  
> @@ -1592,7 +1598,14 @@
>  }
>  break;
>  }
> -return strcmp(c1->name, c2->name);
> +
> +if (c1->ignorecase) {
> +result = strcasecmp(c1->name, c2->name);
> +}
> +else {
> +result = strcmp(c1->name, c2->name);
> +}
> +return result;
>  }
>  
>  
> -- 
> #ken P-)}
> 
> Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
> Author, developer, opinionist  http://Apache-Server.Com/
> 
> "Millenium hand and shrimp!"
> 





Re: cvs commit: httpd-2.0 STATUS

2002-02-04 Thread Aaron Bannert

On Mon, Feb 04, 2002 at 06:51:59PM -, [EMAIL PROTECTED] wrote:
> wrowe   02/02/04 10:51:59
> 
>   Modified:.STATUS
>   Log:
> Brrr... it's frigid in Chicago today!  Hope FirstBill doesn't mind if
> I speak for us both here.
>   
>   Revision  ChangesPath
>   1.453 +7 -5  httpd-2.0/STATUS
>   
>   Index: STATUS
>   ===
>   RCS file: /home/cvs/httpd-2.0/STATUS,v
>   retrieving revision 1.452
>   retrieving revision 1.453
>   diff -u -r1.452 -r1.453
>   --- STATUS  4 Feb 2002 18:41:45 -   1.452
>   +++ STATUS  4 Feb 2002 18:51:59 -   1.453
>   @@ -1,5 +1,5 @@
>APACHE 2.0 STATUS: -*-text-*-
>   -Last modified at [$Date: 2002/02/04 18:41:45 $]
>   +Last modified at [$Date: 2002/02/04 18:51:59 $]
>
>Release:
>
>   @@ -45,9 +45,9 @@
>running on Daedalus since  02-Feb-2002 7:58 PST (need 3 days)
>Compiles on : AIX 4.3, Solaris, FreeBSD 3.4 & 4.5, Win32, Linux 2.2 & 2.4
>for beta
>   -+1 : Justin, Ian, Jeff Trawick, BillS, BrianP, Aaron, Jim
>   ++1 : Justin, Ian, Jeff Trawick, BrianP, Aaron, Jim
>+0 : Lars
>   --1 :
>   +-1 : BillS, BillR
>bumps since original tag:
>* mod-dir patch
>* scoreboard x2 : 1 to fix gracefull restarts
>   @@ -77,8 +77,10 @@
>+1: Justin, Cliff, Aaron, BillS, Jim, trawick
>+0:
>-1:
>   -* hasn't run for 3 days on Daedalus 
>   -* the release has underscores instead of periods.
>   +
>   +* FirstBill reports problem [re]starting as-a-service, shared
>   +  score is suspect.  OtherBill is investigating, definately
>   +  a showstopper for a .31/.32 beta.  Progress report later today.

This is a BETA, it is not perfect. The biggest benefit we get from
releasing a beta is _Beta Testers_. It seems to me that we are *very*
close to GA, but I will not be in support of a gold release without
significantly more beta visibility and testing than we've had.

This particular problem aparently has a workaround: Don't run it as a
service on win32.

Although it looks like we have a comfortable majority in favor of
releasing this as a beta, I'd feel better if there were no -1 votes. Can
I pursuade you to change your mind for the above reasons?

-aaron



[PATCH] Caseless sorting for mod_autoindex

2002-02-04 Thread Rodent of Unusual Size

This got sent to me privately a long time ago, but got
lost in the maze of twisty little passages that is my mail.
It's against 1.3, but if approved I'll bring it forward to
2.0.  I've reworked the original patch from Tullio Andreatta
to apply against HEAD.

The patch adds the IgnoreCase keyword to the IndexOptions directive.
If active, directory listings are displayed case-insensitively.
On systems with case-aware/case-sensitive filesystems, this would
change

o Abc
o Bcd
o Xyz
o abc
o bcd
o xyz

to

o Abc
o abc
o Bcd
o bcd
o Xyz
o xyz

which can be a lot easier for humans to scan when looking for
something specific.

Index: src/modules/standard/mod_autoindex.c
===
RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_autoindex.c,v
retrieving revision 1.121
diff -u -r1.121 mod_autoindex.c
--- src/modules/standard/mod_autoindex.c17 Nov 2001 03:27:09 -  1.121
+++ src/modules/standard/mod_autoindex.c4 Feb 2002 18:08:56 -
@@ -98,6 +98,7 @@
 #define NO_OPTIONS 256
 #define FOLDERS_FIRST 512
 #define TRACK_MODIFIED 1024
+#define SORT_NOCASE 2048
 
 #define K_PAD 1
 #define K_NOPAD 0
@@ -411,6 +412,9 @@
else if (!strcasecmp(w, "TrackModified")) {
 option = TRACK_MODIFIED;
}
+   else if (!strcasecmp(w, "IgnoreCase")) {
+option = SORT_NOCASE;
+   }
 else if (!strcasecmp(w, "None")) {
if (action != '\0') {
return "Cannot combine '+' or '-' with 'None' keyword";
@@ -732,6 +736,7 @@
 int ascending;
 int isdir;
 int checkdir;
+int ignorecase;
 char key;
 };
 
@@ -1222,6 +1227,7 @@
  * rather than CPU.
  */
 p->checkdir = ((d->opts & FOLDERS_FIRST) != 0);
+p->ignorecase = ((d->opts & SORT_NOCASE) != 0);
 p->key = ap_toupper(keyid);
 p->ascending = (ap_toupper(direction) == D_ASCENDING);
 
@@ -1592,7 +1598,14 @@
 }
 break;
 }
-return strcmp(c1->name, c2->name);
+
+if (c1->ignorecase) {
+result = strcasecmp(c1->name, c2->name);
+}
+else {
+result = strcmp(c1->name, c2->name);
+}
+return result;
 }
 
 
-- 
#kenP-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist  http://Apache-Server.Com/

"Millenium hand and shrimp!"



Re: Ongoing 2.0.31 and php hiccups

2002-02-04 Thread David Ford

Aren't the APIs in apache HEAD significantly different preventing PHP 
4.1 from being used?  I gathered that you -must- use PHP42 HEAD.

Thank you,
David

MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1) wrote:

>I've been using PHP 4.1.1 and things seem to be okay for me (on HPUX).. I'm
>using PHP 4.1.1 with the following configure command :
>
>configure --prefix=/opt/apache2/modules \
>--enable-so --with-apache=/opt/apache2
>--with-apxs2=/opt/apache2/bin/apxs
>
>-Madhu
>
>-Original Message-
>From: David Ford [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, February 03, 2002 2:48 PM
>To: [EMAIL PROTECTED]
>Subject: Ongoing 2.0.31 and php hiccups
>
>
>Ok, has -anyone- gotten php and apache running together the last week? 
> If so, would you mind terribly if you posted the configure/make lines 
>please?  I'm getting kind of fidgity and needing to get it going :) 
> Apache by itself seems fine.
>
>I've gotten down to a barebones ./configure 
>--with-apxs2=/usr/local/apache2/bin/apxs for php and even that causes a 
>segfault just after startup.  Unfortunately I can't convince gdb to 
>follow the child no matter what the settings so I can't post a bt just 
>yet.  Best I have is the following:
>
>strace -f httpd
>...
>open("/usr/local/apache2/conf/mime.types", O_RDONLY) = 6
>fstat64(6, {st_mode=S_IFREG|0644, st_size=12322, ...}) = 0
>read(6, "# This is a comment. I love comments.\n\n#...
>...
>read(6, "ovie\nx-conference/x-cooltalk\t\tice\n", 4096) = 34
>read(6, "", 4096)   = 0
>close(6)= 0
>getpid()= 5906
>open("/tmp/aprMaKOvt", O_RDWR|O_CREAT|O_EXCL, 0600) = 6
>unlink("/tmp/aprMaKOvt")= 0
>getcwd("/", 4096)   = 2
>--- SIGSEGV (Segmentation fault) ---
>
>ltrace ...
>...
>read(6, "", 4096) = 0
>pthread_mutex_unlock(0x08189a5c, 0x4000b870, 0, 0, 1) = 0
>close(6)  = 0
>pthread_mutex_unlock(0x08189a5c, 0, 0xbfffd448, 0x400b3167, 0) = 0
>pthread_mutex_destroy(0x08189a5c, 0x4000b870, 6, 0, 0x081889e8) = 0
>strcmp("sapi_apache2.c", "mod_proxy.c")   = 1
>strcmp("mod_so.c", "mod_proxy.c") = 1
>strcmp("mod_rewrite.c", "mod_proxy.c")= 1
>strcmp("mod_alias.c", "mod_proxy.c")  = -1
>strcmp("mod_userdir.c", "mod_proxy.c")= 1
>strcmp("mod_speling.c", "mod_proxy.c")= 1
>strcmp("mod_actions.c", "mod_proxy.c")= -1
>strcmp("mod_imap.c", "mod_proxy.c")   = -1
>strcmp("mod_dir.c", "mod_proxy.c")= -1
>strcmp("mod_negotiation.c", "mod_proxy.c")= -1
>strcmp("mod_vhost_alias.c", "mod_proxy.c")= 1
>strcmp("mod_cgi.c", "mod_proxy.c")= -1
>strcmp("mod_info.c", "mod_proxy.c")   = -1
>strcmp("mod_asis.c", "mod_proxy.c")   = -1
>strcmp("mod_autoindex.c", "mod_proxy.c")  = -1
>strcmp("mod_status.c", "mod_proxy.c") = 1
>strcmp("mod_mime.c", "mod_proxy.c")   = -1
>strcmp("http_core.c", "mod_proxy.c")  = -1
>strcmp("prefork.c", "mod_proxy.c")= 1
>strcmp("mod_setenvif.c", "mod_proxy.c")   = 1
>strcmp("mod_unique_id.c", "mod_proxy.c")  = 1
>strcmp("mod_usertrack.c", "mod_proxy.c")  = 1
>strcmp("mod_headers.c", "mod_proxy.c")= -1
>strcmp("mod_expires.c", "mod_proxy.c")= -1
>strcmp("mod_mime_magic.c", "mod_proxy.c") = -1
>strcmp("mod_env.c", "mod_proxy.c")= -1
>strcmp("mod_log_config.c", "mod_proxy.c") = -1
>strcmp("mod_include.c", "mod_proxy.c")= -1
>strcmp("mod_deflate.c", "mod_proxy.c")= -1
>strcmp("mod_case_filter_in.c", "mod_proxy.c") = -1
>strcmp("mod_case_filter.c", "mod_proxy.c")= -1
>strcmp("mod_file_cache.c", "mod_proxy.c") = -1
>strcmp("mod_auth_digest.c", "mod_proxy.c")= -1
>strcmp("mod_auth.c", "mod_proxy.c")   = -1
>strcmp("mod_access.c", "mod_proxy.c") = -1
>strcmp("core.c", "mod_proxy.c")   = -1
>memset(0x08151538, '\000', 80)= 0x08151538
>strlen(0x080ed7c4, 0x080f735c, 1793, 0x08054f5c, 0x400c65ec) = 14
>memcpy(0x08151588, "/tmp/aprXX", 15)  = 0x08151588
>mkstemp(0x08151588, 0x40016a70, 1160, 0x080b3fd5, 0x08151588) = 6
>memset(0x08151598, '\000', 72)= 0x08151598
>strlen(0x08151588, 0x08151588, 0xb408, 0x080b8976, 0x081003f8) = 14
>memcpy(0x081515e0, "/tmp/aprVYqD12", 15)  = 0x081515e0
>unlink("/tmp/aprVYqD12")  = 0
>pthread_mutexattr_init(0xb458, 24, 0x080be520, 0x080c2810, 
>0x08151588) = 0
>pthread_mutex_init(0x08151610, 0xb458, 0x080be520, 0x080c2810, 
>0x08151588) = 0
>pthread_mutexattr_destroy(0xb458, 0xb458, 0x080be520, 
>0x080c2810, 0x08151588) = 0
>--- SIGSEGV (Segmentation fault) ---
>+++ killed by SIGSEGV +++
>
># find -type f -exec grep "/

RE: cvs commit: httpd-2.0/server/mpm/worker worker.c

2002-02-04 Thread Ryan Bloom

>   Modified:.CHANGES STATUS
>server/mpm/perchild perchild.c
>server/mpm/prefork prefork.c
>server/mpm/worker worker.c
>   Log:
>   Not being able to bind to a socket is a fatal error.  This makes all
>   MPMs treat it as such.  We now print a message to the console, and
> return
>   a non-zero status code.

That should have read "all Unix MPMs".  If I can figure out the rest of
the MPMs, I will port this change to them as well.

Ryan

 




Re: cvs commit: apache-1.3/src Configure CHANGES

2002-02-04 Thread Jeff Trawick

[EMAIL PROTECTED] writes:

> martin  02/02/04 05:57:40
> 
>   Modified:.configure
>src  Configure CHANGES
>   Log:
>   Fix the longstanding bug that errors (returned by src/Configure)
>   would not be noticed by the top level configure script.
>   That was bad for automated production environments, as errors would
>   go thru unnoticed, and caused havoc much later in the production.

Thanks, folks!  I just love it when the elves make a visit!

[trawick@amadeus apache-1.3]$ CFLAGS=jkalsjflkajdsflkjasdf ./configure
Configuring for Apache, Version 1.3.24-dev
...
** Apache requires an ANSI C Compiler, such as gcc.

 Error Output for sanity check 
cd ..; gcc  -DSOLARIS2=280 -DUSE_EXPAT -I./lib/expat-lite
-DNO_DL_NEEDED jkalsjflkajdsflkjasdf `./apaci` -o helpers/dummy
helpers/dummy.c   -lsocket -lnsl -lpthread
gcc: jkalsjflkajdsflkjasdf: No such file or directory
make: *** [dummy] Error 1
= End of Error Report =

 Aborting!
[trawick@amadeus apache-1.3]$ echo $?
1<-cool!
[trawick@amadeus apache-1.3]$




Re: cvs commit: httpd-2.0/server/mpm/worker worker.c

2002-02-04 Thread William A. Rowe, Jr.

From: "Bill Stoddard" <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 12:01 PM


> Actually, this patch is not the only (or even main) culprit.  The switch to use the 
>shared
> scoreboard is fatally broken. I am in the process of keeping the spirit of Ryan's 
>patch to
> only use pre_mpm in the parent and revert back to non shared scoreboard for Windows.

Agreed.  But I think you are seeing a problem reported some time back, before the
shared score was even implemented.  Seems [perhaps] that some users can't run as
a service with the bin/ pathing we implemented several months ago.

Users report that moving everything from bin/ into the apache root works.
I've never seen this, so I can't comment.

But please do _not_ go reverting patches without reviewing them... would
you kindly explain exactly _what_ is fatally broken?

Bill




Re: 2.0.31 on Windows

2002-02-04 Thread William A. Rowe, Jr.

From: "Bill Stoddard" <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 10:50 AM


> Couple of problems noticed in a few minutes of testing
> 
> 1. apache -k restart -n apache2 is broken. hangs forever and a new child process is 
>never
> started.
> 
> 2. If I kill off the child process (by attaching and detaching a debugger for 
>instance),
> the parent should detect the child process exit and start a new child process. 
>Instead,
> the parent goes belly up.
> 
> Beta killers (for Windows at least).

Yup.

Can we have a bit of patience on .32, a day or two, so I can get these fixed?

Bill - which version of Win32?

Bill




RE: cvs commit: httpd-2.0/server/mpm/worker worker.c

2002-02-04 Thread Ryan Bloom

Ahhh,   I hadn't tried that yet.

Ryan

--
Ryan Bloom  [EMAIL PROTECTED]
645 Howard St.  [EMAIL PROTECTED]
San Francisco, CA 

> -Original Message-
> From: Bill Stoddard [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 04, 2002 10:04 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: cvs commit: httpd-2.0/server/mpm/worker worker.c
> 
> Start apache as a service. That seems to make a difference.
> 
> Bill
> 
> > I'm not having this problem.  I just started Apache, and killed off
the
> > child process five times on my XP box.  Each time, a new child was
> > created to take its place.
> >
> > I stopped the child by opening the Task Manager, and killing the
> > process.  It took some time to make sure I wasn't killing the parent
> > process, because for some reason, the pids don't just go in
increasing
> > order like you would expect.
> >
> > I would help debug this problem, but since I can't duplicate, I am
kind
> > of in the dark.  The best I can suggest, is take a look at the
> > information that is being set about the generation in the
scoreboard.
> > It is possible that some of the fields in the scoreboard aren't
being
> > initialized in the parent anymore.
> >
> > Ryan
> >
> > --
> > Ryan Bloom  [EMAIL PROTECTED]
> > 645 Howard St.  [EMAIL PROTECTED]
> > San Francisco, CA
> >
> > > -Original Message-
> > > From: Bill Stoddard [mailto:[EMAIL PROTECTED]]
> > > Sent: Monday, February 04, 2002 8:58 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Fw: cvs commit: httpd-2.0/server/mpm/worker worker.c
> > >
> > > This patch seems to have broken restarts and child recovery on
> > Windows.
> > > Investigating...
> > >
> > > Bill
> >
> >





Re: cvs commit: httpd-2.0/server/mpm/worker worker.c

2002-02-04 Thread Aaron Bannert

On Mon, Feb 04, 2002 at 01:01:49PM -0500, Bill Stoddard wrote:
> Actually, this patch is not the only (or even main) culprit.  The switch to use the 
>shared
> scoreboard is fatally broken. I am in the process of keeping the spirit of Ryan's 
>patch to
> only use pre_mpm in the parent and revert back to non shared scoreboard for Windows.

How is it fatally broken?

-aaron



Re: cvs commit: httpd-2.0/server/mpm/worker worker.c

2002-02-04 Thread Bill Stoddard

Start apache as a service. That seems to make a difference.

Bill

> I'm not having this problem.  I just started Apache, and killed off the
> child process five times on my XP box.  Each time, a new child was
> created to take its place.
> 
> I stopped the child by opening the Task Manager, and killing the
> process.  It took some time to make sure I wasn't killing the parent
> process, because for some reason, the pids don't just go in increasing
> order like you would expect.
> 
> I would help debug this problem, but since I can't duplicate, I am kind
> of in the dark.  The best I can suggest, is take a look at the
> information that is being set about the generation in the scoreboard.
> It is possible that some of the fields in the scoreboard aren't being
> initialized in the parent anymore.
> 
> Ryan
> 
> --
> Ryan Bloom  [EMAIL PROTECTED]
> 645 Howard St.  [EMAIL PROTECTED]
> San Francisco, CA 
> 
> > -Original Message-
> > From: Bill Stoddard [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, February 04, 2002 8:58 AM
> > To: [EMAIL PROTECTED]
> > Subject: Fw: cvs commit: httpd-2.0/server/mpm/worker worker.c
> > 
> > This patch seems to have broken restarts and child recovery on
> Windows.
> > Investigating...
> > 
> > Bill
> 
> 




Re: cvs commit: httpd-2.0/server/mpm/worker worker.c

2002-02-04 Thread Bill Stoddard

Actually, this patch is not the only (or even main) culprit.  The switch to use the 
shared
scoreboard is fatally broken. I am in the process of keeping the spirit of Ryan's 
patch to
only use pre_mpm in the parent and revert back to non shared scoreboard for Windows.

Bill

- Original Message -
From: "Bill Stoddard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 11:57 AM
Subject: Fw: cvs commit: httpd-2.0/server/mpm/worker worker.c


> This patch seems to have broken restarts and child recovery on Windows.
Investigating...
>
> Bill
>
>
> > rbb 02/01/30 14:35:57
> >
> >   Modified:include  scoreboard.h
> >server   scoreboard.c
> >server/mpm/prefork prefork.c
> >server/mpm/winnt mpm_winnt.c
> >server/mpm/worker worker.c
> >   Log:
> >   Change the Windows MPM to only use the pre_mpm phase in the parent process.
> >   The child processes use the child_init phase to reattach to the shared
> >   memory.  This makes Windows work like Unix, which should make it easier
> >   for module authors to write portable modules.
> >
> >   Revision  ChangesPath
> >   1.39  +3 -3  httpd-2.0/include/scoreboard.h
> >
> >   Index: scoreboard.h
> >   ===
> >   RCS file: /home/cvs/httpd-2.0/include/scoreboard.h,v
> >   retrieving revision 1.38
> >   retrieving revision 1.39
> >   diff -u -r1.38 -r1.39
> >   --- scoreboard.h 28 Jan 2002 00:41:31 - 1.38
> >   +++ scoreboard.h 30 Jan 2002 22:35:56 - 1.39
> >   @@ -73,6 +73,7 @@
> >#include "apr_hooks.h"
> >#include "apr_thread_proc.h"
> >#include "apr_portable.h"
> >   +#include "apr_shm.h"
> >
> >/* Scoreboard info on a process is, for now, kept very brief ---
> > * just status value and pid (the latter so that the caretaker process
> >   @@ -113,8 +114,7 @@
> > */
> >typedef enum {
> >SB_NOT_SHARED = 1,
> >   -SB_SHARED = 2,  /* PARENT */
> >   -SB_SHARED_CHILD = 3
> >   +SB_SHARED = 2
> >} ap_scoreboard_e;
> >
> >#define SB_WORKING  0  /* The server is busy and the child is useful. */
> >   @@ -185,7 +185,7 @@
> >AP_DECLARE(void) ap_increment_counts(ap_sb_handle_t *sbh, request_rec *r);
> >
> >int ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e t);
> >   -apr_status_t reopen_scoreboard(apr_pool_t *p, int detached);
> >   +apr_status_t ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached);
> >void ap_init_scoreboard(void *shared_score);
> >int ap_calc_scoreboard_size(void);
> >apr_status_t ap_cleanup_scoreboard(void *d);
> >
> >
> >
> >   1.53  +9 -17 httpd-2.0/server/scoreboard.c
> >
> >   Index: scoreboard.c
> >   ===
> >   RCS file: /home/cvs/httpd-2.0/server/scoreboard.c,v
> >   retrieving revision 1.52
> >   retrieving revision 1.53
> >   diff -u -r1.52 -r1.53
> >   --- scoreboard.c 28 Jan 2002 00:41:31 - 1.52
> >   +++ scoreboard.c 30 Jan 2002 22:35:56 - 1.53
> >   @@ -143,7 +143,8 @@
> >{
> >char *more_storage;
> >int i;
> >   -
> >   +
> >   + ap_calc_scoreboard_size();
> >ap_scoreboard_image =
> >calloc(1, sizeof(scoreboard) + server_limit * sizeof(worker_score *));
> >more_storage = shared_score;
> >   @@ -200,7 +201,7 @@
> >/* If detach is non-zero, this is a seperate child process,
> > * if zero, it is a forked child.
> > */
> >   -apr_status_t reopen_scoreboard(apr_pool_t *p, int detached)
> >   +apr_status_t ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached)
> >{
> >#if APR_HAS_SHARED_MEMORY
> >if (!detached) {
> >   @@ -215,6 +216,9 @@
> >}
> >/* everything will be cleared shortly */
> >#endif
> >   +if (*shm) {
> >   +*shm = ap_scoreboard_shm;
> >   +}
> >return APR_SUCCESS;
> >}
> >
> >   @@ -260,14 +264,6 @@
> >memset(sb_shared, 0, scoreboard_size);
> >ap_init_scoreboard(sb_shared);
> >}
> >   -else if (sb_type == SB_SHARED_CHILD) {
> >   -void *sb_shared;
> >   -rv = reopen_scoreboard(p, 1);
> >   -if (rv || !(sb_shared = apr_shm_baseaddr_get(ap_scoreboard_shm))) {
> >   -return HTTP_INTERNAL_SERVER_ERROR;
> >   -}
> >   -ap_init_scoreboard(sb_shared);
> >   -}
> >else
> >#endif
> >{
> >   @@ -282,14 +278,10 @@
> >ap_init_scoreboard(sb_mem);
> >}
> >}
> >   -/* can't just memset() */
> >   -if (sb_type != SB_SHARED_CHILD) {
> >   -ap_scoreboard_image->global->sb_type = sb_type;
> >   -ap_scoreboard_image->global->running_generation = running_gen;
> >   -apr_pool_cleanup_register(p, NULL, ap_cleanup_scoreboard,
> >   -   

Re: 2.0.31 shutdown after heavy load

2002-02-04 Thread Greg Ames

"MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" wrote:
> 
> Hi,
> I'm getting the following message when I try to stop apache after a
> stress-test on HPUX (using webstone).. Inspite of the SIGKILL message, the
> process does not exit.. A second attempt is successful.. Any clues regarding
> what may be happening is appreciated..
> 
>  [error] child process 5891 still did not exit, sending a SIGKILL.

which MPM?  and have you tried this test with different results before?

I didn't think we could do anything to block SIGKILL.  Could this be just
dispatching latency?

Greg



more minor 2.0.31 breakage

2002-02-04 Thread Greg Ames

I just noticed that autoindex listings from apache.org no longer display the
folder icon for directories.  You see a '?' icon instead.  The Rodent tells me
there's some kind of magic type that mod_autoindex uses to figure this out.  Not
debugged yet.

Greg



RE: cvs commit: httpd-2.0/server/mpm/worker worker.c

2002-02-04 Thread Ryan Bloom

I'm not having this problem.  I just started Apache, and killed off the
child process five times on my XP box.  Each time, a new child was
created to take its place.

I stopped the child by opening the Task Manager, and killing the
process.  It took some time to make sure I wasn't killing the parent
process, because for some reason, the pids don't just go in increasing
order like you would expect.

I would help debug this problem, but since I can't duplicate, I am kind
of in the dark.  The best I can suggest, is take a look at the
information that is being set about the generation in the scoreboard.
It is possible that some of the fields in the scoreboard aren't being
initialized in the parent anymore.

Ryan

--
Ryan Bloom  [EMAIL PROTECTED]
645 Howard St.  [EMAIL PROTECTED]
San Francisco, CA 

> -Original Message-
> From: Bill Stoddard [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 04, 2002 8:58 AM
> To: [EMAIL PROTECTED]
> Subject: Fw: cvs commit: httpd-2.0/server/mpm/worker worker.c
> 
> This patch seems to have broken restarts and child recovery on
Windows.
> Investigating...
> 
> Bill





Re: 2.0.31 on Windows

2002-02-04 Thread Dwayne Miller

I'm not familiar with the -n apache2 option, but I was just trying to 
figure out why I can't get apache to run as a service.  I'm using the -k 
start option, a message that it's starting the service appears, but 
nothing happens.  In the service.c file, I added a line to print the 
'Failed to start the service' message as I was not seeing this message 
in any of my log files.  It in fact fails to start the service.

Bill Stoddard wrote:

>Couple of problems noticed in a few minutes of testing
>
>1. apache -k restart -n apache2 is broken. hangs forever and a new child process is 
>never
>started.
>
>2. If I kill off the child process (by attaching and detaching a debugger for 
>instance),
>the parent should detect the child process exit and start a new child process. 
>Instead,
>the parent goes belly up.
>
>Beta killers (for Windows at least).
>
>Bill
>





Fw: cvs commit: httpd-2.0/server/mpm/worker worker.c

2002-02-04 Thread Bill Stoddard

This patch seems to have broken restarts and child recovery on Windows.  
Investigating...

Bill


> rbb 02/01/30 14:35:57
>
>   Modified:include  scoreboard.h
>server   scoreboard.c
>server/mpm/prefork prefork.c
>server/mpm/winnt mpm_winnt.c
>server/mpm/worker worker.c
>   Log:
>   Change the Windows MPM to only use the pre_mpm phase in the parent process.
>   The child processes use the child_init phase to reattach to the shared
>   memory.  This makes Windows work like Unix, which should make it easier
>   for module authors to write portable modules.
>
>   Revision  ChangesPath
>   1.39  +3 -3  httpd-2.0/include/scoreboard.h
>
>   Index: scoreboard.h
>   ===
>   RCS file: /home/cvs/httpd-2.0/include/scoreboard.h,v
>   retrieving revision 1.38
>   retrieving revision 1.39
>   diff -u -r1.38 -r1.39
>   --- scoreboard.h 28 Jan 2002 00:41:31 - 1.38
>   +++ scoreboard.h 30 Jan 2002 22:35:56 - 1.39
>   @@ -73,6 +73,7 @@
>#include "apr_hooks.h"
>#include "apr_thread_proc.h"
>#include "apr_portable.h"
>   +#include "apr_shm.h"
>
>/* Scoreboard info on a process is, for now, kept very brief ---
> * just status value and pid (the latter so that the caretaker process
>   @@ -113,8 +114,7 @@
> */
>typedef enum {
>SB_NOT_SHARED = 1,
>   -SB_SHARED = 2,  /* PARENT */
>   -SB_SHARED_CHILD = 3
>   +SB_SHARED = 2
>} ap_scoreboard_e;
>
>#define SB_WORKING  0  /* The server is busy and the child is useful. */
>   @@ -185,7 +185,7 @@
>AP_DECLARE(void) ap_increment_counts(ap_sb_handle_t *sbh, request_rec *r);
>
>int ap_create_scoreboard(apr_pool_t *p, ap_scoreboard_e t);
>   -apr_status_t reopen_scoreboard(apr_pool_t *p, int detached);
>   +apr_status_t ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached);
>void ap_init_scoreboard(void *shared_score);
>int ap_calc_scoreboard_size(void);
>apr_status_t ap_cleanup_scoreboard(void *d);
>
>
>
>   1.53  +9 -17 httpd-2.0/server/scoreboard.c
>
>   Index: scoreboard.c
>   ===
>   RCS file: /home/cvs/httpd-2.0/server/scoreboard.c,v
>   retrieving revision 1.52
>   retrieving revision 1.53
>   diff -u -r1.52 -r1.53
>   --- scoreboard.c 28 Jan 2002 00:41:31 - 1.52
>   +++ scoreboard.c 30 Jan 2002 22:35:56 - 1.53
>   @@ -143,7 +143,8 @@
>{
>char *more_storage;
>int i;
>   -
>   +
>   + ap_calc_scoreboard_size();
>ap_scoreboard_image =
>calloc(1, sizeof(scoreboard) + server_limit * sizeof(worker_score *));
>more_storage = shared_score;
>   @@ -200,7 +201,7 @@
>/* If detach is non-zero, this is a seperate child process,
> * if zero, it is a forked child.
> */
>   -apr_status_t reopen_scoreboard(apr_pool_t *p, int detached)
>   +apr_status_t ap_reopen_scoreboard(apr_pool_t *p, apr_shm_t **shm, int detached)
>{
>#if APR_HAS_SHARED_MEMORY
>if (!detached) {
>   @@ -215,6 +216,9 @@
>}
>/* everything will be cleared shortly */
>#endif
>   +if (*shm) {
>   +*shm = ap_scoreboard_shm;
>   +}
>return APR_SUCCESS;
>}
>
>   @@ -260,14 +264,6 @@
>memset(sb_shared, 0, scoreboard_size);
>ap_init_scoreboard(sb_shared);
>}
>   -else if (sb_type == SB_SHARED_CHILD) {
>   -void *sb_shared;
>   -rv = reopen_scoreboard(p, 1);
>   -if (rv || !(sb_shared = apr_shm_baseaddr_get(ap_scoreboard_shm))) {
>   -return HTTP_INTERNAL_SERVER_ERROR;
>   -}
>   -ap_init_scoreboard(sb_shared);
>   -}
>else
>#endif
>{
>   @@ -282,14 +278,10 @@
>ap_init_scoreboard(sb_mem);
>}
>}
>   -/* can't just memset() */
>   -if (sb_type != SB_SHARED_CHILD) {
>   -ap_scoreboard_image->global->sb_type = sb_type;
>   -ap_scoreboard_image->global->running_generation = running_gen;
>   -apr_pool_cleanup_register(p, NULL, ap_cleanup_scoreboard,
>   -  apr_pool_cleanup_null);
>   -}
>   +ap_scoreboard_image->global->sb_type = sb_type;
>   +ap_scoreboard_image->global->running_generation = running_gen;
>ap_restart_time = apr_time_now();
>   +apr_pool_cleanup_register(p, NULL, ap_cleanup_scoreboard, 
>apr_pool_cleanup_null);
>return OK;
>}
>
>
>
>
>   1.236 +1 -1  httpd-2.0/server/mpm/prefork/prefork.c
>
>   Index: prefork.c
>   ===
>   RCS file: /home/cvs/httpd-2.0/server/mpm/prefork/prefork.c,v
>   retrieving revision 1.235
>   retrieving revision 1.236
>   diff -u -r1.235 -r1.236
>   --- prefork.c 29 Jan 2002 22:31:25 - 1.

2.0.31 on Windows

2002-02-04 Thread Bill Stoddard

Couple of problems noticed in a few minutes of testing

1. apache -k restart -n apache2 is broken. hangs forever and a new child process is 
never
started.

2. If I kill off the child process (by attaching and detaching a debugger for 
instance),
the parent should detect the child process exit and start a new child process. Instead,
the parent goes belly up.

Beta killers (for Windows at least).

Bill




Re: Connection timed out: read_request_line() failed

2002-02-04 Thread Dwayne Miller

The details...


It's a ColdFusion script, so the processing module is mod_coldfusion.so. 
 The script runs, it just doesn't see any of the form data.  And I see 
the error logged with every post.

I'm using SSL, so I'm also configured with mod_ssl.

Interesting part is that it seems to be somehow related to which browser 
I use.  Noticed the problem with Mozilla 0.9.6.  Seems to work fine when 
client is IE.  Same module, same POST worked with previous builds of 
Apache and SSL and all client browsers.

Bill Stoddard wrote:

>POSTs to CGIs look okay in my testing. Can you provide a bit more info about your
>application? Is it a CGI?
>
>Bill
>
>>I'm getting this error in my log file when I post a form, but the code
>>looks like it should be ignoring timeout errors.  Something is
>>definitely wrong with the handling of the request because it appears
>>that all of the form data is missing.
>>
>>The full error message is...
>>[Mon Feb 04 09:00:03 2002] [error] [client 127.0.0.1] (32560)Connection
>>timed out: read_request_line() failed
>>
>>This is a build of the latest tarball (2.0.31) running on Win2000 system.
>>
>>Any thoughts on how to track down what is going on?
>>
>>
>>
>





Re: Connection timed out: read_request_line() failed

2002-02-04 Thread Bill Stoddard

POSTs to CGIs look okay in my testing. Can you provide a bit more info about your
application? Is it a CGI?

Bill

> I'm getting this error in my log file when I post a form, but the code
> looks like it should be ignoring timeout errors.  Something is
> definitely wrong with the handling of the request because it appears
> that all of the form data is missing.
>
> The full error message is...
> [Mon Feb 04 09:00:03 2002] [error] [client 127.0.0.1] (32560)Connection
> timed out: read_request_line() failed
>
> This is a build of the latest tarball (2.0.31) running on Win2000 system.
>
> Any thoughts on how to track down what is going on?
>
>
>




Re: Apache 2_0_31 is now rolled

2002-02-04 Thread Greg Ames

Ryan Bloom wrote:
> 

> > I think we all agree that once a tarball
> > is "public" (meaning that non-developers have the *potential* of
> > grabbing it) if there's something wrong with it, we have to bump
> > before we reroll.

If it makes it to /www.apache.org/dist/httpd/, then I agree.  If the only place
it resides is intended strictly for developers, then I think that's too
conservative, especially if it's just a roll problem.

> I would vote in favor of having a developer only place to grab it then.

+1

> The mail to ask people to test should go to the list of httpd
> committers.

That excludes people like Madhu who isn't a committer but has given us valuable
feedback on our roll procedures.  

My vote would be something like Justin suggested, with a few tweaks:  put the
preliminary tarballs in a developer only directory, put appropriate disclaimers
in a HEADER file (so you see them in an autoindex listing), and ask people to
test on the dev@httpd list.  Once we know the fate of the tarball, remove it
from this dir so people don't get used to finding stuff there.  We probably
wouldn't want any links on our site to this directory either.

If in spite of these precautions, any lurkers grab the preliminary tarballs and
have problems:
* they have been warned,
* if it's a code problem, we are going to patch, re-tag, and re-roll soon
anyway,
* if it's a roll problem, doing ./buildconf will often fix (we could mention
that in the HEADER),
* I would think most responsible lurkers would de-cloak and speak up if they are
the first to see a problem.  If not, how much should I care about their problem?

Greg



bugdb userdatabase

2002-02-04 Thread Joshua Slive

Problem here:
[Mon Feb 04 07:21:15 2002] [error] [client 65.94.4.72] (2)No such file or
directory: could not open dbm auth file: /home/apmail/bugdbaccounts

I can't access the gnats bug database in "private" mode to edit bug reports.
The database seems to be there.  I'm guessing that this is a problem with
the recently introduced AuthDBMType not being set correctly on the removal
of mod_auth_db.

Joshua




Connection timed out: read_request_line() failed

2002-02-04 Thread Dwayne Miller

I'm getting this error in my log file when I post a form, but the code 
looks like it should be ignoring timeout errors.  Something is 
definitely wrong with the handling of the request because it appears 
that all of the form data is missing.

The full error message is...
[Mon Feb 04 09:00:03 2002] [error] [client 127.0.0.1] (32560)Connection 
timed out: read_request_line() failed

This is a build of the latest tarball (2.0.31) running on Win2000 system.

Any thoughts on how to track down what is going on?






Re: WXP

2002-02-04 Thread William A. Rowe, Jr.

From: "Stipe Tolj" <[EMAIL PROTECTED]>
Sent: Monday, February 04, 2002 8:24 AM


> Ben Hyde wrote:
> > 
> > Rodent of Unusual Size wrote:
> >  > There's a FAQ I'm getting more and more to which I don't
> >  > know the answer; to wit, does Apache 1.3.* run on Windows XP?
> >  > What *is* the answer?
> > 
> > "Not known not to work."
> 
> at least our Cygwin 1.3 based port of 1.3.x works on Windows XP. So this
> is something like a "yeno".

Stipe, how many boxes had you tested yet, before you make that assertion?

About one dozen XP users (+ those who haven't checked in with us through
either bugs or c.i.s.w.ms-windows) have a very serious sockets bug that
results in corrupted -script- output (e.g. SHTML, PGP, etc.)  Cygwin now
essentially shares sockets code, so I'd consider your statement suspect.

FirstBill and I have banged our heads together and come up with nothing
useful yet.  Nobody in Bill's or my own work groups can reproduced the bug.
It's probably with a specific transport provider, but which one nobody can
isolate yet.

So, does it work on Cygwin?  About as well as XP - in that there is a buggy
driver out there to bite 'em in the arse.  And no, turning of QoS or other
driver extensions does not clear the bug, and no, you won't see it on any
localhost loopback requests.

The mystery...

nobody [on the very same boxes] with Apache 2.0.28 can reproduce =-/

Bill




RE: WXP

2002-02-04 Thread Ryan Bloom

I had 1.3.22 working on one of my XP boxes a few months ago.  It is a
real pity that I now have multiple XP machines, and just one lonely
Linux VM.  
:-(

Ryan
--
Ryan Bloom  [EMAIL PROTECTED]
645 Howard St.  [EMAIL PROTECTED]
San Francisco, CA 

> -Original Message-
> From: Stipe Tolj [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 04, 2002 6:24 AM
> To: [EMAIL PROTECTED]
> Subject: Re: WXP
> 
> Ben Hyde wrote:
> >
> > Rodent of Unusual Size wrote:
> >  > There's a FAQ I'm getting more and more to which I don't
> >  > know the answer; to wit, does Apache 1.3.* run on Windows XP?
> >  > What *is* the answer?
> >
> > "Not known not to work."
> 
> at least our Cygwin 1.3 based port of 1.3.x works on Windows XP. So
this
> is something like a "yeno".
> 
> Stipe




Re: WXP

2002-02-04 Thread Stipe Tolj

Ben Hyde wrote:
> 
> Rodent of Unusual Size wrote:
>  > There's a FAQ I'm getting more and more to which I don't
>  > know the answer; to wit, does Apache 1.3.* run on Windows XP?
>  > What *is* the answer?
> 
> "Not known not to work."

at least our Cygwin 1.3 based port of 1.3.x works on Windows XP. So this
is something like a "yeno".

Stipe



Re: WXP

2002-02-04 Thread Ben Hyde

Rodent of Unusual Size wrote:
 > There's a FAQ I'm getting more and more to which I don't
 > know the answer; to wit, does Apache 1.3.* run on Windows XP?
 > What *is* the answer?

"Not known not to work."



Re: pre-compiled binaries of apache for NextStep or OpenStep

2002-02-04 Thread Ben Hyde

Rodent of Unusual Size wrote:
> Not acked.  Is this a PMC decision?
...
 > From: Chris Swenson <[EMAIL PROTECTED]>
 ...
 > 
 > I noticed you no longer have pre-compiled binaries of Apache for NextStep 
 > or OpenStep available on the Apache website.  If a group of people (myself 
 > included) volunteered to compile the binaries of each Apache release for 
 > these OSes, would you be interested in distributing them on your website?
 > 
 > Thanks.
 > Chris Swenson
...

The policy: We, the HTTP project, distribute precompiled binaries only
from project committers or ASF members.

Trojan horse risks are one reason for this paranoia, but even small
tinkered with the as shipped build can create a problems.

  - ben




Re: cvs commit: httpd-2.0/modules/experimental mod_disk_cache.c

2002-02-04 Thread Martin Kraemer

On Mon, Feb 04, 2002 at 01:06:45PM -, [EMAIL PROTECTED] wrote:
>static const command_rec disk_cache_cmds[] =
>{
>   -AP_INIT_FLAG("CacheRoot", set_cache_root, NULL, RSRC_CONF,
>   +AP_INIT_FLAG1("CacheRoot", set_cache_root, NULL, RSRC_CONF,
> "The directory to store cache files"),

Uhm? Isn't that AP_INIT_TAKE1 ?

   Martin
-- 
<[EMAIL PROTECTED]> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany



Re: I'd like to release 1.3.24...

2002-02-04 Thread Jim Jagielski

>Here's a patch to bail out on ./Configure errors. Sorry about the >&3
>redirection, but without it, we would have to create an intermediate
>file (and need to prevent race conditions, need to clean up & all that).

Let me see look into this... I think there's a clearer way...

>Also, I added a 2>&1 redirection to Configure's sanity check report
>(without it, the "echo ===" output will not always be where the
>error output is).
>
>Should I commit?

+1 on this part
-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  "A society that will trade a little liberty for a little order
 will lose both and deserve neither" - T.Jefferson



Re: Apache 2_0_31 is now rolled

2002-02-04 Thread Jim Jagielski

> > From: Jim Jagielski [mailto:[EMAIL PROTECTED]]
> > 
> > Not sure what this "Roy himself" comment means... like it's some sort
> > of Voice From On High. When did the opinion of any one person, no
> > matter who, become Gospel? 
> 

Just to be clear, the above wasn't, in any way, a slam on Roy. If Ryan
had said "Bill" or "Greg" or "Jim" or "Zipperhead" I would have responded
the same way :)

-- 
===
   Jim Jagielski   [|]   [EMAIL PROTECTED]   [|]   http://www.jaguNET.com/
  "A society that will trade a little liberty for a little order
 will lose both and deserve neither" - T.Jefferson



Re: [PATCH] SSL_* in suexec safe env list

2002-02-04 Thread Martin Kraemer

On Sun, Feb 03, 2002 at 12:37:58PM -0500, Joshua Slive wrote:
> 
> > From: Zvi Har'El [mailto:[EMAIL PROTECTED]]
> 
> > triple rather then
> > double strncmp:
> >
> > -if (!strncmp(*ep, "HTTP_", 5)) {
> > +if (!strncmp(*ep, "HTTP_", 5) || !strncmp(*ep, "HTTPS", 5) ||
(no, not like that. not strncmp, but strcmp(*ep, "HTTPS")
> > +   !strncmp(*ep, "SSL_", 4)) {
> 
> As I said, I'm not going to commit without two "+1"s.
> 
> 
> Index: suexec.c
> ===
> RCS file: /home/cvs/httpd-2.0/support/suexec.c,v
> retrieving revision 1.17
> diff -u -d -b -r1.17 suexec.c
> --- suexec.c22 Nov 2001 07:42:13 -  1.17
> +++ suexec.c3 Feb 2002 17:30:13 -
> @@ -136,6 +136,7 @@
>  "DOCUMENT_URI",
>  "FILEPATH_INFO",
>  "GATEWAY_INTERFACE",
> +"HTTPS",
>  "LAST_MODIFIED",
>  "PATH_INFO",
>  "PATH_TRANSLATED",

Yep, that's cleaner. +1.

  Martin
-- 
<[EMAIL PROTECTED]> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany



[PATCH] Re: I'd like to release 1.3.24...

2002-02-04 Thread Martin Kraemer

On Mon, Feb 04, 2002 at 01:58:25PM +0100, Kraemer, Martin wrote:
> Here's a patch to bail out on ./Configure errors. Sorry about the >&3
> redirection, but without it, we would have to create an intermediate
> file (and need to prevent race conditions, need to clean up & all that).

Only I forgot to add [PATCH] to the subject line. For the patch, see the
previous mail.

   Martin
-- 
<[EMAIL PROTECTED]> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany



Re: I'd like to release 1.3.24...

2002-02-04 Thread Martin Kraemer

Here's a patch to bail out on ./Configure errors. Sorry about the >&3
redirection, but without it, we would have to create an intermediate
file (and need to prevent race conditions, need to clean up & all that).

Also, I added a 2>&1 redirection to Configure's sanity check report
(without it, the "echo ===" output will not always be where the
error output is).

Should I commit?

   Martin
-- 
<[EMAIL PROTECTED]> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany


Index: configure
===
RCS file: /home/cvs/apache-1.3/configure,v
retrieving revision 1.133
diff -u -r1.133 configure
--- configure   27 Sep 2001 18:12:03 -  1.133
+++ configure   4 Feb 2002 12:54:24 -
@@ -1582,14 +1582,15 @@
 if [ "x$verbose" = "xyes" ]; then
 vflag="-v";
 fi
-if [ "x$quiet" = "xyes" ]; then
-(cd $src; ./Configure ${vflag} -file Configuration.apaci >/dev/null);
+rc=`if [ "x$quiet" = "xyes" ]; then
+(cd $src; ./Configure ${vflag} -file Configuration.apaci >/dev/null; echo $? >&3; 
+);
 else
-(cd $src; ./Configure ${vflag} -file Configuration.apaci |\
+(cd $src; ( ./Configure ${vflag} -file Configuration.apaci; echo $? >&3; ) |\
  sed -e '/^Using config file:.*/d' \
  -e "s:Makefile in :Makefile in $src\\/:" \
  -e "s:Makefile\$:Makefile in $src:")
-fi
+fi 3>&1 1>&2`
+[ $rc = 0 ] || exit 1
 
 ##
 ##  final hints
Index: src/Configure
===
RCS file: /home/cvs/apache-1.3/src/Configure,v
retrieving revision 1.449
diff -u -r1.449 Configure
--- src/Configure   1 Feb 2002 02:27:04 -   1.449
+++ src/Configure   4 Feb 2002 12:54:25 -
@@ -2398,7 +2398,7 @@
   echo "** Apache requires an ANSI C Compiler, such as gcc. "
   echo ""
   echo " Error Output for sanity check "
-  (./helpers/TestCompile -v sanity)
+  (./helpers/TestCompile -v sanity) 2>&1
   echo "= End of Error Report ="
   echo ""
   echo " Aborting!"



Re: I'd like to release 1.3.24...

2002-02-04 Thread Martin Kraemer

On Sat, Feb 02, 2002 at 04:34:14PM -0500, Rodent of Unusual Size wrote:
> 
> if [ "x$quiet" = "xyes" ]; then
> (cd $src; \
>  ./Configure ${vflag} -file Configuration.apaci >/dev/null || \
>  exit $?);
> else

Nope -- this will do the same as it did: terminate the subshell
with an error (which is ignored).
You could do...
if [ "x$quiet" = "xyes" ]; then
(cd $src; ./Configure ${vflag} -file Configuration.apaci >/dev/null) || exit;
-either-
else
(cd $src; ./Configure ${vflag} -file Configuration.apaci |\
 sed -e '/^Using config file:.*/d' \
 -e "s:Makefile in :Makefile in $src\\/:" \
 -e "s:Makefile\$:Makefile in $src:")
fi || exit
or-^^^

But the "else" branch is more tricky, as you said.

   Martin
-- 
<[EMAIL PROTECTED]> | Fujitsu Siemens
Fon: +49-89-636-46021, FAX: +49-89-636-47655 | 81730  Munich,  Germany