Re: mod_python 3.2.10 available for testing

2006-07-20 Thread Jorey Bump

+1 Linux Slackware 10.1, Apache 2.0.55 (mpm-prefork), Python 2.4.1

Jim Gallacher wrote:

The mod_python 3.2.10 tarball is available for testing.

Part way through the release process for 3.2.9 a fix was found for
several memory leaks (MODPYTHON-172). We've decided to skip the official
3.2.9 release and proceed directly to 3.2.10, which is the same as 3.2.9
but with the leak fixes back-ported from trunk.

Here are the rules:

In order for a file to be officially announced, it has to be tested by
developers on the dev list. Anyone subscribed to this list can (and
should feel obligated to :-) ) test it, and provide feedback *to _this_
 list*! (Not the [EMAIL PROTECTED] list, and preferably not me
personally).

The files are (temporarily) available here:

http://people.apache.org/~jgallacher/mod_python/dist/
http://people.apache.org/~jgallacher/mod_python/dist/mod_python-3.2.10.tgz
http://people.apache.org/~jgallacher/mod_python/dist/mod_python-3.2.10.tgz.md5

Please download it, then do the usual

$ ./configure --with-apxs=/wherever/it/is
$ make
$ (su)
# make install

Then (as non-root user!)

$ cd test
$ python test.py

And see if any tests fail. If they pass, send a +1 to the list, if they
fail, send the details (the versions of OS, Apache, Apache-mpm, Python,
the test output, and suggestions, if any).

Please present your test results in the following format:
+1 OS version, Apache version (apache mpm), Python Version

For example:
+1 Linux Debian Sid, Apache 2.0.55 (mpm-worker), Python 2.3.5

Presenting your information in a consistent format will help in
tabulating the results. You can include additional information in each
section, just don't use extra commas. There is no need to include the
mod_python version in this string as that information is available in
the email subject. Who knows, one day I may actually write a script to
extract this information automatically. :)

Thank you for your assistance,
Jim Gallacher




RE: [TALLY] Release mod_aspdotnet build 2004?

2006-07-20 Thread Trent Nelson

 Feel free to chip in, I'd be more than happy to vote +1 for the module
 if I knew how to get it up and running and test it with even a hello
 world ASP. I had a brief look, and it seemed like a lot of effort. You
 could document that, and it might make it easier for testers.

Here are the steps I took to get .netCHARTING working with
mod_aspdotnet:

1.  Download and install latest Win32 2.2.2 Apache binary.

2.  Download .netCHARTING 4.0 evaluation version for .NET 1.1 from
http://www.dotnetcharting.com/download.aspx.

3.  Unzip somewhere, e.g. c:\dotnetcharting.

4.  Edit httdp.conf and add the following:

# ASP.NET Configuration
LoadModule aspdotnet_module modules/mod_aspdotnet.so

AddHandler asp.net asax ascx ashx asmx aspx aspxauth axd config cs
csproj \
   licx rem resources resx soap vb vbproj vsdisco
webinfo

IfModule mod_aspdotnet.cpp

AspNetVersion v1.1.4322

AspNetMount /dotnetcharting C:/dotnetcharting

Alias /dotnetcharting C:/dotnetcharting

Directory C:/dotnetcharting
Options FollowSymlinks ExecCGI
Order allow,deny
Allow from all
DirectoryIndex Default.htm Default.aspx
/Directory

# For all virtual ASP.NET webs, we need the aspnet_client files 
# to serve the client-side helper scripts.
AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) \
C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4
Directory \
  C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles
Options FollowSymlinks
Order allow,deny
Allow from all
/Directory

/IfModule

5. Restart httpd and visit http://localhost/dotnetcharting.

And that's all that needs to be done.


Trent.


RE: [TALLY] Release mod_aspdotnet build 2004?

2006-07-20 Thread Trent Nelson

Erm, missed a slightly important step.

 1.  Download and install latest Win32 2.2.2 Apache binary.

1.5.  Download and install mod_aspdotnet binary for Apache 2.x.

 2.  Download .netCHARTING 4.0 evaluation version for .NET 1.1 from
 http://www.dotnetcharting.com/download.aspx.




Re: [TALLY] Release mod_aspdotnet build 2004?

2006-07-20 Thread Colm MacCarthaigh
On Thu, Jul 20, 2006 at 01:09:19PM +0200, Trent Nelson wrote:
 1.  Download and install latest Win32 2.2.2 Apache binary.

o.k., well that's a bad start, but I can handle building an Apache
binary :-)

 2.  Download .netCHARTING 4.0 evaluation version for .NET 1.1 from
 http://www.dotnetcharting.com/download.aspx.

They want my email address, so that's a non-starter. Are there any other
ASP applications, liberally licensed, that would serve as a good test?

 3.  Unzip somewhere, e.g. c:\dotnetcharting.
 
 4.  Edit httdp.conf and add the following:
 
 # ASP.NET Configuration
 LoadModule aspdotnet_module modules/mod_aspdotnet.so

How did you compile it?

 AddHandler asp.net asax ascx ashx asmx aspx aspxauth axd config cs
 csproj \
licx rem resources resx soap vb vbproj vsdisco
 webinfo
 
 IfModule mod_aspdotnet.cpp
 
 AspNetVersion v1.1.4322
 
 AspNetMount /dotnetcharting C:/dotnetcharting
 
 Alias /dotnetcharting C:/dotnetcharting
 
 Directory C:/dotnetcharting
 Options FollowSymlinks ExecCGI
 Order allow,deny
 Allow from all
 DirectoryIndex Default.htm Default.aspx
 /Directory
 
 # For all virtual ASP.NET webs, we need the aspnet_client files 
 # to serve the client-side helper scripts.
 AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) \
 C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4
 Directory \
   C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles
 Options FollowSymlinks
 Order allow,deny
 Allow from all
 /Directory
 
 /IfModule
 
 5. Restart httpd and visit http://localhost/dotnetcharting.

Cool :)

-- 
Colm MacCárthaighPublic Key: [EMAIL PROTECTED]


Re: mod_python 3.2.10 available for testing

2006-07-20 Thread Graham Dumpleton

+1 MacOSX 10.4.7 PPC, Apache 2.2.1 (mpm-prefork), Python 2.3.5
+1 MacOSX 10.4.7 PPC, Apache 2.2.1 (mpm-worker), Python 2.3.5

On 20/07/2006, at 4:11 AM, Jim Gallacher wrote:


The mod_python 3.2.10 tarball is available for testing.

Part way through the release process for 3.2.9 a fix was found for
several memory leaks (MODPYTHON-172). We've decided to skip the  
official
3.2.9 release and proceed directly to 3.2.10, which is the same as  
3.2.9

but with the leak fixes back-ported from trunk.

Here are the rules:

In order for a file to be officially announced, it has to be tested by
developers on the dev list. Anyone subscribed to this list can (and
should feel obligated to :-) ) test it, and provide feedback *to  
_this_

 list*! (Not the [EMAIL PROTECTED] list, and preferably not me
personally).

