Re: Apache::Icon fix

2000-08-23 Thread George Sanderson

Update:
Apache/1.3.12 (Unix) mod_perl/1.24_01-dev/Perl-5.6.0/linux-2.2.14.
(mod_perl linked statically.) with Icon.pm.

I hope I am not bugging anyone with my problem and I appreciate any help.

I have made some progress isolating the problem.  

With a minimal config. (with only Apache::Icon loaded), it's directives are
not recognized after:
 "kill -HUP httpd-pid"  

The error_log.test output was:
Syntax error on line 17 of /usr/local/apache/conf/httpd.try:
Invalid command 'AddIconByEncoding', perhaps mis-spelled or defined by a
module not included in the server configuration

Hence the httpd (apache) processes terminate.

If I comment out all of the Icon directives, the SIGHUP works.

Of course, when I just launch httpd for the first time, every thing is fine.
Here is my minimal httpd.conf file:

LoadModule config_log_modulelibexec/mod_log_config.so
LoadModule access_modulelibexec/mod_access.so
LoadModule dir_module   libexec/mod_dir.so
ClearModuleList
AddModule mod_log_config.c
AddModule mod_dir.c
AddModule mod_access.c
AddModule mod_so.c
AddModule mod_perl.c
DocumentRoot /home/httpd/test/htdocs
DirectoryIndex index.html index.htm index.shtml index.cgi Default.htm
default.htm
PerlModule Apache::Icon
#
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/tar.gif .tar
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/text.gif .txt
DefaultIcon /icons/unknown.gif
#
ServerType standalone
Port 81
HostnameLookups off
User webuser
Group webgroup
ServerAdmin [EMAIL PROTECTED]
ServerRoot /usr/local/apache
ErrorLog logs/error_log.test
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log.test combined
PidFile logs/httpd.pid.test
ScoreBoardFile logs/httpd.scoreboard.test
LockFile logs/httpd.lock.test
ServerName test.xorgate.com
UseCanonicalName on
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 4
MaxSpareServers 10
StartServers 6
MaxClients 50
MaxRequestsPerChild 200








Re: Apache::Icon fix

2000-08-21 Thread George Sanderson

I have to admit that a lot of this stuff is a mistry.
Recap:
My configuration is: apache_1.3.12/mod_perl-1.24/Perl-5.6.0/linux-2.2.14.
(I have mod_perl linked statically.) with Apache::AutoIndex.pm loaded.

Doug, could you please explain what problem(s) your patch solved?

I applied the patch below to Apache-Icon-0.02\Icon.xs, but all the Apache
processes still die when I do "kill -HUP ###" on the Apache root PID.

I noticed that when the order of the httpd.conf following two directives is
(as you stated):
 PerlModule Apache::Icon
 PerlModule Apache::AutoIndex
"apachectl start" produces the same error_log entry as my "kill -HUP ###",
namely:

Syntax error on line 156 of /usr/local/apache/conf/httpd.conf:
Invalid command 'IndexOptions', perhaps mis-spelled or defined by a module
not included in the server configuration

However, with the order of the two directives reversed (as follows):
   PerlModule Apache::AutoIndex
   PerlModule Apache::Icon
The launch is just fine. [The SIGHUP still fail however:[

Recap:
My configuration is: apache_1.3.12/mod_perl-1.24/Perl-5.6.0/linux-2.2.14.
(I have mod_perl linked statically.)

I noticed that you are using development code with DSO.  Perhaps I am
missing some other patch that would alow it to work.  Is the stability of
DSO mod_perl improving?

I remember reading that when httpd is started, it runs the init twice in
order to verity that it can survive a SIGHUP.  If this is the case, why
would the SIGHUP fail?

 
At 10:04 AM 8/21/00 -0700, Doug MacEachern <[EMAIL PROTECTED]> wrote:
>with the patch below, Apache::Icon/Apache::AutoIndex works fine for me.
>running apache_1.3.13-dev, mod_perl-1.24_01-dev, perl-current (5.7.0-dev)
>mod_perl built with EVERYTHING=1, USE_DSO=1
>
>copy-n-pasted config from Apache::AutoIndex/README:
>  PerlModule Apache::Icon
>  PerlModule Apache::AutoIndex
>
>  PerlTransHandler Apache::AutoIndex::transhandler
>  PerlHandler Apache::AutoIndex
>
>kill -HUP works just fine too.
>
>--- Icon.xs 1999/01/18 19:21:46 1.1.1.1
>+++ Icon.xs 2000/08/21 16:50:04
>@@ -18,6 +18,12 @@
> 
> PROTOTYPES: DISABLE
> 
>+void
>+END()
>+
>+CODE:
>+ap_remove_module(&icon_module);
>+
> Apache::Icon
> new(class, r=default_r)
> char *class
> 




Apache::Icon fix

2000-08-21 Thread Doug MacEachern

with the patch below, Apache::Icon/Apache::AutoIndex works fine for me.
running apache_1.3.13-dev, mod_perl-1.24_01-dev, perl-current (5.7.0-dev)
mod_perl built with EVERYTHING=1, USE_DSO=1

copy-n-pasted config from Apache::AutoIndex/README:
  PerlModule Apache::Icon
  PerlModule Apache::AutoIndex

  PerlTransHandler Apache::AutoIndex::transhandler
  PerlHandler Apache::AutoIndex

kill -HUP works just fine too.

--- Icon.xs 1999/01/18 19:21:46 1.1.1.1
+++ Icon.xs 2000/08/21 16:50:04
@@ -18,6 +18,12 @@
 
 PROTOTYPES: DISABLE
 
+void
+END()
+
+CODE:
+ap_remove_module(&icon_module);
+
 Apache::Icon
 new(class, r=default_r)
 char *class