The files are (temporarily) available here:

http://people.apache.org/~jgallacher/mod_python/dist/
http://people.apache.org/~jgallacher/mod_python/dist/ 
mod_python-3.2.10.tgz
http://people.apache.org/~jgallacher/mod_python/dist/ 
mod_python-3.2.10.tgz.md5


Please download it, then do the usual

$ ./configure --with-apxs=/wherever/it/is
$ make
$ (su)
# make install

Then (as non-root user!)

$ cd test
$ python test.py

And see if any tests fail. If they pass, send a +1 to the list, if  
they
fail, send the details (the versions of OS, Apache, Apache-mpm,  
Python,

the test output, and suggestions, if any).

Please present your test results in the following format:
+1 OS version, Apache version (apache mpm), Python Version

For example:
+1 Linux Debian Sid, Apache 2.0.55 (mpm-worker), Python 2.3.5

Presenting your information in a consistent format will help in
tabulating the results. You can include additional information in each
section, just don't use extra commas. There is no need to include the
mod_python version in this string as that information is available in
the email subject. Who knows, one day I may actually write a script to
extract this information automatically. :)

Thank you for your assistance,
Jim Gallacher




Re: svn commit: r423886 - in /httpd/httpd/trunk: CHANGES server/request.c

2006-07-20 Thread Joe Orton
On Thu, Jul 20, 2006 at 11:01:08AM -, [EMAIL PROTECTED] wrote:
 Author: rpluem
 Date: Thu Jul 20 04:01:07 2006
 New Revision: 423886
 
 URL: http://svn.apache.org/viewvc?rev=423886view=rev
 Log:
 * Check for symbolic links of the target file in the optimized case that we
   had already done this specific directory walk for this request. This can
   happen when we have an internal redirect, like the ones caused by mod_dir
   (/ - index.html). See also
 
   http://mail-archives.apache.org/mod_mbox/httpd-dev/200607.mbox/[EMAIL 
 PROTECTED]
 
   If we do not do this we have a security hole as the FollowSymLinks and
   SymLinksIfOwnerMatch settings can circumvented this way.

I think it's a *very* bad idea to imply that SymLinksIfOwnerMatch is a 
security feature.

If you did want to call this a security feature then you also need to 
fix the big fat race condition inbetween all those nice careful stat() 
calls and the default handler going to open the file.  Which I doubt 
would be simple to say the least.

I'd stay well clear of the word security here.

joe


Re: svn commit: r423444 - in /httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem: ./ Makefile.in config5.m4 mod_plainmem.c mod_scoreboard.c mod_sharedmem.c slotmem.h

2006-07-20 Thread Ruediger Pluem
Some comments inline.

Regards

Rüdiger


On 19.07.2006 14:18, [EMAIL PROTECTED] wrote:
 Author: jfclere
 Date: Wed Jul 19 05:18:10 2006
 New Revision: 423444

 --- httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_plainmem.c 
 (added)
 +++ httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_plainmem.c 
 Wed Jul 19 05:18:10 2006
 @@ -0,0 +1,145 @@
 +/* Copyright 1999-2006 The Apache Software Foundation or its licensors, as
 + * applicable.
 + *
 + * Licensed under the Apache License, Version 2.0 (the License);
 + * you may not use this file except in compliance with the License.
 + * You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an AS IS BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.

Please use the latest header approved by the board in all files.

 +}
 +static apr_status_t ap_slotmem_create(ap_slotmem_t **new, const char *name, 
 apr_size_t item_size, int item_num, apr_pool_t *pool)
 +{
 +void *slotmem = NULL;
 +ap_slotmem_t *res;
 +ap_slotmem_t *next = globallistmem;
 +char *fname;
 +apr_status_t rv;
 +
 +fname = ap_server_root_relative(pool, name);
 +
 +/* first try to attach to existing slotmem */
 +if (next) {
 +for (;;) {
 +if (strcmp(next-name, fname) == 0) {
 +/* we already have it */
 +*new = next;
 +return APR_SUCCESS;
 +}
 +if (next-next)

Shouldn't this be (!next-next)?

 +break;
 +next = next-next;
 +}
 +}
 +
 +/* create the memory using the globalpool */
 +res = (ap_slotmem_t *) apr_pcalloc(globalpool, sizeof(ap_slotmem_t));
 +res-base =  apr_pcalloc(globalpool, item_size * item_num);
 +if (!res-base)
 +return APR_ENOSHMAVAIL;
 +memset(res-base, 0, item_size * item_num);

Is this needed? You did a calloc.

 +
 +/* For the chained slotmem stuff */
 +res-name = apr_pstrdup(globalpool, fname);
 +res-size = item_size;
 +res-num = item_num;
 +res-next = NULL;
 +if (globallistmem==NULL)
 +globallistmem = res;
 +else
 +next-next = res;
 +
 +*new = res;
 +return APR_SUCCESS;
 +}
 +static apr_status_t ap_slotmem_mem(ap_slotmem_t *score, int id, void**mem)
 +{
 +
 +void *ptr = score-base + score-size * id;
 +
 +if (!score)
 +return APR_ENOSHMAVAIL;

Shouldn't this check happen before assigning a value to ptr?


 
 Added: 
 httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c
 URL: 
 http://svn.apache.org/viewvc/httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c?rev=423444view=auto
 ==
 --- httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c 
 (added)
 +++ httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c 
 Wed Jul 19 05:18:10 2006

 +static apr_status_t ap_slotmem_mem(ap_slotmem_t *score, int id, void**mem)
 +{
 +void *ptr;
 +if (!score)
 +return APR_ENOSHMAVAIL;
 +
 +#if PROXY_HAS_SCOREBOARD
 +if (ap_scoreboard_image)
 +ptr = (void *)ap_get_scoreboard_lb(id);
 +#else
 +return APR_ENOSHMAVAIL;
 +#endif
 +
 +if (!ptr)
 +return APR_ENOSHMAVAIL;
 +*mem = ptr;
 +ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
 +ap_slotmem_mem: score %d, score);

Shouldn't this be APLOG_DEBUG?


 
 Added: httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_sharedmem.c
 URL: 
 http://svn.apache.org/viewvc/httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_sharedmem.c?rev=423444view=auto
 ==
 --- httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_sharedmem.c 
 (added)
 +++ httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_sharedmem.c 
 Wed Jul 19 05:18:10 2006



 +static apr_status_t ap_slotmem_create(ap_slotmem_t **new, const char *name, 
 apr_size_t item_size, int item_num, apr_pool_t *pool)
 +{
 +void *slotmem = NULL;
 +ap_slotmem_t *res;
 +ap_slotmem_t *next = globallistmem;
 +char *fname;
 +apr_status_t rv;
 +
 +fname = ap_server_root_relative(pool, name);
 +
 +/* first try to attach to existing slotmem */
 +if (next) {
 +for (;;) {
 +if (strcmp(next-name, fname) == 0) {
 +/* we already have it */
 +*new = next;
 +return APR_SUCCESS;
 +}
 +if (next-next)

Shouldn't this be (!next-next)?

 +break;
 +next = next-next;
 +}
 +}
 +
 + 

Re: svn commit: r423886 - in /httpd/httpd/trunk: CHANGES server/request.c

2006-07-20 Thread Ruediger Pluem
On 20.07.2006 14:04, Joe Orton wrote:


 
 I think it's a *very* bad idea to imply that SymLinksIfOwnerMatch is a 
 security feature.
 
 If you did want to call this a security feature then you also need to 
 fix the big fat race condition inbetween all those nice careful stat() 
 calls and the default handler going to open the file.  Which I doubt 
 would be simple to say the least.

This is true.

 
 I'd stay well clear of the word security here.

I guess I can't change the log entry anymore. All I can do is adjust the CHANGES
entry. Would that address your concerns?

Regards

Rüdiger



Re: [TALLY] Release mod_aspdotnet build 2004?

2006-07-20 Thread Jorge Schrauwen
The Microsoft Atlast samples will be a good test aswel:http://atlas.asp.net/Default.aspx?tabid=47On 7/20/06, 
Colm MacCarthaigh [EMAIL PROTECTED] wrote:
On Thu, Jul 20, 2006 at 01:09:19PM +0200, Trent Nelson wrote: 1.Download and install latest Win32 2.2.2 Apache binary.o.k., well that's a bad start, but I can handle building an Apachebinary :-)
 2.Download .netCHARTING 4.0 evaluation version for .NET 1.1 from http://www.dotnetcharting.com/download.aspx.They want my email address, so that's a non-starter. Are there any other
ASP applications, liberally licensed, that would serve as a good test? 3.Unzip somewhere, e.g. c:\dotnetcharting. 4.Edit httdp.conf and add the following: # 
ASP.NET Configuration LoadModule aspdotnet_module modules/mod_aspdotnet.soHow did you compile it? AddHandler asp.net asax ascx ashx asmx aspx aspxauth axd config cs
 csproj \licx rem resources resx soap vb vbproj vsdisco webinfo IfModule mod_aspdotnet.cpp AspNetVersion v1.1.4322 AspNetMount /dotnetcharting C:/dotnetcharting
 Alias /dotnetcharting C:/dotnetcharting Directory C:/dotnetcharting Options FollowSymlinks ExecCGI Order allow,deny
 Allow from all DirectoryIndex Default.htm Default.aspx /Directory # For all virtual ASP.NET webs, we need the aspnet_client files
 # to serve the client-side helper scripts. AliasMatch /aspnet_client/system_web/(\d+)_(\d+)_(\d+)_(\d+)/(.*) \ C:/Windows/Microsoft.NET/Framework/v$1.$2.$3/ASP.NETClientFiles/$4
 Directory \ C:/Windows/Microsoft.NET/Framework/v*/ASP.NETClientFiles Options FollowSymlinks Order allow,deny Allow from all
 /Directory /IfModule 5. Restart httpd and visit http://localhost/dotnetcharting.Cool :)--Colm MacCárthaighPublic Key: 
[EMAIL PROTECTED]-- ~Jorge


Re: 2.0.x

2006-07-20 Thread Ruediger Pluem
 On 07/19/2006 10:25 PM, William A. Rowe, Jr. wrote:
 Ruediger Pluem wrote:

 On 19.07.2006 17:38, William A. Rowe, Jr. wrote:

 Actually, does this handle the nested case (more than one level depth?)


 Which case exactly do you have in mind?


 I have to investigate which modules can cause redirects similar to
 mod_dir's
 internal redirect, but the gist is Directory /webcontent, user accesses
 /one/document.html, user is served /two/document.html from a redirect,
 where
 document.html in /webcontent/two/ is our evil symlink.

 Just to be sure that we are on the same page:

As I have not heard any further comments and the tests submitted by Kanagasabai
are passed I committed the patch to trunk (r423886). Please find attached
the flavours of this patch for 2.0.58 and 2.2.2.
Please let me know if you think that I should place them into the patches
directory for 2.0.58 / 2.2.2.


Regards

Rüdiger
--- server/request.c2006-04-24 19:12:21.0 +0200
+++ server/request.c2006-07-20 14:34:33.0 +0200
@@ -558,17 +558,50 @@
  (!r-path_info || !*r-path_info)))
  (cache-dir_conf_tested == sec_ent)
  (strcmp(entry_dir, cache-cached) == 0)) {
+int familar = 0;
+
 /* Well this looks really familiar!  If our end-result (per_dir_result)
  * didn't change, we have absolutely nothing to do :)
  * Otherwise (as is the case with most dir_merged/file_merged requests)
  * we must merge our dir_conf_merged onto this new r-per_dir_config.
  */
 if (r-per_dir_config == cache-per_dir_result) {
-return OK;
+familar = 1;
 }
 
 if (r-per_dir_config == cache-dir_conf_merged) {
 r-per_dir_config = cache-per_dir_result;
+familar = 1;
+}
+
+if (familar) {
+apr_finfo_t thisinfo;
+int res;
+allow_options_t opts;
+core_dir_config *this_dir;
+
+this_dir = ap_get_module_config(r-per_dir_config, core_module);
+opts = this_dir-opts;
+/*
+ * If Symlinks are allowed in general we do not need the following
+ * check.
+ */
+if (!(opts  OPT_SYM_LINKS)) {
+apr_stat(thisinfo, r-filename,
+ APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK,
+ r-pool);
+if (thisinfo.filetype == APR_LNK) {
+/* Is this a possibly acceptable symlink? */
+if ((res = resolve_symlink(r-filename, thisinfo,
+   opts, r-pool)) != OK) {
+ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+  Symbolic link not allowed 
+  or link target not accessible: %s,
+  r-filename);
+return r-status = res;
+}
+}
+}
 return OK;
 }
 
--- server/request.c2006-04-22 03:53:06.0 +0200
+++ server/request.c2006-07-20 14:34:56.0 +0200
@@ -562,17 +562,50 @@
  (!r-path_info || !*r-path_info)))
  (cache-dir_conf_tested == sec_ent)
  (strcmp(entry_dir, cache-cached) == 0)) {
+int familar = 0;
+
 /* Well this looks really familiar!  If our end-result (per_dir_result)
  * didn't change, we have absolutely nothing to do :)
  * Otherwise (as is the case with most dir_merged/file_merged requests)
  * we must merge our dir_conf_merged onto this new r-per_dir_config.
  */
 if (r-per_dir_config == cache-per_dir_result) {
-return OK;
+familar = 1;
 }
 
 if (r-per_dir_config == cache-dir_conf_merged) {
 r-per_dir_config = cache-per_dir_result;
+familar = 1;
+}
+
+if (familar) {
+apr_finfo_t thisinfo;
+int res;
+allow_options_t opts;
+core_dir_config *this_dir;
+
+this_dir = ap_get_module_config(r-per_dir_config, core_module);
+opts = this_dir-opts;
+/*
+ * If Symlinks are allowed in general we do not need the following
+ * check.
+ */
+if (!(opts  OPT_SYM_LINKS)) {
+apr_stat(thisinfo, r-filename,
+ APR_FINFO_MIN | APR_FINFO_NAME | APR_FINFO_LINK,
+ r-pool);
+if (thisinfo.filetype == APR_LNK) {
+/* Is this a possibly acceptable symlink? */
+if ((res = resolve_symlink(r-filename, thisinfo,
+   opts, r-pool)) != OK) {
+ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
+  Symbolic link not allowed 
+  

Re: [RELEASE CANDIDATE] libapreq2 2.08-RC4

2006-07-20 Thread Randy Kobes

On Thu, 20 Jul 2006, Philip M. Gollucci wrote:


Steve Hay wrote:

repeatedly from the glue/perl sub-directory and see whether or not it
ever fails for you.  Did you get round to trying that?

Just did.  24 times.  100% success.
My usual combination of things.


Like Steve, I still see this failing occasionally on Win32,
but not in a predictable manner. And it's not always the
same file that fails in the upload test. I'll try some
things to try to make it reproduceable in the next couple
of days, but if that doesn't pan out, I wouldn't want this
to hold up the release.

--
best regards,
Randy


Re: svn commit: r423886 - in /httpd/httpd/trunk: CHANGES server/request.c

2006-07-20 Thread Justin Erenkrantz

On 7/20/06, Ruediger Pluem [EMAIL PROTECTED] wrote:

I guess I can't change the log entry anymore. All I can do is adjust the CHANGES
entry. Would that address your concerns?


svn propchange --revprop -r423886 svn:log https://svn.apache.org/repos/asf/

HTH.  -- justin


Re: svn commit: r423886 - in /httpd/httpd/trunk: CHANGES server/request.c

2006-07-20 Thread Garrett Rooney

On 7/20/06, Ruediger Pluem [EMAIL PROTECTED] wrote:


I guess I can't change the log entry anymore. All I can do is adjust the CHANGES
entry. Would that address your concerns?


Actually you can change the log entry.  Try 'svn pedit --revprop -r REVISION'

-garrett


RE: [TALLY] Release mod_aspdotnet build 2004?

2006-07-20 Thread Trent Nelson
 On Thu, Jul 20, 2006 at 01:09:19PM +0200, Trent Nelson wrote:
  1.  Download and install latest Win32 2.2.2 Apache binary.
 
 o.k., well that's a bad start, but I can handle building an Apache
 binary :-)

Yah, I was just recalling what I did; if you want to build directly you're more 
than welcome :)

  2.  Download .netCHARTING 4.0 evaluation version for .NET 1.1 from
  http://www.dotnetcharting.com/download.aspx.
 
 They want my email address, so that's a non-starter. Are there any other
 ASP applications, liberally licensed, that would serve as a good test?

Yeah, it's a commercial product, so you'd be downloading the eval version.  
Microsoft released a whole bunch of ASP.NET 1.1 webapps you could try:

http://www.asp.net/downloads/default11.aspx

I recall trying the 'Issue Tracker' and 'Portal Starter Kit' but didn't 
actually have any luck getting them running; wasn't sure if it was a 
mod_aspdotnet thing or something else, though.  Didn't pursue it as all the 
.NET webapps that I wanted to run, ran ;-)
 
  # ASP.NET Configuration
  LoadModule aspdotnet_module modules/mod_aspdotnet.so
 
 How did you compile it?

I used the binary installer Bill provided.  Didn't have any inclination to 
build it given that it needs VS .NET 2002, and the installer worked fine.

 Colm MacCárthaigh

Trent.


Re: svn commit: r423444 - in /httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem: ./ Makefile.in config5.m4 mod_plainmem.c mod_scoreboard.c mod_sharedmem.c slotmem.h

2006-07-20 Thread Brian Akins

Ruediger Pluem wrote:

  +static apr_status_t ap_slotmem_create(ap_slotmem_t **new, const char 
*name, apr_size_t item_size, int item_num, apr_pool_t *pool)


In my thought of a slotmem or scoreboard item_num is max threads * 
max procs just like the normal scoreboard. Or has this morphed into 
something completely different?  I can see uses for this type as well. 
Would be nice to have a function somewhere to get the current 
connections scoreboard slot perhaps...


--
Brian Akins
Chief Operations Engineer
Turner Digital Media Technologies


[PATCH] revamped mod_disk_cache directory structure

2006-07-20 Thread Davi Arnaut
Hi,

This patch converts the mod_disk_cache cache directory structure to a
uniformly distributed two level hierarchy. The admin specifies the number
of level-1 and level-2 directories and the files are scattered across
the level-2 directories.

Also, with this patch it is possible to designate directories to separate
partitions because the temporary files are created on the destination
directory.

For example, running Apache/proxy+cache for a small network:

[EMAIL PROTECTED] cache]# sh files-per-directory.sh 
dir: 00/ subs: 139 files: 632 size: 4.8M
dir: 01/ subs: 156 files: 765 size: 5.7M
dir: 02/ subs: 144 files: 626 size: 4.8M
dir: 03/ subs: 160 files: 714 size: 6.1M
dir: 04/ subs: 169 files: 820 size: 5.9M
dir: 05/ subs: 131 files: 590 size: 4.1M
dir: 06/ subs: 148 files: 677 size: 5.3M
dir: 07/ subs: 142 files: 644 size: 5.8M
dir: 08/ subs: 148 files: 749 size: 5.8M
dir: 09/ subs: 158 files: 711 size: 6.3M
dir: 0A/ subs: 146 files: 666 size: 5.1M
dir: 0B/ subs: 157 files: 701 size: 5.1M
dir: 0C/ subs: 157 files: 671 size: 5.2M
dir: 0D/ subs: 157 files: 711 size: 5.7M
dir: 0E/ subs: 149 files: 704 size: 5.6M
dir: 0F/ subs: 158 files: 742 size: 5.8M

--
Davi Arnaut

Index: modules/cache/cache_util.c
===
--- modules/cache/cache_util.c  (revision 423984)
+++ modules/cache/cache_util.c  (working copy)
@@ -19,6 +19,7 @@
 #include mod_cache.h
 
 #include ap_provider.h
+#include util_md5.h
 
 /* -- */
 
@@ -489,54 +490,31 @@
 y[sizeof(j) * 2] = '\0';
 }
 
-static void cache_hash(const char *it, char *val, int ndepth, int nlength)
+static unsigned int cdb_string_hash(const char *str)
 {
-apr_md5_ctx_t context;
-unsigned char digest[16];
-char tmp[22];
-int i, k, d;
-unsigned int x;
-static const char enc_table[64] =
-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_@;
+unsigned int hash = 5381;
 
-apr_md5_init(context);
-apr_md5_update(context, (const unsigned char *) it, strlen(it));
-apr_md5_final(digest, context);
+while (*str)
+hash = 33 * hash + *str++;
 
-/* encode 128 bits as 22 characters, using a modified uuencoding
- * the encoding is 3 bytes - 4 characters* i.e. 128 bits is
- * 5 x 3 bytes + 1 byte - 5 * 4 characters + 2 characters
- */
-for (i = 0, k = 0; i  15; i += 3) {
-x = (digest[i]  16) | (digest[i + 1]  8) | digest[i + 2];
-tmp[k++] = enc_table[x  18];
-tmp[k++] = enc_table[(x  12)  0x3f];
-tmp[k++] = enc_table[(x  6)  0x3f];
-tmp[k++] = enc_table[x  0x3f];
-}
-
-/* one byte left */
-x = digest[15];
-tmp[k++] = enc_table[x  2];/* use up 6 bits */
-tmp[k++] = enc_table[(x  4)  0x3f];
-
-/* now split into directory levels */
-for (i = k = d = 0; d  ndepth; ++d) {
-memcpy(val[i], tmp[k], nlength);
-k += nlength;
-val[i + nlength] = '/';
-i += nlength + 1;
-}
-memcpy(val[i], tmp[k], 22 - k);
-val[i + 22 - k] = '\0';
+return hash;
 }
 
-CACHE_DECLARE(char *)ap_cache_generate_name(apr_pool_t *p, int dirlevels,
-int dirlength, const char *name)
+CACHE_DECLARE(char *)ap_cache_generate_name(apr_pool_t *p, unsigned int L1,
+unsigned int L2, const char *name)
 {
-char hashfile[66];
-cache_hash(name, hashfile, dirlevels, dirlength);
-return apr_pstrdup(p, hashfile);
+char *key;
+char *md5_hash;
+unsigned int cdb_hash;
+
+md5_hash = ap_md5_binary(p, (unsigned char *) name, (int) strlen(name));
+
+cdb_hash = cdb_string_hash(md5_hash) / L2;
+
+key = apr_psprintf(p, %02X/%02X/%s, (cdb_hash / L2) % L1,
+   cdb_hash % L2, md5_hash);
+
+return key;
 }
 
 /* Create a new table consisting of those elements from an input
Index: modules/cache/mod_cache.h
===
--- modules/cache/mod_cache.h   (revision 423984)
+++ modules/cache/mod_cache.h   (working copy)
@@ -274,8 +274,8 @@
 
 CACHE_DECLARE(apr_time_t) ap_cache_hex2usec(const char *x);
 CACHE_DECLARE(void) ap_cache_usec2hex(apr_time_t j, char *y);
-CACHE_DECLARE(char *) ap_cache_generate_name(apr_pool_t *p, int dirlevels, 
- int dirlength, 
+CACHE_DECLARE(char *) ap_cache_generate_name(apr_pool_t *p, unsigned int L1,
+ unsigned int L2,
  const char *name);
 CACHE_DECLARE(cache_provider_list *)ap_cache_get_providers(request_rec *r, 
cache_server_conf *conf, apr_uri_t uri);
 CACHE_DECLARE(int) ap_cache_liststr(apr_pool_t *p, const char *list,
Index: modules/cache/mod_disk_cache.c
===
--- modules/cache/mod_disk_cache.c  (revision 

Re: [TALLY] Release mod_aspdotnet build 2004?

2006-07-20 Thread William A. Rowe, Jr.

Colm MacCarthaigh wrote:

On Thu, Jul 20, 2006 at 01:09:19PM +0200, Trent Nelson wrote:


2.  Download .netCHARTING 4.0 evaluation version for .NET 1.1 from
http://www.dotnetcharting.com/download.aspx.


They want my email address, so that's a non-starter. Are there any other
ASP applications, liberally licensed, that would serve as a good test?


Assuming you have Windows, you have no trouble obtaining one of the .NET
SDK's (not the Windows Platform SDK, but the .NET SDK with C#, VB.NET,
samples, etc etc) - you will find two trees in that install; QuickStart\,
and Samples\.  You can make either of those an Alias + AspNetMount, enable
AspNet Files in the appropriate directory , and run either the MakeAll.bat
file or just nmake the makefile in the sample/quickstart directory you want
to take for a spin.

If you install VisualStudio .NET (2002) or later - you probably already
installed the .NET SDK as part of that installation... so it comes free.


4.  Edit httdp.conf and add the following:

# ASP.NET Configuration
LoadModule aspdotnet_module modules/mod_aspdotnet.so


How did you compile it?


This user likely didn't.  Most users likely won't.  To compile it, install
the original VisualStudio .NET (at least the C/C++ and .NET components of the
product) and simply follow the instructions in the tarball's README.

Now - I realize it's almost absurd to ask people to go back to the original
.NET version of VisualStudio (2002) but you have to recognize that Microsoft
substantially redesigned *the language C++.NET* between 2002 and 2003, and
started virtually from scratch between 2003 and 2005 Visual Studio.

If this project had the wherewithal to oversee mod_aspdotnet, the next step
of it's evolution was clearly identified as migrating to 2005.  There is the
'light' version available of C++.NET.  But it's not a trivial migration, and
not worth my time or effort if the module's not hanging around (hell - I wasted
too many cycles on preparing to release build 2004 and updating all of the
documentation contexts as well to integrate it better into the httpd project).
So, this was my basis for a 'last call' on the VisualStudio .NET 2002 flavor,
with every major problem for the VS .NET/2002 builds resolved.

So do what every project asks you to do, read the README in the .zip ball :)
Note that it's out of date in one respect; installer (now compiled from the
InstallShield 11.5 flavor) can no longer integrate into the build schema.  You
would get more out of reading the 'deployment notes' section of;

http://svn.apache.org/repos/asf/httpd/mod_aspdotnet/trunk/README.txt

Since README is out-of-date with respect to installer; I'll whack that note.

Bill




Re: [PATCH] revamped mod_disk_cache directory structure

2006-07-20 Thread Colm MacCarthaigh
On Thu, Jul 20, 2006 at 11:58:01AM -0300, Davi Arnaut wrote:
 Also, with this patch it is possible to designate directories to separate
 partitions because the temporary files are created on the destination
 directory.

I'm not sure it goes far enough though. What if an admin has two
filesystems/disks they can to store the cache on, or what if it's 7?
What if one is a 160GB filesystem and the other only 10GB?  If we're
going to tackle these kind problems, we need to look at how things like
diablo (which gets it right IMO) do it.

-- 
Colm MacCárthaighPublic Key: [EMAIL PROTECTED]


Re: [TALLY] Release mod_aspdotnet build 2004?

2006-07-20 Thread William A. Rowe, Jr.

William A. Rowe, Jr. wrote:


So do what every project asks you to do, read the README in the .zip ball :)
Note that it's out of date in one respect; installer (now compiled from the
InstallShield 11.5 flavor) can no longer integrate into the build 
schema.  You

would get more out of reading the 'deployment notes' section of;

http://svn.apache.org/repos/asf/httpd/mod_aspdotnet/trunk/README.txt

Since README is out-of-date with respect to installer; I'll whack that 
note.


Update committed, thanks for your question that triggered a revisit, Colm :)


Re: Mixing module and httpd builds with different MS C runtime libs

2006-07-20 Thread William A. Rowe, Jr.

As a general rule, any module which uses strictly the apr API with all
apr objects, and it's own choice of API's with it's internal objects,
will be just fine no matter which compiler it is built with.

The calls you are looking for are apr_os_{xxx}() invocations which extract
system resources or inject them into an apr object.  If the compiled module
is using the posix API emulated objects implemented in the MSVCRT or MSVCR##
runtime, and expects APR to share them as well, then you are going to find
trouble when they are allocated under one version and used or freed in
a different version of the crt.

Note, this even includes malloc() and free()!!!  socket handles, FD_SET's
too do very interesting things when you cross crt's.  That includes crossing
release and debug versions of the same crt.

So treat an httpd object, or apr object with due care and don't try to break
the opacity of the apr internals :)

mod_aspdotnet, for example, has always been built under MSVCR70, while it will
run just fine with an httpd built on MSVCRT or MSVCR80.  No issues, because we
don't break the rule above.

If you ever wondered why do openssl and some other libraries have some bizzaro
malloc_init function to set up malloc/calloc/realloc/free function pointers???
- now you know half the reason :)  The other reason is that if the code is
built static, it's not nice to use the local module's static malloc/free at
the same time as the malloc/free engine of the environment it's hosted in.

Trent Nelson wrote:

If I've compiled httpd/apr with VS 2005, is that likely to adversely
affect my ability to use modules built against different MS CRTs (i.e.
VC6 or .NET 2002/2003)?  And vice versa, too; using modules built with
VS 2005 against httpd/apr binaries built against earlier CRTs.

(And while we're at it, how do httpd and apr fare if they're built w/
different compilers and runtime libs?)

It seems that in general, most open source communities are quite slow to
adopt newer compilers/devenvs for their official binaries; perl 
python and their associated httpd modules, svn etc all seem to be
sticking to VC6 (or, less commonly, 0VC7/7.1).


From what I've seen, if an application is attempting to load DLLs built

with VS 2005 against MSCRT8, it will also need to be built against the
same CRT so that it honors the new .manifest loading procedures.

Anyone else care to share their experience or thoughts on the matter?

Trent.

.





Re: svn commit: r423444 - in /httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem: ./ Makefile.in config5.m4 mod_plainmem.c mod_scoreboard.c mod_sharedmem.c slotmem.h

2006-07-20 Thread Jean-frederic Clere

Ruediger Pluem wrote:


Some comments inline.

Regards
 


Many thanks

Cheers

Jean-Frederic


Rüdiger


On 19.07.2006 14:18, [EMAIL PROTECTED] wrote:
 


Author: jfclere
Date: Wed Jul 19 05:18:10 2006
New Revision: 423444
   



 


--- httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_plainmem.c 
(added)
+++ httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_plainmem.c Wed 
Jul 19 05:18:10 2006
@@ -0,0 +1,145 @@
+/* Copyright 1999-2006 The Apache Software Foundation or its licensors, as
+ * applicable.
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
   



Please use the latest header approved by the board in all files.
 


Done.

 


+}
+static apr_status_t ap_slotmem_create(ap_slotmem_t **new, const char *name, 
apr_size_t item_size, int item_num, apr_pool_t *pool)
+{
+void *slotmem = NULL;
+ap_slotmem_t *res;
+ap_slotmem_t *next = globallistmem;
+char *fname;
+apr_status_t rv;
+
+fname = ap_server_root_relative(pool, name);
+
+/* first try to attach to existing slotmem */
+if (next) {
+for (;;) {
+if (strcmp(next-name, fname) == 0) {
+/* we already have it */
+*new = next;
+return APR_SUCCESS;
+}
+if (next-next)
   



Shouldn't this be (!next-next)?
 


Yep.

 


+break;
+next = next-next;
+}
+}
+
+/* create the memory using the globalpool */
+res = (ap_slotmem_t *) apr_pcalloc(globalpool, sizeof(ap_slotmem_t));
+res-base =  apr_pcalloc(globalpool, item_size * item_num);
+if (!res-base)
+return APR_ENOSHMAVAIL;
+memset(res-base, 0, item_size * item_num);
   



Is this needed? You did a calloc.
 


Argh too fast in reusing the shared memory code.

 


+
+/* For the chained slotmem stuff */
+res-name = apr_pstrdup(globalpool, fname);
+res-size = item_size;
+res-num = item_num;
+res-next = NULL;
+if (globallistmem==NULL)
+globallistmem = res;
+else
+next-next = res;
+
+*new = res;
+return APR_SUCCESS;
+}
+static apr_status_t ap_slotmem_mem(ap_slotmem_t *score, int id, void**mem)
+{
+
+void *ptr = score-base + score-size * id;
+
+if (!score)
+return APR_ENOSHMAVAIL;
   



Shouldn't this check happen before assigning a value to ptr?
 


Well after all the checks.



 


Added: httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c?rev=423444view=auto
==
--- httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c 
(added)
+++ httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_scoreboard.c 
Wed Jul 19 05:18:10 2006
   



 


+static apr_status_t ap_slotmem_mem(ap_slotmem_t *score, int id, void**mem)
+{
+void *ptr;
+if (!score)
+return APR_ENOSHMAVAIL;
+
+#if PROXY_HAS_SCOREBOARD
+if (ap_scoreboard_image)
+ptr = (void *)ap_get_scoreboard_lb(id);
+#else
+return APR_ENOSHMAVAIL;
+#endif
+
+if (!ptr)
+return APR_ENOSHMAVAIL;
+*mem = ptr;
+ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL,
+ap_slotmem_mem: score %d, score);
   



Shouldn't this be APLOG_DEBUG?
 


I have removed the ap_log_error().



 


Added: httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_sharedmem.c
URL: 
http://svn.apache.org/viewvc/httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_sharedmem.c?rev=423444view=auto
==
--- httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_sharedmem.c 
(added)
+++ httpd/httpd/branches/httpd-proxy-scoreboard/modules/mem/mod_sharedmem.c Wed 
Jul 19 05:18:10 2006

   




 


+static apr_status_t ap_slotmem_create(ap_slotmem_t **new, const char *name, 
apr_size_t item_size, int item_num, apr_pool_t *pool)
+{
+void *slotmem = NULL;
+ap_slotmem_t *res;
+ap_slotmem_t *next = globallistmem;
+char *fname;
+apr_status_t rv;
+
+fname = ap_server_root_relative(pool, name);
+
+/* first try to attach to existing slotmem */
+if (next) {
+for (;;) {
+if (strcmp(next-name, fname) == 0) {
+/* we already have it */
+*new = next;
+return APR_SUCCESS;
+ 

Re: Re[2]: apache 2.2 crashes at the start time in mod_dbd.c then preparing AuthDBDUserPWQuery

2006-07-20 Thread Brian J. France

I think this is the same issue I had:

http://www.mail-archive.com/dev@httpd.apache.org/msg31299.html

Not sure if there was a fix committed into the code tree or not.

Brian


On Jul 20, 2006, at 3:52 PM, Anton Golubev wrote:


Hello Nick,

Here is here the minimal complete config, which crashes the server:

DBDriver mysql
DBDParams dbname=Users user=auther passreplace=IrjkfN3
DBDMin 1
DBDKeep 2
DBDMax 10
DBDExptime 60

ServerRoot /usr/local/apache

Listen 80

User nobody
Group nobody

ServerAdmin [EMAIL PROTECTED]
NameVirtualHost 85.142.33.11

VirtualHost 85.142.33.11
DocumentRoot /home/ivc2/public_html

Directory /home/ivc2/public_html

AuthType Basic
AuthName 'ADMIN ZONE'
AuthBasicProvider dbd

AuthDBDUserPWQuery select PASS from Users where LOGIN= %s

/Directory

/VirtualHost


Another backtrace:

(gdb) run -f /usr/local/apache/conf/httpd-mini.conf
Starting program: /usr/local/apache2_2/bin/httpd -f /usr/local/ 
apache/conf/httpd-mini.conf

[Thread debugging using libthread_db enabled]
[New Thread -1208047936 (LWP 449)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208047936 (LWP 449)]
ap_dbd_prepare (s=0x0, query=0x9aa64f8 select PASS from Users  
where LOGIN= %s, label=0x9aa64f8 select PASS from Users where  
LOGIN= %s) at mod_dbd.c:149

149 prepared-next = svr-prepared;
(gdb) bt
#0  ap_dbd_prepare (s=0x0, query=0x9aa64f8 select PASS from Users  
where LOGIN= %s, label=0x9aa64f8 select PASS from Users where  
LOGIN= %s)

at mod_dbd.c:149
#1  0x08080415 in authn_dbd_prepare (cmd=0xbfef6c70, cfg=0x9aa64f0,  
query=0x9aa64f8 select PASS from Users where LOGIN= %s) at  
mod_authn_dbd.c:70
#2  0x0807880b in invoke_cmd (cmd=0x80d30a0, parms=0xbfef6c70,  
mconfig=0x9aa64f0, args=0x9a937a0 ) at config.c:873
#3  0x08079075 in ap_walk_config (current=0x9a93758,  
parms=0xbfef6c70, section_vector=0x9aa5fb0) at config.c:1141
#4  0x08070d09 in dirsection (cmd=0xbfef6c70, mconfig=0x9aa5a88,  
arg=0x9aa6256 ) at core.c:1865
#5  0x0807880b in invoke_cmd (cmd=0x80d0a80, parms=0xbfef6c70,  
mconfig=0x9aa5a88, args=0x9a93670 /home/ivc2/public_html) at  
config.c:873
#6  0x08079075 in ap_walk_config (current=0x9a93650,  
parms=0xbfef6c70, section_vector=0x9aa56f0) at config.c:1141
#7  0x08071553 in virtualhost_section (cmd=0xbfef6c70,  
dummy=0x9a8efe8, arg=0x9a935e8 85.142.33.11) at core.c:2206
#8  0x0807880b in invoke_cmd (cmd=0x80d0ab0, parms=0xbfef6c70,  
mconfig=0x9a8efe8, args=0x9a935e8 85.142.33.11) at config.c:873
#9  0x08079075 in ap_walk_config (current=0x9a935c8,  
parms=0xbfef6c70, section_vector=0x9a8df00) at config.c:1141
#10 0x08079ace in ap_process_config_tree (s=0x9a4e570,  
conftree=0x9a932b8, p=0x9a430a8, ptemp=0x9a8b240) at config.c:1743

#11 0x08067eeb in main (argc=3, argv=0xbfef6dd4) at main.c:621
(gdb)


I'm wondering how could I catch it with so many people luckily using
this feature around? Otherwise I would be proud to be the first  
one! :)



Greets,
Anton Golubev
ENGECON
St. Petersburg
Russia





Re: [PATCH] revamped mod_disk_cache directory structure

2006-07-20 Thread Davi Arnaut


Em 20/07/2006, às 17:06, Colm MacCarthaigh escreveu:


On Thu, Jul 20, 2006 at 11:58:01AM -0300, Davi Arnaut wrote:
Also, with this patch it is possible to designate directories to  
separate

partitions because the temporary files are created on the destination
directory.


I'm not sure it goes far enough though. What if an admin has two
filesystems/disks they can to store the cache on, or what if it's 7?


CacheDirLevels n 256 for n = 1,2,...,7,...


What if one is a 160GB filesystem and the other only 10GB?


This was not the scope of the patch but it's one step towards. I  
think we

can add load balancing later.

If we're going to tackle these kind problems, we need to look at  
how things like

diablo (which gets it right IMO) do it.



diablo ? the game ? :-)

--
Davi Arnaut



Re: svn commit: r423886 - in /httpd/httpd/trunk: CHANGES server/request.c

2006-07-20 Thread Ruediger Pluem


On 07/20/2006 06:11 PM, Garrett Rooney wrote:

 
 
 Actually you can change the log entry.  Try 'svn pedit --revprop -r
 REVISION'
 
 -garrett

Thanks for your help Garrett and Justin. I mixed both of your proposals
and it worked just fine :-)

Regards

Rüdiger



configuration directives redux

2006-07-20 Thread Chris Darroch
Hi --

   Some time ago, I proposed this large patchset (better described,
I think, by the message referenced by the second link below):

http://marc.theaimsgroup.com/?l=apache-httpd-devm=114729206702495w=2
http://marc.theaimsgroup.com/?l=apache-httpd-devm=114788040600327w=2

   Discussing the issues on IRC, I received a few responses, including
a long one from William A. Rowe, Jr.  His main point, I believe,
was that the order of configuration directives in the tree should
never be altered from what it is in the configuration files.  Therefore,
what the worker and event MPMs do now in their pre_config stages --
namely, re-ordering ThreadsPerChild ahead of MaxClients -- should not
be done.  Instead, all such order-dependent configuration directive
checking should be done in a post-config phase, either open_logs or
post_config.

   (Note, BTW, that the existing re-ordering is in fact insufficient,
because there are other dependencies between the four directives in
question: ServerLimit, ThreadLimit, MaxClients, and ThreadsPerChild.
Hence my original patchset proposed a standard ap_swap_nodes()
to perform all the re-ordering that seemed necessary.)


   Thinking about Bill's comments and doing some additional research,
I've come up with the following patch.  So far, I've just been working
on prefork; if it seems sensible, then I'll apply the same ideas to
the winnt, worker, and event MPMs, which all share the same essential
logic when it comes to these particular configuration directives.

   If some people could review this new approach, I'd really
appreciate it, because (among other things) I'd love to get this
item off my plate so I can move on to other stuff.  (I suppose I
could just do that anyway, but to me that feels like cheating.  :-)


   So, to aid with that, a few comments about what I'm attempting
to do in this patch.  First, from the second link above, I'm
trying to achieve items B and C:

 B) A fix for the following less-than-critical issue:
 
 I noticed that although there was
 usually a warning if one tried to change ServerLimit or ThreadLimit
 and restart the server, no warning appeared if one removed (e.g.,
 commented out) these directives and restarted.  Presumably,
 removing these directives implies the use of the default values,
 but if the server was originally configured with a non-default value,
 then a warning should probably appear.
 
 C) Attempting to ensure that after a restart, valid warning messages
always appear in the log files about any changes that the code
has made to the configured values for ServerLimit, ThreadLimit,
MaxClients, and ThreadsPerChild.  Warning messages are printed
to the console too, as before, but may not always be valid since
the original values of ServerLimit and ThreadLimit aren't
known to the process that prints them.

   (Item D doesn't apply anymore, since I'm looking to follow
Bill's advice on that score, and item A doesn't apply to prefork,
only worker and event.  I figured I'd start with prefork first,
though.)


   First, this patch moves all bounds and sanity checking on
MPM-related configuration directives into the open_logs phase.
That has the advantage that it can all be performed in order,
without swapping any configuration tree nodes.

   It also means that this checking gets performed regardless of
whether the user has defined a particular directive or not.  That
means that item B above gets fixed automatically.  Item A, for
the worker and event MPMs, will also get fixed in the same manner.
All that's required is to make sure that the default values for
all the directives are set properly in pre_config.  Then the
handlers for whatever directives are defined in the config files
run and change those values, and finally open_logs does all the
in-order bounds and sanity checking.


   Second, I studied the logic surrounding the changed_limit_at_restart
flag and whether it was still necessary.  Here I should perhaps
pause to quickly describe the four different conditions under which
these configuration handlers run (for the prefork, worker, and event
MPMs; winnt is a little different, I believe):

1) In the initial startup process, when stderr prints to the console.
2) In the main loop, after detaching from the startup process;
   stderr has been pointed to /dev/null in apr_proc_detach() in
   the pre_config phase.
3) In a separate process that signals the main running process to
   stop or restart.  Like condition 1, stderr prints to the console.
   The open_logs and post_config phases never run here because
   ap_signal_server() detects the running process, signals it, and exits.
4) In the main loop, after ap_mpm_run() returns because it's caught
   a restart signal, and the running process then re-reads the
   configuration files.

   The comment in set_server_limit() that the error log is a bit bucket
at this point actually refers to condition 4.  The issue at hand
is whether the running server, having detected a 

Re: svn commit: r423886 - in /httpd/httpd/trunk: CHANGES server/request.c

2006-07-20 Thread Ruediger Pluem


On 07/20/2006 02:04 PM, Joe Orton wrote:

 
 I think it's a *very* bad idea to imply that SymLinksIfOwnerMatch is a 
 security feature.
 
 If you did want to call this a security feature then you also need to 
 fix the big fat race condition inbetween all those nice careful stat() 
 calls and the default handler going to open the file.  Which I doubt 
 would be simple to say the least.
 
 I'd stay well clear of the word security here.

I adjusted the svn log message 
(http://svn.apache.org/viewvc?view=revrevision=423886)
and removed the word SECURITY from the CHANGES file 
(http://svn.apache.org/viewvc?view=revrevision=424084).
I hope this addresses your concerns.

Regards

Rüdiger



Re: apache 2.2 crashes at the start time in mod_dbd.c then preparing AuthDBDUserPWQuery

2006-07-20 Thread Nick Kew
On Thursday 20 July 2006 22:12, Brian J. France wrote:
 I think this is the same issue I had:

 http://www.mail-archive.com/dev@httpd.apache.org/msg31299.html

Hmmm, looks similar.  Your patch is slightly problematic because it
changes the API, albeit not substantially.

 On Jul 20, 2006, at 3:52 PM, Anton Golubev wrote:
  Hello Nick,
 
  Here is here the minimal complete config, which crashes the server:
 
  DBDriver mysql
  DBDParams dbname=Users user=auther passreplace=IrjkfN3
  DBDMin 1
  DBDKeep 2
  DBDMax 10
  DBDExptime 60

That's at top-level in the config, is it?

  NameVirtualHost 85.142.33.11
 
  VirtualHost 85.142.33.11
  DocumentRoot /home/ivc2/public_html
 
  Directory /home/ivc2/public_html
 
  AuthType Basic
  AuthName 'ADMIN ZONE'
  AuthBasicProvider dbd
 
  AuthDBDUserPWQuery select PASS from Users where LOGIN= %s
 
  /Directory
 
  /VirtualHost

OK, I'll try and see if I can get a crash with that.  My guess yesterday was
was that your DBDriver/Params were in a virtualhost but your 
AuthDBDUserPWQuery was outside it, but I tried that and it didn't crash.

-- 
Nick Kew


Re[4]: apache 2.2 crashes at the start time in mod_dbd.c then preparing AuthDBDUserPWQuery

2006-07-20 Thread Anton Golubev
Hi Brian,

It's the same, but I don't agree it is Virtual Host specific, as you
said.

This configuration (almost taken from documentation) also crashes the
server:


httpd-mini.conf


ServerRoot /usr/local/apache

Listen 80

User nobody
Group nobody

DocumentRoot /home/ivc2/public_html

DBDriver mysql
DBDParams dbname=Users user=auther passreplace=xx
DBDMin 1
DBDKeep 2
DBDMax 10
DBDExptime 60


Directory /home/ivc2/public_html

AuthType Basic
AuthName 'ADMIN ZONE'
AuthBasicProvider dbd
AuthDBDUserPWQuery select PASS from Users where LOGIN= %s
require valid-user

/Directory


Regards,
Anton



smime.p7s
Description: S/MIME Cryptographic Signature


Re: [PATCH] revamped mod_disk_cache directory structure

2006-07-20 Thread Colm MacCarthaigh
On Thu, Jul 20, 2006 at 06:16:26PM -0300, Davi Arnaut wrote:
 I'm not sure it goes far enough though. What if an admin has two
 filesystems/disks they can to store the cache on, or what if it's 7?
 
 CacheDirLevels n 256 for n = 1,2,...,7,...

Ahh, now I get it, cool.

 What if one is a 160GB filesystem and the other only 10GB?
 
 This was not the scope of the patch but it's one step towards. I
 think we can add load balancing later.

I think we'll need to change our syntax too, to mount cache areas
individually. Can be messy.

 If we're going to tackle these kind problems, we need to look at  how
 things like diablo (which gets it right IMO) do it.
 
 
 diablo ? the game ? :-)

Diablo the news server :-) http://www.openusenet.org/diablo/

-- 
Colm MacCárthaighPublic Key: [EMAIL PROTECTED]


Re: [RELEASE CANDIDATE] libapreq2 2.08-RC4

2006-07-20 Thread Bojan Smojver

Quoting Philip M. Gollucci [EMAIL PROTECTED]:


Please download, test, and VOTE  on the following
candidate tarball:

http://people.apache.org/~pgollucci/apreq2/libapreq2-2.08-RC4.tar.gz


The Fedora Extras package (development) will be available after signing.

--
Bojan