ANNOUNCE: Apache::OpenIndex 1.05

2002-09-04 Thread George Sanderson

Apache::OpenIndex version 1.05 was uploaded to CPAN on 02 Sep 02.
New features include:

A UserDir directive was added to support user home directories.
(Thank Noam Solomon for the spot.)

A UserSite directive was added to allow multiple users to share a common
GID and site directory while denying each user's access to the other user
sites.  (Before each user required a unique GID.)

More HtmlText directives were added to provide HTML just before each of the
form objects.  (Thank Noam Solomon for the suggestion.)

During my haste, I left the internal version number set at 1.04b.  This is
a unique version number, so the error should not cause any problems.
However, I hope to be patient and either provide a new update because any
bug fixes reported or simply upload a subversion with the correct version
number included (1.05) in the near future
 
As always (except for the last 3 days when my ISP mysteriously reconfigured
the DSLAM) a demo is available at:
http://www.xorgate.com/Apache/OpenIndex/demo





RE: cpan hacked or april fools?

2002-04-01 Thread George Sanderson

I'mamuzed!=)

At 12:49 AM 4/2/2002 +0100, Jonathan M. Hollin wrote:
Anyone looked at CPAN's front page today: www.cpan.org? It is 
either a pretty amusing April Fools joke or a hack. Fun either way!

It's gotta be an April Fools gag (great one).  The hackers almost always
leave their stamp...


Jonathan M. Hollin - WYPUG Co-ordinator

West Yorkshire Perl User Group
http://wypug.pm.org/
http://wypug.digital-word.com/
 
++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




If mod_perl module loaded from within httpd.conf

2002-03-13 Thread George Sanderson

What is the best way to check from within the httpd.conf file if a mod_perl
module is loaded.  For C modules, I can use:
IfModule mod_perl.c ... /IfModule
to conditionally load it's directives.
Is there a similar conditional syntax for the mod_perl script modules?
I only want a module's directives to be processed when that module is loaded.

++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




Re: PREANNOUNCE Tied Request and Cookies Module

2002-01-12 Thread George Sanderson

At 10:18 PM 1/7/2002 -0500, Jay Lawrence wrote:

I am thinking of names such as:

Apache::Request::Tied
or Apache::Args::Tied
and
Apache::Cookies::Tied
and
Apache::RequestFiles::Tied

or possibly:
Apache::Tied::Request, etc.

Any interest, comments, suggestions,

Personally, I like placing the most significant part first and using a
verb, so how about:
Apache::Tie::...
and so forth?


++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




Re: [VERY OT] How to Use Apache as a FTP server

2001-12-20 Thread George Sanderson

I somehow missed the first part of this email thread (from anandr).
The Apache::OpenIndex module (when loaded on the Apache server) provides a
way to upload and download files using a http browsers.
A demo is available at:

http://www.xorgate.com/Apache/OpenIndex

At 03:55 PM 12/19/2001 +0200, you wrote:
That's not mod-perl.  That's not even Apache.  Many popular web browsers 
have browsing features for anonymous FTP.  You need an FTP server for 
that.  Apache 2 will include an FTP server (I think), but for now, try 
wuftpd.

  Issac

anandr wrote:

Hi All,

I want to use my Apache as a ftp service also.
Can the ring help me.

I am running Apache 1.3.22 at port 80.

when I give http:///, I get the list of 
files in my htdocs.

Like wise when I give ftp:///, I need a 
list from my server folders.

Have look at this address,for what I am intending to 
do,..ftp://tiger.com.


With Regards,

Anand Ratnasabapathy,
DSM Soft(P)Ltd,
No:25,Nungambakkam High Road,
Chennai - 600 034.
http://www.dsmsoft.com


++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




ANNOUNCE: Apache::OpenIndex 1.03

2001-10-26 Thread George Sanderson

OpenIndex provides a file manager for an Apache modperl web site from a web
browser. 
OpenIndex also provides the same functionality as autoindex, therefore it
can be used to both manage and navigate a web site.

An Apache::OpenIndex (OpenIndex-1.03.tar.gz) update was uploaded to CPAN on
25 Oct 2001.  The module can also be downloaded at:

http://www.xorgate.com/Apache/OpenIndex/

OpenIndex now supports Cascading Style Sheets and individual HTML tab
configurable attributes. For example, you can now add TAG attributes like:
TAG attributes
or add TAG text, like:
TAG  text /TAG

Two new directives were added to support this feature:
IndexHtmlTagtagattributes
IndexHtmlText   tagtext

The following tags have attribute support:
head style frameset noframe body table form font 
input textarea th tr hr h1 h2 h3 td a p

The following tags have text support:
frame noframe style

The FoldersFirst index option was also added.

Again, a demo is available at:


http://www.xorgate.com/Apache/OpenIndex/demo
Enjoy:) 
++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




Please ignore this message (just a test)

2001-10-26 Thread George Sanderson

I previously sent two messages today and they did not appear on the list.
So I am sending this message as a simple test.

++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




ANNOUNCE: Apache::OpenIndex 1.03

2001-10-25 Thread George Sanderson

OpenIndex provides a file manager for an Apache modperl web site from a web
browser. 
OpenIndex also provides the same functionality as autoindex, therefore it
can be used to both manage and navigate a web site.

An Apache::OpenIndex (OpenIndex-1.03.tar.gz) update was uploaded to CPAN on
25 Oct 2001.  The module can also be downloaded at:

http://www.xorgate.com/Apache/OpenIndex/

OpenIndex now supports Cascading Style Sheets and individual HTML tab
configurable attributes. For example, you can now add TAG attributes like:
TAG attributes
or add TAG text, like:
TAG  text /TAG

Two new directives were added to support this feature:
IndexHtmlTagtagattributes
IndexHtmlText   tagtext

The following tags have attribute support:
head style frameset noframe body table form font 
input textarea th tr hr h1 h2 h3 td a p

The following tags have text support:
frame noframe style

The FoldersFirst index option was also added.

Again, a demo is available at:


http://www.xorgate.com/Apache/OpenIndex/demo
Enjoy:)
++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




ANNOUNCE: Apache::OpenIndex 1.02

2001-10-12 Thread George Sanderson

An Apache::OpenIndex (OpenIndex-1.02.tar.gz) update was uploaded to CPAN on
12Oct2001.  The module can also be downloaded at:
http://www.xorgate.com/Apache/OpenIndex/

This release fixed two bugs: 1) the directory and location Menu OpenIndex
directive only maintained one copy of the array.  2) The Copy command
could not copy files with spaces in their name.

A filter was added, to prevent non-admin users from creating any hidden
files or directories.

Again, a demo is available at:


http://www.xorgate.com/Apache/OpenIndex/demo

++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++

++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




[OT] Off Topic?

2001-10-11 Thread George Sanderson

Is there anything special about putting things, like, [OT] in the subject
line, other than being informative?

The reason I ask, is that I would like to send [OT] messages to the most
appropriate list.  

Is there a reference that provides a list of lists for apache.org that can
be used to direct the message to the most appropriate list?


++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




[OT] Overridding a module's use of a function

2001-10-11 Thread George Sanderson

I discovered that File::NCopy uses the function glob to expand file
names.  My problem is that I need to pass file names that have spaces in
them and glob does not process them.  So I did the following override (I
do not need to expand the file names):

package Apache::AAM;
. . .
package File::NCopy;
use subs qw(glob);
sub glob {@_};
package Apache::AAM;
. . .

Is there a better way to do this?

++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




ANNOUNCE: Apache::RedirectDBI 0.02

2001-10-05 Thread George Sanderson

I needed a module that would allow users' to login (authenticate) using a
single HREF link and then be redirected to their individual web site (URL).
I searched CPAN and found Apache::RedirectDBI.  It was very close to what I
needed, so I modified it so that it would read a URL field from the user's
DBI record and do an external REDIRECT to their site location.

In the process of upgrading the module, I thought to myself; self, it
would be nice if the cpan released module was updated..., so I fired off an
email to the author, Michael Smith.  Mike replied:
This is a bit of a blast from the past! I've not looked at it for quite 
some time (is it in my name on CPAN?)

Anyway, very happy to get your changes in to what's on CPAN ... or better 
still, hand it over to you. 

So that is what I did.  I contacted CPAN and uploaded
RedirectDBI-0.02.tar.gz on 05 Oct. 02 to CPAN.  (It will take a while for
it to show up on CPAN.)

The module is also available for download at:
http://www.xorgate.com/Apache/RedirectDBI

[I think that the Perl public community is really awesome. . .]


++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




ANNOUNCE: Apache::OpenIndex 1.01

2001-10-03 Thread George Sanderson

An Apache::OpenIndex (OpenIndex-1.01.tar.gz) update was uploaded to CPAN on
27Sep2001 and is currently available for cpan download. This release
includes some addational admin autherization checks and the patch provided
by Tatsuhiko Miyagawa, which allow the module to be compiled by Perl 5.005_03.
Thank you Tatsuhiko!

Again, a demo is available at:

http://www.xorgate.com/Apache/OpenIndex/demo

++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




RE: ANNOUNCE: Apache::OpenIndex

2001-10-02 Thread George Sanderson

At 07:37 PM 10/2/2001 +0100, you wrote:
  OpenIndex provides a file manager for an Apache modperl 
 web site using a
  web browser.

Looks good George

any plans to add better authentication (eg certificates) and to set it up
for secure SSL file transfers?

Clinton Gormley

Authentication and any other Apache service (SSL) are outside of scope of
OpenIndex.  The reason why a fake directory (default .XOI) is used to
access the site's files through OpenIndex, is to allow location and
directory Apache directives to provide the other desired services, while
they may not be required for the normal (http) site browser access.
Hope this answers your question.
 
++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




ANNOUNCE: Apache::OpenIndex

2001-09-27 Thread George Sanderson

Apache::OpenIndex (OpenIndex-1.00.tar.gz) was uploaded to CPAN on 14Sep2001
and is currently released.  This was my first module.  I enjoyed journey.

OpenIndex provides a file manager for an Apache modperl web site using a
web browser.
It is a extensive rewrite of the Apache::AutoIndex module (written by
Philippe M. Chiasson), which in turn was a remake of the autoindex Apache
module. 
OpenIndex also provides the same functionality as autoindex, therefore it
can be used to both manage and navigate a web site.

A demo is available at:

http://www.xorgate.com/Apache/OpenIndex/demo

++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




Re: Knowledge Base for 2.0

2001-09-17 Thread George Sanderson

On Sun, 16 Sep 2001, Jim wrote:

 I'll try to spit out some more thoughts as they come. Please feel 
 free to contribute. Now's the time to get the wish list put together.

Some ideas (from the user's perspective):

It would be nice if, the user interface provided a configuration and
version form that the user could select for responses.  For example, an
article may cover all Apache versions between certain version numbers, or
all versions above some value.

It would be nice if, a sort priority were available.  In other words, the
date of the article or the keywords may be most important. (etc.)

It would be nice if, the knowledge base could connect the information dots.
 In other words, would contain references (links) to related information.
Of these, Guide, Debugging, and  Archive  references would be useful.

It would be nice if, the information entered during a query could be used
to post to an email list.  In other words, if the user does not finding
useful information, that it would be easy to post a message,  that would
get human feedback.


++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




RFC: Apache::RedirectDBI mod

2001-09-13 Thread George Sanderson

I put my modified version 0.02 at http://www.xorgate.com/Apache/RedirectDBI
The original functionality was kept intact.
This version allows a DBI field to contain the URI to redirect the client
too, and also
provides for external REDIRECT.

Let me know what you think.
I am willing to take over the model, if that is acceptable.

-Original Message-
From: George Sanderson [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 13, 2001 12:12 AM
To: Michael Smith; [EMAIL PROTECTED]
Subject: Apache::RedirectDBI mod


I needed something close to what Apache::RedirectDBI provided.

I modified version 0.01 to allow it to get the URI from a DB field and also
to do an external REDIRECT.

The original functionality of the module should be maintained.

Let me know if you are interested in looking at the code.
Hi there,

This is a bit of a blast from the past!  I've not looked at it for quite
some time (is it in my name on CPAN?)

Anyway, very happy to get your changes in to what's on CPAN ... or better
still, hand it over to you.

Mike

http://www.iii.co.uk 
Interactive Investor International is a leading UK Internet personal 
finance service that provides individuals with the capability to identify, 
compare, monitor and buy online a number of financial products and services.

Interactive Investor Trading Limited, a subsidiary of Interactive Investor 
International plc, is regulated by the SFA.
 
++
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
++




Re: ANNOUNCE: Apache::OpenIndex

2001-09-08 Thread George Sanderson

At 03:18 PM 9/8/2001 +0800, you wrote:
 Apache::AutoIndex was never released to CPAN.

Hehe, funny, it sure look like it's still there ;-)

I'm sorry.  Of course what I meant to say was:
Apache::FileMan was never released to CPAN.

Also, for any of you trying to login to the demo late yesterday at:

http://www.xorgate.com/Apache/OpenIndex/demo
I made a password capital letter typo in the README file (at about the same
time I made the above typo) , which by the way, made all the difference in
the world when trying to login.  It was bad for only about an hour.


+==+
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com
+==+




ANNOUNCE: Apache::OpenIndex

2001-09-07 Thread George Sanderson

Back on 13 Dec 00, I posted the creation of module Apache::FileMan.pm.
Today, I 
ANNOUNCE that Apache::FileMan has been renamed to Apache::OpenIndex.  

The name change was made because, several software applications go by the
same name, 
one of which, provides the same basic functionality.  The name OpenIndex
was selected 
because it clearly follows from the name, Apache::AutoIndex, from which it
was derived.

Apache::AutoIndex was never released to CPAN.
 
I do plan to do a CPAN release Apache::OpenIndex on 14 Sep 01 (next Friday.)

DESCRIPTION:
OpenIndex provides a file manager for web sites through a web browser. It
is a extensive
rewrite of the Apache::AutoIndex.pm module (written by Philippe M.
Chiasson), which in
turn was a remake of the autoindex Apache module. It can provide the same
functionality
as AutoIndex.pm, therefore it can be used to both to navigate and manage
the web site.

The source is available at:

http://www.xorgate.com/Apache/OpenIndex

A full functioning demo is available at:

http://www.xorgate.com/Apache/OpenIndex/demo

Enjoy.

The name change carries with it configuration directive and default value
changes.
I hope the changes do not cause more problems than they solve.

All comments are welcomed.

Thank you all for bearing with me during this long development cycle.


+==+
| George Sanderson [EMAIL PROTECTED]
| http://www.xorgate.com/http://www.xorgate.com/
+==+




Re: RFC: Apache::FileMan 0.07

2001-09-03 Thread George Sanderson

It turns out that there are several software applications that go by the
name FileMan.

I have updated Apache::FileMan.pm to pre-release version 0.07. I 
substantially reorganized to code.

FileMan provides a file manager for a web site through a web browser. It 
is an extensive rewrite of the Apache::AutoIndex.pm module (written by 
Philippe M. Chiasson), which in turn was a remake of the autoindex Apache C 
module. FileMan can provide the same functionality as AutoIndex.pm, so it 
can be used to both navigate and manage a web site.


For example;

Date: Sun, 02 Sep 2001 18:57:00 -0700
From: Alex Krohn [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: FileMan

Hi George,

 I released an Apache modperl web file manager called FileMan on 13 Dec
00.
 It's demo is available at:
 
 www.xorgate.com/FileMan/demo
 I thing that we should resolve the name conflict, so that others will not
 get confused.

I had been meaning to email you as I am on the mod_perl list and caught
your announcement a while back. We've been using the name FileMan
since our first release back in September of 1998. You can see us in
third party listings like:

   http://cgi.resourceindex.com/Programs_and_Scripts/Perl/File_Management/
   http://www.hotscripts.com/Detailed/237.html

If there's any way you could change your projects name to something
else, I'd really appreciate it.

If you have any questions, please don't hesitate to ask.

Cheers,

Alex

Here is my short list of URLs that reference other FileMan applications:


http://www.gossamer-threads.com/scripts/index.htm

http://business.fortunecity.com/hearst/805/fileman.htm

http://thegururamana.enmail.com/Fileman.htm

http://www.hardhats.org/fileman/u1/index.html

http://www.tribbs.com/help/tri00018.htm

http://www.suse.de/en/produkte/susesoft/linux/Pakete_prof/paket_xfileman.html

The point is, that I think Apache::FileMan should be renamed, to something,
which easily distinguishes it from the others, yet at the same time, keeps
the name short and to the point, before releasing it to CPAN.

Here is a short list of names that might work.
NameComment
==
FileMan.pm  Of course, pm stands for Perl Module (not that different)
OpenIndex   This name maintains Index from AutoIndex.
XorfMan Just a thought.
FileMod Same initials,

Please comment if you have any preferences or other recommendations.
Also, please respond and let me know what you think of the current code:
good, bad, or ugly.

Thank you.





Re: [OT] Reference to a method using a scalar?

2001-09-03 Thread George Sanderson

Thank you, Andrew. 
Andrew, pointed out that Perl provides a way to delay the resolution of a
method.

Date: Sun, 19 Aug 2001 20:04:12 -0700 (PDT)
From: Andrew Ho [EMAIL PROTECTED]

George,

GSIn other words, I would like all my reference to be hard method
GSreferences which are developed from string scalars at run time (delayed
GSresolution and later dereferenced).

Perl allows you to delay resolution of a method until run-time: 
 
 $method = 'foo'; 
 $object-$method($a, $b, $c)
Humbly,

Andrew

--
Andrew Ho   http://www.tellme.com/   [EMAIL PROTECTED]

NOTE:
Above, I should have said subroutine in place of the word method, since
method implies OO referent calls.  Also, I did not understand delayed
resolution. (My mistake.)

I choose to implement the following (snip): 

no strict 'refs'; 
$Commands{$command}{cmd}=\$routine;  # $routine contains a string
use strict 'refs'; 
unless(defined {$Commands{$command}{cmd}}) { 
delete $Commands{$command}; # This is bad, so throw it away! 
warn $routine routine is not defined; 
}

for a couple of reasons. 
1) The methods are not OO (yet). 
2) The above assignment only happens during initialization.

[I learned a lot about OO Perl.]
Again, thanks, [done]

+===+
| George Sanderson [EMAIL PROTECTED] |
| http://www.xorgate.com/www.xorgate.com       |
+===+  



RFC: Apache::FileMan 0.07d

2001-08-30 Thread George Sanderson

I have updated Apache::FileMan.pm to pre-release version 0.07d.  I
substantially reorganized to code.

FileMan provides a file manager for a web sites through a web browser. It
is an extensive rewrite of the Apache::AutoIndex.pm module (written by
Philippe M. Chiasson), which in turn was a remake of the autoindex Apache C
module.  FileMan can provide the same functionality as AutoIndex.pm, so it
can be used to both to navigate and manage a web site.

This update includes HTML frame support, import of arbitrary menu commands,
and the HOLD directory was restructured to allow it to manage any directory
on the web server.

The source is available at:

http://www.xorgate.com/FileMan

A demo is also available.

I need help from others to fill in the FileMan.dic file for
Apache::Language with the language phrases.  I included all the English
entries.

I would like to release FileMan to CPAN.

Please provide any comments, suggestions, or feedback.
Thanks






[OT] Reference to a method using a scaler?

2001-08-19 Thread George Sanderson

I have a Perl scalar ($mystr) that holds a string.  I want to use the
scalar to form a hash reference to a method after the Perl code is compiled.

For example, when I know the method name before compile time, I can say:

use strict;
%Hashref=( Entry1={meth1=\method1, do='something'},);

and then later execute method1 by using:

$Hashref{Entry1}{meth1}($a,$b,$c);

How can I assign the hash method reference using the contents of the scalar
$mystr, in such a way, that I can use the same syntax to execute the method
name stored in $mystr.

NOTE: I have already used the following, but would prefer to use method
references for both:

$Hashref{Entry1}{meth1}=$mystr;
...
if(ref($Hashref{Entry1}{meth1}) eq 'CODE') {
$retval   =$Hashref{Entry1}{meth1}($a,$b,$c);
} else {
no strict 'refs';
$retval={$Hashref{Entry1}{meth1}}($a,$b,$c);
use strict 'refs';
}
Thanks in advance.





[ANNOUNCE] Apache::FileMan 0.06c

2001-02-22 Thread George Sanderson

FileMan provides a file manager for a web sites through a web browser. It
is a extensive rewrite of the Apache::AutoIndex.pm module (written by
Philippe M. Chiasson), which in turn was a remake of the autoindex Apache
module. FileMan can provide the same functionality as AutoIndex.pm and can
be used to both navigate and manage the web site.

This version (0.06c) corrects an Apache::Language problem displaying 1's.

Special thanks goes out to "Aaron Johnson" [EMAIL PROTECTED]  and his
co-worker 
Ken Clark (who work for ProVillage), for finding the Language problem and
making performance suggestions that have been incorporated.  The latest
release can be found at:
httpd://www.xorgate.com/FileMan
An on line demo is available at:
httpd://www.xorgate.com/FileMan/demo

If you have any questions, comments, or success stories please provide it
to me, so that a good user base can be established before committing the
code to CPAN.






Apache::Language STORE needs a language

2001-02-18 Thread George Sanderson

Problem solved:
I am using the latest version of Apache::Language
I noticed that the Apache::Language.pod says that the PlainFile format is:
phrase-id:lang-type

While the PlainFile.pod says:
lang-tag:phrase-id

The first one seems to work.

It works like Apache::Language::PlainFile describes: (lang-tag:phrase-id).

Also I am getting the following error:
warn] [Apache::Language (111)] STORE needs a language specification to work
for each phrase looked up.

After these messages I always get the dreaded:
child pid 12280 exit signal Segmentation fault (11)

My problems was that I did not have the negotiation_module loaded and
Options +MultiViews
specified in the httd.conf file.





Apache::Language STORE needs a language

2001-02-16 Thread George Sanderson

I am using the latest version of Apache::Language
I noticed that the Apache::Language.pod says that the PlainFile format is:
phrase-id:lang-type

While the PlainFile.pod says:
lang-tag:phrase-id

The first one seems to work.

Also I am getting the following error:
warn] [Apache::Language (111)] STORE needs a language specification to work
for each phrase looked up.

After these messages I always get the dreaded:
child pid 12280 exit signal Segmentation fault (11)

The the page then displays OK.

Any solutions?





RFC: Apache::FileMan 0.06

2001-02-13 Thread George Sanderson

I have updated Apache::FileMan.pm to pre-release version 0.06.

FileMan provides a file manager for a web sites through a web browser. It
is an extensive rewrite of the Apache::AutoIndex.pm module (written by
Philippe M. Chiasson), which in turn was a remake of the autoindex Apache C
module. FileMan can provide the same functionality as AutoIndex.pm, so it
can be used to both to navigate and manage a web site.

The source is available at:

http://www.xorgate.com/FileMan

A demo is also available.

I need help from others to fill in the FileMan.dic file for
Apache::Language phrases and nomenclature.  I have included all the English
entries, but have not a clue what to put in for the other languages.-)

Hopefully, I will be able to release this to CPAN in the near future.
Please provide any suggestions, feedback, or what ever.
Thanks.







Re: Apache FileMan

2001-02-12 Thread George Sanderson

At 02:25 PM 2/11/2001 +, you wrote:
George,

Just had a peek at your FileMan demo. Looks pretty neat. I too was about
to extend/rewrite Apache::AutoIndex to do some similar things. A few
questions

Does it use Apache::AutoIndex at all or is it a total rewrite ?
There was a lot to do, so I did an extensive rewrite and tried to maintain
the existing functionality.

What versions are you using ?  I'm running perl 5.6.0, mod_perl 1.25 and
apache 1.3.17. I just tried using AutoIndex and while it built OK, I got
a child seg fault (11) when I tried to access a directory. Whats your
setup ?

I am similar but at Apache 1.3.14 and mod_perl 1.24_01.
Try setting the following directive and let me know if you have better
success.
FileManOptions language 0
I will be updating Apache and mod_perl soon, but I also had seg faults when
using language.
However, I have been updating the code to include more Apache::Language
support, so I will be looking at this more.


How extensible is FileMan ? (I'm about to get the source). The thing I
wanted to do over AutoIndex was have control over the Description field
for each file. I want this to be a link to an RDF search engine I'm
thinking about, so each file would have a description like  ( e.g. dir =
/bar/baz )

I have not over ridden any of the functions within the module, but with the
latest code, I made the arguments to the internal menu commands have all
the same format.  My goal is to make it so the module OO in the future, but
I doubt that it is there today.
The description field works fine today, however.  Just try the classic
autoindex directives, such as
AddDescription "HTML text" .html .htm

Also a couple other points/suggestions.

- I was thinking about having the directory path across the top (where
you have "Directory index of x/y/z " ) into links also, like

Directory index of a href='/x/' x /a / a href='/y/' y /a / z

which would allow rapid movement around directory tree instead of
popping up via parent.

I am a little slow with suggestions, (it just a personal thing).  Do you
mean to have a go to root link?  (Kind of like a go to top for a long
page.)  Or are you suggesting dynamic book marks or some thing alone those
lines?

- I'd like the option to apply a CSS link to the directory page
What is a CSS link?

- Is it because its a demo or a fundamental aspect of the module that
when you go to the directory itself as a URL you don't get the FileMan
menu structure / form, i.e there is a distinction between /demo/foo/
and  /demo/.XFM/foo#root. Could the FileMan page be made the Directory
Index or am I missing something ?
The module uses the fake .XFM directory so that you can provide
authentication when accessing the root.  In other words, lets say you
wanted to set FileMan up to access http://www.website.com/users/john
You would have to access http://www.website.com/users/john/.XFM in order to
activate the file manager functionality.  This way if you require
authentication, you will need to apply it to
http://www.website.com/users/john/.XFM, that way hopefully only john will
have access to his files.

Anyway I might install your latest version and give it a go.

I will have an update available in about two days.





Re: httpd keeps crashing overnight

2001-01-19 Thread George Sanderson

Hi George,

Thanks for the reply...

 My problem is that the mod_perl httpd is sometimes crashing overnight. In
 the last three days, it has mysteriously crashed twice. When I restart it
 with "apachectl_modperl start" (apachectl_modperl is just apachectl but
 with the config file path set differently), it comes up with no problem,
 but I suppose it might crash again in the future.
 
 How long had it been running OK before you started having problems?
 Did something change just before the problem started occurring?

Previously, I only had one mod_perl httpd running on the system. I split
it into a non-mod_perl httpd and a mod_perl httpd because the system was
running out of memory.

This change happened 4 days ago. Before that, I did not have this crashing 
problem.

 What ports are you using for your httpd that does and does not have the
 problem?

Both httpds listen on port 80. The mod_perl enabled one listens on
216.74.79.145:80 and 216.74.79.194:80, while the non-mod_perl enabled one
listens on port 80 of all other IP addresses on the machine.

 Is there any indications in the access_log at about the time of the crash?

203.177.3.11 - - [19/Jan/2001:05:05:21 -0500] "GET /anime/seraphimcall/
HTTP/1.1" 200 3256 "http://www.animelyrics.com/anime/_S" "Mozilla/4.0
(compatible; MSIE 5.0; Windows 98; DigExt)"
207.35.188.14 - - [19/Jan/2001:08:40:20 -0500] "GET / HTTP/1.0" 200 6205
"-" "Mozilla/4.7 [en]C-CCK-MCD  (WinNT; U)"

Those are the two log entries for animelyrics.com before and after the
crash; I don't see anything unusual. I also looked at slayers.aaanime.net:

24.67.224.12 - - [19/Jan/2001:05:03:24 -0500] "GET
/~linazel/fanfics/fanfic.asp?fanfic=nobilitypart=10 HTTP/1.0" 200 15547
"http://slayers.aaanime.net/~linazel/fanfics/fanfic.asp?fanfic=nobilitypart
=9"
"Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; AtHome0107;
sureseeker.com; Hotbar 2.0)"
172.133.91.48 - - [19/Jan/2001:08:35:32 -0500] "GET 
/~linazel/banners/ybanner.gif HTTP/1.1" 200 20544 "-" "Opera/5.02 (Windows
98;
U)  [en]"

I don't see anything out of the ordinary here, either.

 Perhaps you could run a cron job to scan the processes in order narrow down
 the exact time of the problem.

What would I be looking for?
Is there any indication of a burst load (or a similar pattern) just before
crash?
Is there a back end data base involved?

It took about 4 hours before the httpd process was restarted.
It would be nice to know how long after the last request the httpd root
process crashed.  If a cron job ran once a minute to scan for the httpd
root process and report when it disappears, it might be a clue as to the
nature of the problem.  In the report you might want to include information
about the last 10 minutes (last 10 scans from temp files 1 through 10) of
all the httpd process running via the `ps -gaux|grep httpd`.  It would be
interesting to know how many httpd process were running and also what
`vmstat` had to say before and after the crash.

Often when trying to solve an intermittent problem, it is good, if you can
duplicate the problem a will.  The information obtained about the problem
should help you to achieve this.  

For example, the access_log indicates that the last browser access before
the problem were both:
"Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt;".
However, it is difficult to tell if this is just a coincidence or not until
a pattern can be established.






Re: [Fwd: AuthenDBI idea]

2001-01-17 Thread George Sanderson

At 08:37 PM 1/15/2001 -0800, you wrote:
On Mon, 15 Jan 2001, Edmund Mergl wrote:

 any comments ?

[count number of times a user has logged in and such things]

Hope I am not out of place here, and also that the ideas are generic enough
to be applied to a wide number of authentication requirements.

Here are two ideas.
I.=
The first idea for authentication: 
Provide a directive to perform a comparison on any or all fields of the
current user's record.  If the comparison is true, provide a URL to
REDIRECT the original request.

The supporting directives could be something like:
Auth_DBI_comp  {regexp}
Auth_DBI_url"http://www.redirect.com/ok/"

Where regexp is a comparison string and url is where to REDIRECT the user
if the comparison is true.

The original request URL should be passed as a url ? argument, so that a
REDIRECT cgi target script could determine the original requested url.  The
target script could update any fields as required.

The regexp needs to be able to easily access any arbitrary field values for
the current user's record. Perhaps simply by pre appending a '$' to the
field name.  For example:

Auth_DBI_comp {$username='xyz'  $usecount4}

This would REDIRECT every login with field "usercount" less than 4 for
field "username" equal 'xyz'.

A pass and fail condition would also be needed, perhaps just designated as
PASS and FAIL.

Being able to specify multiple conditions per authorization attempt would
be useful.

II.
A second idea (for authorization) is to provide a generic way to set an
Apache environment variable with the contents of any field for the current
user.  For example:

Auth_DBI_env  field1,field2

This would set two environment variables called: "FIELD1" and "FIELD2" with
their field data content of the current user's record.

I suppose if the data base had multiple records for a user, then the
environment variables would contain a list of values.







Re: FileMan - Not enough arguments for mkdir

2001-01-17 Thread George Sanderson

At 08:59 AM 1/17/2001 +0200, you wrote:
Hi,

This is me again. Thanks for quick response. Another two questions:
in your demo http://www.xorgate.com/FileMan/demo/.XFM/
just tried to upload file "1", it reported me "ERROR: MkFile: Parent access
denied" but I suspect it catchup to do open() before... so you can see now
"1" with 0k size.
a hole? - someone maliciose can create as many files as he wants this way...

Fixed.  The parent directory check was being checked after the open.
The source is available from:
http://www.xorgate.com/FileMan
as file FileMan-0.05a.tar.gz
Thanks

and another one. I tried to install it(0.04 version), and after a hour of
struggle it got it compiled and make test passed, but I can't get it running
in apache(1.3.14+1.24_01).

Sorry about the struggle part.  This is my first module.  
Since you are just installing this as a stand alone module, the other Perl
module
dependances are not being automatically install for you like hopefully CPAN
will be doing for you once the code get released.

Others may have some advise to me about how CPAN determines the Perl module
dependencies and automatically install them.

You need the following other Perl modules installed (CPAN works great for
this.)
use Archive::Zip
use File::Copy
use File::Path
use File::NCopy
use Data::Dumper
use Storable
use HTML::HeadParser





Re: FileMan - Not enough arguments for mkdir

2001-01-16 Thread George Sanderson

At 03:12 PM 1/16/2001 +0200, you wrote:

Some linuxes required to have correct permission set in mkdir (it
fails on mkdir $dir; needs to be mkdir $dir,0775;), so make test
fails... (FileMan.pm line 771 and several times below..)

I fixed all the mkdirs with "mkdir $dir,0755".  I think 0755 is all that is
required.  Let me know if this doesn't fix your problem.

Thank you for your input.





Need: Autherization one time password.

2001-01-14 Thread George Sanderson

I want an authorization module to generate a one time password for a
particular user name.
For example, lets say I target some user names to have a one time password
service by using a directive like:

Auth_onetimeruser1, user2, ...

If the password was blank (empty), the module would automagicly create and
store a new password per some format string (perhaps):

Auth_password_format"hello%16s"

After a user logs in some specified number of times (default 1), the
password would be blanked out.

Of course, someone would have to be able to view the account information,
but this should be different module.  A module that would allow an
"administrator" to view and change the user account data base.





Re: Need: Autherization one time password.

2001-01-14 Thread George Sanderson

At 11:08 PM 1/14/2001 +, you wrote:
I seem to recall Randal did a column in Web Techniques on just such a
thing. Check
http://www.stonehenge.com/merlyn/http://www.stonehenge.com/merlyn/

 I want an authorization module to generate a one time password for a
 particular user name.

I think I found the article:
http://www.webtechniques.com/archives/2000/05/perlhttp://www.webtechnique
s.com/archives/2000/05/perl/
Self-Registering Password Protection, Part 1 

Randal's requirements were some what similar.  I wanted to randomly generate
the password for a particular user after they log in a limited number of times
and then send email to someone.

After reading the article, I thinking the best way to implement my
requirements
would be to create (or modify) an authentication module that would keep track
of how many times a user logs in and also be able to trigger (REDIRECT to) a
cgi script when certain conditions are meet.  My cgi script (custom
requirements) could then regenerate the new password and do any the
notifications required.  

The authentication trigger (REDIRECT) would be the trick, in that it should be
generic enough to allow for a whole range of other situations.  




Re: [ANNOUNCE] Apache-AuthzCache 0.03

2001-01-13 Thread George Sanderson

When a request that requires authorization is received,
Apache::AuthzCache looks up the REMOTE_USER in a shared-memory
cache (using IPC::Cache) and compares the list of groups in the
cache against the groups enumerated within the "require"
configuration directive. If a match is found, the handler returns
OK and clears the downstream Authz handlers from the
stack. Otherwise, it returns DECLINED and allows the next
PerlAuthzHandler in the chain to be called.
 
After the primary authorization handler completes with an OK,
Apache::AuthzCache::manage_cache adds the new group (listed in
REMOTE_GROUP) to the cache.

I would like the module to be able to cache selected environment variables
along with the user and group information.
A directive could be used to select a list of environment variables to be
cache.  For example;

AuthzCacheOption CacheEnv  REMOTE_EMAIL SPECIAL_VAL FIELD23

Then when the following authorize request are processed, these environment
variables would be set.  The down steam handlers can now access the
variables without having to go back to the original data source (which may
change).

I have done some work with AuthzDBI.pm to provide this functionality.  I
hope to work with Edmund Mergl to get it added to Apache::AuthzDBI.pm.





Re: Whither gozer?

2001-01-12 Thread George Sanderson

Philippe M. Chiasson, the mail address given in Apache::AutoIndex is
bouncing (today, at least): [EMAIL PROTECTED]  If you are
reading this and have a working address, please let me know.

I have been tring to get in touch with Philippe for about 6 months with no
success.




Re: Debugging information sent to browser

2001-01-12 Thread George Sanderson

Why do you think it would be hard to return AUTH_REQUIRED if the 
DEBUG=1 param is in the URL?  Granted, the browser issues involved won't
make it the best solution, but no worse than passwords are already.  Someone
would have to be using a machine where a valid uid/passwd are in browser
cache,
or someone would have to know a valid uid/password.

I like your idea.  Yes this should be no problem.  How I think I will do it
is to 
require a login before presenting the DEBUG submit button.  That way it won't
confuse or frustrate the unwary.

My main worry is how I'm going to produce the best debugging information
without requiring scripts to be rewritten.  As it is, CF displays debugging
information based on IP.  I can mimic the code from cgiwrap to find what I 
would like to send, and I can probably find a way to send the best debugging 
and error reporting to the debugging uid's browser.

Try something like:
if($debug) {
use Data::Dumper;
print "PRE";
print "\%list\n";
print Dumper \%$list;
print "/PREHR";
}
 




Searching the mod_perl archive works

2001-01-07 Thread George Sanderson

I had a problem and first tried:

http://perl.apache.org/guide/perl.html

It said to search the mod_perl archive, but it did not provide it's URL (or
I did not find it).  So then I did a search engine search for "mod_perl
archive" and found:

http://www.bitmechanic.com/mail-archives/modperl/

Once there and after searching for a while (using the "Advanced search":),
I found information that help me solve my problem.

It would have been nice if I did not have to resort to the search engine to
locate the archive.

Also, I looked for a mod_perl function (method) perldoc type of reference
doc, but did not find any easy (URL) references.  What I had hoped to
locate was a page where you enter the mod_perl function (method) name and
it provides the perldoc equivalent reference infomation for the function.







OT: HTML/XHTML syntax checking tools?

2001-01-07 Thread George Sanderson

What HTML/XHTML syntax tools are recommended?  I was hoping that the tool
would run on the browser (client) side.  I prefer a PC version, but hey, a
good ap is best.-)

For example, I am working on a mod_perl module, and I made a HTML typo
(TEST instead or TEXT), (belzlare slip).  Perhaps I or someone else has
made other mistakes.  Since the browser ignored the TEST tag, and the
default was reasonable, it looked OK.  Now I think I should be checking
with something other than my eye.





RFC: Apache::FileMan pre-release 0.04

2001-01-07 Thread George Sanderson

FileMan provides a web site file manager to web browsers. It is an
extensive rewrite of the Apache::AutoIndex.pm module (written by Philippe
M. Chiasson), which in turn was a remake of the autoindex Apache module.
FileMan can provide the same functionality as AutoIndex.pm which means that
it can be used to both navigate and manage a web site.

The current pre-release version is 0.04 and is available for download at:
httpd://www.xorgate.com/FileMan
A restricted demo is available by accessing:
httpd://www.xorgate.com/FileMan/demo/.XFM
user name=fileman
password=13dec00

In version 0.04, I added the "Edit", "MkFile", and "Revoke" (only for admin
users) commands.  This completes the development of the module.

The command list includes: "Browse", "Upload", "Unzip", "Delete", "Mkdir",
"MkFile", "Copy", "Move", "Edit", "Rename", "Help", "SetGID", and "Revoke".

If you notice any problems or have any comments, please, let me know.
All comments are welcomed. 




Re: RFC: Apache::FileMan pre-release 0.04

2001-01-07 Thread George Sanderson

At 09:19 PM 1/7/2001 -0600, you wrote:
I just tried the demo
(coursoity got the better part of me ;)
and the 
username: fileman
password 13dec00
did not work
 
Sorry, it appears, I left the demo access wide open and the directory got
deleted.
Try it again.  It should work. (Its now read only though.)





mod_perl large scalar cache

2001-01-03 Thread George Sanderson

I have a mod_perl hash scalar that can store up to 4 MB of string data.

I was wondering what happens to the memory usage after a "delete
$myhash{large}"?

I was thinking (I know this can be dangerous:-), it would be nice if I
could tell mod_perl to cache scalars that become larger than some specified
value, so that they do not chew up too large chunks of memory.





Re: HTTP authentication based sessioning with logout ability

2000-12-19 Thread George Sanderson

At 06:28 PM 12/19/00 +, you wrote:
Hi there.

I've been trying to write a system to perform authentication using the
www-authenticate (http authenatication) method. However, I need a client
visiting the page and having been authenticated to be able to logout and
have their browser forget the information (or at least be able to force the
browser to re-authenticate within the same browser session).
 
There are two phases of Apache user authorization, namely, authentication
and authorization.  I think that you need to set a flag when the user
logs-out to force authorization to reject requests and force a new login
(which would then clear the flag on success).   The flag could also be tied
to a timer such that if no request was received after a defined time span,
the flag could be set for that user.  This approach would not require a
cookie.  I have never done this, but it should work.






Re: RFC: Apache::FileMan

2000-12-18 Thread George Sanderson

At 01:40 PM 12/18/00 -0800, you wrote:
you should take a look at the interface of the file management of
some of the free webspace providers.

I have looked at some of these.  They do not look and feel like a file
manager.  They tend to be fragmented and wordy.

i haven't really looked at the Apache::FileMan module, but the
biggest thing i would suggest is using something like the Template
Toolkit to move the html pages into templates.

I am not there yet.  FileMan does not require any client software and it is
independent of the file content.  It just doesn't care what is in a files
or directory.

(personally, i've moved on to using dav (http://www.webdav.org/)
for most of my web-based file management needs.)

I know very little about WebDAV.  I looked at the site and found the DAV
concepts interesting.  Perhaps you could point me to a demo or more
information about how the requirements are implemented.  WebDAV appears to
integrate the CASE information within the XML documents themselves.

I noticed that WebDAV provides file sharing.  I had not considered this,
but it would be easy to do in FileMan.





Re: RFC: Apache::FileMan

2000-12-18 Thread George Sanderson

At 04:55 PM 12/18/00 -0800, you wrote:
On Dec 18, George Sanderson wrote:
 At 01:40 PM 12/18/00 -0800, you wrote:
a matter of taste, of course. it also depends on your target audience.

The user interface is the most sacred information ground.
It's application depends on the requirements (marketing).

A benefit gained from a consistent and portable interface is that the user
can progress from system A to system B without having to navigate
(interface) differently.  The seamless interface that DAV provides is it's
biggest advantage, because to the user it has the same interface to
different (servers) services.  Which is why I thought, that since FileMan
looks and feels like autoindex it would be a natural extension for Apache
users.

 biggest thing i would suggest is using something like the Template
 Toolkit to move the html pages into templates.

http://www.template-toolkit.org/tpc4/paper.html#cgi (well, the
whole document, really) is a good place to read about what i'm
talking about.

After reading the first part of the document, it made a lot of sense. (Thanks)

well, webdav is an extension to http that allows you to "put", "delete",
"move", "copy", etc

You have given me a lot to think about.  I need to read RFC2518 a couple or
three times. 

http://andrew2.andrew.cmu.edu/rfc/rfc2518.html





Re: Email (mod_perl) Apache module?

2000-12-17 Thread George Sanderson

At 09:32 AM 12/15/00 -0300, you wrote:
Jeremy Howard wrote:
 IMHO, the best open source WebMail servers are PHP based

   I have this dangling idea of building a TWIG lookalike (in Perl), with
a 'plug-in'/'module' structure, so I may write the email client, and
others fill with their desired modules. Anyway, it's a seriuos
undertaking, but it's in my plans to rip as much code and design choices
from stable OS webmails as possible.

I test drove the WebMail server, and, ... it was nice!  What I had in mind
was a simple stand-alone (with a robust email server API: POP IMAP, NEWS)
Apache mod_perl email module, that would allow authorization, read,
compose,  send, forward, and delete.  I don't think it would need to read
attachments, but being able to save and attach files would  be useful.  A
simple directory interface would also be useful but not hard requirement.
An eligant simple interface would cover about 90% of most needs.  Having it
simple and easy to install is key.







RFC: Apache::FileMan

2000-12-17 Thread George Sanderson

I have been getting some good feedback on the Apache::FileMan module.

FileMan provides a file manager for a web sites through a web browser. It
is a extensive rewrite of the Apache::AutoIndex.pm module (written by
Philippe M. Chiasson), which in turn was a remake of the autoindex Apache
module. FileMan can provide the same functionality as AutoIndex.pm and can
be used to both navigate and manage the web site.

I added a destination text field, which helps make the commands more
intuitive.  I also added a "View" command that allows you to view files
(MiME) within FileMan.

Now the command list includes: "Browse", "Upload", "Unzip", "Move", "Copy",
"Rename",
"Delete", "Mkdir", "View", "Help", and "SetGID".

A demo can be viewed at www.xorgate.com/FileMan/example/.XFM
user name=fileman
password=13dec00

A new pre-release (version 0.02) tar ball file can be down loaded from
www.xorgate.com.

On Wed, 14 Dec 2000 Stas wrote:
I already tell you that FileMan is not a very good choice as it reminds me
of man page utility... Apache::FM Or Apache::FileMgr sounds like a better
choice. But let the list do its job. 

Well I like the FileMan name, and I did a cpan i /fileman/ and i /FileMan/
with no response.

I plan to add an "Edit" command which I will provide an on-line text file
(HTML) editor from within FileMan.

A Michigan friend suggested learning aids, "FileMan for Dummies" interface.

All comments welcomed. 




RFC: Email (mod_perl) Apache module?

2000-12-14 Thread George Sanderson

I think it would be cool to have an email Apache module.  I was thinking
that if the URL was something like:


http://www.site.com/user/mail

it would activate the module.

The module would allow the users to read and send email.  Kind of like how
I did Apache::FileMan (an Apache web site file manager).  This would allow
sites to get email interfaces up and running very quickly and provide a
common user interface.

Now that would be advocacy;-)






RFC: Apache::FileMan

2000-12-13 Thread George Sanderson

I have created a new module that I called, Apache::FileMan.pm.

FileMan provides a file manager for a web sites through a web browser. It
is a extensive rewrite of the Apache::AutoIndex.pm module (written by
Philippe M. Chiasson), which in turn was a remake of the autoindex Apache
module. FileMan can provide the same functionality as AutoIndex.pm and can
be used to both to navigate and manage the web site.

Hopefully this module will open a new realm for web service providers (WSP). 

This is my first Apache module.  I am not quiet sure what others will
expect me to do, nor how I should provide the code to the mod_perl user
community for inspection.

The module has some interesting aspects, such as how to provide file
permissions (security) in a shared environment.





Re: RFC: Apache::FileMan

2000-12-13 Thread George Sanderson

Stas Bekman [EMAIL PROTECTED]
At 11:11 PM 12/13/00 +0100, you wrote:

On Wed, 13 Dec 2000, George Sanderson wrote:

 At 10:29 PM 12/13/00 +0100, you wrote:
 Do you want me to email you a *.tar.gz file?

No. Please post the URL.

http://www.xorgate.com/FileMan/FileMan-0.01.tar.gzhttp://www.xorgate.com/
FileMan/FileMan-0.01.tar.gz

 What do you mean by having aspects? Is it a question, or you does the
 module provides all the answers?
 
 I set the GID on the files and directories for the users that are
 authenticated.  Also the
 GID of the files and directories are check before any significant commands
 are executed.

Hmm, are you running the server as root? How can you set different GID
than.

No, Apache runs with a common "webuser" ID, just like normal Apache children. 
All I do
is create a new UNIX /etc/group and make webuser a member of that group.
When Apache creates files via FileMan, their UID is  "webuser" (Apache's
PUID).  When a user is authorized, FileMan picks up a GID from an Apache
environment variable for that user.  Since Apache owns the file and is a
member
of the group, it can change the GID of the files.

 I'm investigating multiple membership and how that might be done. 

May be you should be more explicit in your question? What are you trying
to accomplish and you don't get it?

This is not really a question.  I am just mumbling.   Currently I have only
two
levels, of access control in FileMan, namely, "admin", and "user".  I think
there is a need for an intermediate level, that is, being able to run all the
commands, but not able to change GIDs of the files.





Re: RFC: Apache::FileMan

2000-12-13 Thread George Sanderson

At 02:32 PM 12/13/00 -0800
Carlos Ramirez [EMAIL PROTECTED]
wrote: 
Looks very nice and useful! Does it use the
default apache icons when the files 
are listed? when do you plan to make it available to the public on CPAN?
docs? 
Yes, it does use the apache icons, just like Apache::AutoIndex.pm.
My intention is to make it available on CPAN. I have the docs,
test, and etc., however I have never released anything to CPAN before, so
I am sure I am missing something. I put a copy of the current
package at:

http://www.xorgate.com/FileMan/FileMan-0.01.tar.gz




Re: Changing a file's UID from within an Apache module?

2000-12-03 Thread George Sanderson

Prior to creating any file, the user would have been authenticated and an
authorize module 
would have supplied the UID to be used for the request in an environment
variable.  The location 
of the user's files has to read by Apache so such that it can serve the
files (HTML).

The rational behind setting the UID of the files (and directories) is to
allow each user to be able 
to create files that are protected from other users who may also be
providing files.  Each users 
files are confined to certain sub-directory stubs.
 
Perhaps, I should use the GID instead of the PID to differentiate between
users and leave the PID alone.  Then perhaps setting the directory
permission to 0770 and 0460 for files on creation, along with checking the
GID of the files and dirs before any modifcation, could be used to achieve
the same effect.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Changing a file's UID from within an Apache module?

2000-11-29 Thread George Sanderson

I am creating a mod_perl Apache module.  The last functionality that I need
to implement is the ability to set the UID of the files and directories
which are created and modified by the Apache module to something other than
Apache's child UID.

For example, if when I built Apache 1.3.14 on Linux 2.2.17, I used:
APACI_ARGS=--server-uid=300,--server-gid=300
Later, my module creates a file "myfile.html".  I want to change the file's
UID from 300 to 3000, from within the Apache module.

I was going to set the file permissions to 750 and keep the Apache GID.
The directory permissions could be set to 770 in order to let the Apache
module create, modify, and delete files within the directories.  In this
way each file would provide exclusive (modify and create) access rights in
a shared user environment.
 
Any ideas about the best way to change the permissions and UID?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Apache::AuthenDBI request request

2000-11-22 Thread George Sanderson

I need to access DBI table fields in the AuthenDBI/AuthzDBI data base.  I
think a good way to do this, would be to provide a new directive which
would specify the table field values to be placed into the Apache notes.
For example:
Auth_DBI_note_field UID
would add a key/value pair (field_name/value) into the Apache notes for
each request accepted (not rejected) by Apache::AuthzDBI.  If more that one
field name directive was provided, each would then in turn have a notes
key/value entry.  In this way, a module down stream could retrieve the
field/value pair from Apache notes to process their requirements.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re:coredump on Carps in startup.pl

2000-11-21 Thread George Sanderson

Hey thanks a lot.  I'm just going blind or something,  because when I see a
URL and click...  If it quacks, it's a duck :-).  But seriously, I have had
the problem that this patch is suppose to fix.  I do appreciate your
efforts.  I'll let you know how it turns out.
Thanks.

At 04:34 AM 11/21/00 +, you wrote:
OK, now I'm using a mailer that doesn't insert newlines, so you should
find this hyperlink clickable. I've cc'd myself so I'll check that it
works. Here it is:

http://forum.swarthmore.edu/epigone/modperl/sningvezerd/26091135.MAA145
[EMAIL PROTECTED]

-- 
  Jeremy Howard
  [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [OT] $r-header_out(Location=$dst) browser response

2000-11-21 Thread George Sanderson

Follow up:
Well I screwed up, but at least now I know it!
The 303 status code did give me the result I wanted, but after I removed
the bug which caused the problem, I no longer need to use it.  (I had a
global variable which was previously set and latter caused my REDIRECT to
cycle right back to the previous REDIRECT location.  Kind of like a,
"REDIRECT pong bug". :-).
Sorry to have bothered you about this one, but I did learn something about
the http status codes and such.

| Is there a way to tell the browser(s) not to make this same substitution
in
| the near future?
| Or, is there a better way to do a one time only redirect from within a
| dynamic page?

I don't expect IE to do anything by the rules, but maybe you can experiment
with sending an explicit Status: 303, as described on
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4

Yes, the 303 status code is exactly what I needed.  I also tried setting
the "Expire" time to a negative and a small positive time in conjunction
with the "normal" REDIRECT (302) status return code, but IE 5 still did not
hack the response favorably.

I hope that SEE_OTHER  {302} can be added to mod_perl's:
FakeRequest.pm
for future reference.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [OT] $r-header_out(Location=$dst) browser response

2000-11-20 Thread George Sanderson

At 11:02 PM 11/19/00 +0100, you wrote:
| Is there a way to tell the browser(s) not to make this same substitution
in
| the near future?
| Or, is there a better way to do a one time only redirect from within a
| dynamic page?

I don't expect IE to do anything by the rules, but maybe you can experiment
with sending an explicit Status: 303, as described on
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.3.4

Yes, the 303 status code is exactly what I needed.  I also tried setting
the "Expire" time to a negative and a small positive time in conjunction
with the "normal" REDIRECT (302) status return code, but IE 5 still did not
hack the response favorably.

I hope that SEE_OTHER  {302} can be added to mod_perl's:
FakeRequest.pm
for future reference.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[OT] $r-header_out(Location=$dst) browser response

2000-11-19 Thread George Sanderson

I know this is not directly a mod_perl issue, but I did use mod_perl to
present the issue. . .
So here it is:

When I issue: $r-header_out(Location="$dst"),
The browser (IE 5 in my case so far) goes to the fully specified $dst URL.
My problems is that, if the browser attempts to go back to the originating
(dynamic) URL, it again goes to the previous $dst location. (It has either
cached or remembered the new Location.)

I have also set:
$r-no_cache(1);
before:
$r-send_http_header("text/html");

Is there a way to tell the browser(s) not to make this same substitution in
the near future?
Or, is there a better way to do a one time only redirect from within a
dynamic page?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Apache::AuthenDBI NOTICE message

2000-11-15 Thread George Sanderson

 So far, using Apache::AuthenDBI, I get an error_log message:
 
 NOTICE:  Unrecognized variable client_encoding
 
 Every time the DBI ping is called.
 I have not been able to tack down the origin of this message.
 Any ideas or suggestions?

never seen before. What database do you use ?

I am using PostgreSQL 7.0.2
More details. . .
I am also using the latest Apache::AuthenDBI and Apache::AuthzDBI.
In startup.pl I have:
Apache::DBI-connect_on_init("dbi:Pg:dbname=atable", "webuser", "webuser",
 {
  PrintError = 1, # warn() on errors
  RaiseError = 0, # don't die on error
  AutoCommit = 1  # commit executes immediately
 }
);
#
I did try seting PrintError=0 with no change on the NOTICE message.

Note: I am not using any of the following (in startup.pl):
Apache::DBI-setPingTimeOut("dbi:driver:database", $timeout);
Apache::AuthDBI-setCacheTime(0);
Apache::AuthDBI-setCleanupTime(-1);
Apache::AuthDBI-initIPC(5);

When I start httpd I get the following error log output.
==
[Wed Nov 15 17:47:48 2000] [info] created shared memory segment #12928
[Wed Nov 15 17:47:48 2000] [notice] Apache/1.3.14 (Unix) mod_perl/1.24_01
mod_layout/2.8 configured -- resuming normal operations
[Wed Nov 15 17:47:48 2000] [notice] suEXEC mechanism enabled (wrapper:
/usr/local/apache/bin/suexec)
[Wed Nov 15 17:47:48 2000] [info] Server built: Nov  5 2000 10:26:07
12052 Apache::DBI PerlChildInitHandler
12051 Apache::DBI PerlChildInitHandler
12053 Apache::DBI PerlChildInitHandler
NOTICE:  Unrecognized variable client_encoding
Database handle destroyed without explicit disconnect at
/usr/local/lib/perl5/5.6.0/site_perl/Apache/DBI.pm line 140.
require 0 called at
/usr/local/lib/perl5/5.6.0/site_perl/Apache/DBI.pm line 140
Apache::DBI::childinit('Apache=SCALAR(0x874565c)') called at
/dev/null line 0
require 0 called at /dev/null line 0
12054 Apache::DBI PerlChildInitHandler
NOTICE:  Unrecognized variable client_encoding
Database handle destroyed without explicit disconnect at
/usr/local/lib/perl5/5.6.0/site_perl/Apache/DBI.pm line 140.
require 0 called at
/usr/local/lib/perl5/5.6.0/site_perl/Apache/DBI.pm line 140
Apache::DBI::childinit('Apache=SCALAR(0x874565c)') called at
/dev/null line 0
require 0 called at /dev/null line 0
12055 Apache::DBI PerlChildInitHandler
12056 Apache::DBI PerlChildInitHandler
=
The NOTICE and etc messages are repeated several (12) times for the 6
Apache children and the 1 Apache root processes running (i.e. 2 NOTICE
messages per child).
The Apache::DBI.pm is version 0.87 and near line 140 I see:
sub childinit {
my $prefix = "$$ Apache::DBI";
print STDERR "$prefix PerlChildInitHandler \n" if $Apache::DBI::DEBUG  1;
#if (defined @ChildConnect) {
if (@ChildConnect) {
for my $aref (@ChildConnect) {
shift @$aref;
DBI-connect(@$aref);
$LastPingTime{@$aref[0]} = time;
}
}
1;
}
Note that I changed the "if(defined @ChildConnect" line because, "defined
on aggregates (hashes and arrays) is deprecated."  Line 140 is:
$LastPingTime{@$aref[0]} = time;





RE: database access

2000-11-13 Thread George Sanderson

At 08:04 AM 11/13/00 -0500, you wrote:
I haven't followed this thread too closely, so forgive me if I'm not quite
with it...

you can already do this with Apache::DBI...

change DBI-connect() to the (undocumented) 6 parameter call:

 
Don't get me wrong here, "but", it would be nice if the undocumented
somehow made it to the documented status.  A related difficulty, is reading
and understanding the documentation with my set of problems (problems are
the reason why I read most documentation).  I understand it is a difficult
task, but someone has to do it (we will all benifit).  Thanks.




Apache::AuthenDBI NOTICE message

2000-11-13 Thread George Sanderson

It turns out that I am learning about DBI and Apache::DBI.
So far, using Apache::AuthenDBI, I get an error_log message:

NOTICE:  Unrecognized variable client_encoding

Every time the DBI ping is called.
I have not been able to tack down the origin of this message.
Any ideas or suggestions?





Apache::AutoIndex author

2000-11-07 Thread George Sanderson

I want to enhance Apache::AutoIndex.  I have tried to contact Philippe M.
Chiasson, but have not had any success.  Can someone please tell me how to
contact Philippe or whom ever is maintaining the module.

Thanks,





Apache_1.3.14 mod_layout 1.24_01 core dump

2000-11-06 Thread George Sanderson

=
I am resending this email because I initially sent it out late Friday
evening and I only received further questions from one person.  I was
hoping that someone could shed some light on why I am having problems
loading DSO modules when mod_perl is statically linked and loaded.
=
First, off, let me clarify, I am a Newbie in almost every way. . .

I have the following configuration Linux 2.2.17, Apache 1.3.14,
mod_perl-1.24_01 (static), Perl-5.6.0.
If I load Apache::Icon and mod_layout (static) I do not have a problem.
Also, I can not load mod_perl as a DSO and load Apache::Icon without core
dump.  When I  load mod_perl (static), Apache::Icon, and mod_layout 2.8 as
a DSO, Apache will also core dump and the following gdb bt output is produced:
=
#0  0x8089c9d in ap_push_array (arr=0x) at alloc.c:1029
#1  0x2ac788f4 in push_item () from
/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/auto/Apache/Icon/Icon.so
#2  0x2ac78a48 in add_alt () from
/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/auto/Apache/Icon/Icon.so
#3  0x2ac78ad8 in add_icon () from
/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/auto/Apache/Icon/Icon.so
#4  0x2ac78bdf in add_raw () from
/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/auto/Apache/Icon/Icon.so
#5  0x2ac78c55 in add_icon_raw () from
/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/auto/Apache/Icon/Icon.so
#6  0x808ec79 in invoke_cmd (cmd=0x2ac7a670, parms=0x7bd4,
mconfig=0x81c115c,args=0x7fffdb5e "(CMP,/icons/compressed.gif) x-compress
x-gzip") at http_config.c:808
#7  0x808f703 in ap_handle_command (parms=0x7bd4, config=0x81c0534,
l=0x7fffdb4c "AddIconByEncoding (CMP,/icons/compressed.gif) x-compress
x-gzip") at http_config.c:1028
#8  0x808f7a7 in ap_srm_command_loop (parms=0x7bd4, config=0x81c0534)
at http_config.c:1042
#9  0x808fe68 in ap_process_resource_config (s=0x81bf95c, fname=0x81c0f4c
"/usr/local/apache/conf/httpd.test", p=0x81bf934,ptemp=0x84121dc) at
http_config.c:1298
#10 0x8090762 in ap_read_config (p=0x81bf934, ptemp=0x84121dc,
confname=0x81af760 "conf/httpd.test") at http_config.c:1580
#11 0x809a6d1 in standalone_main (argc=4, argv=0x7ce4) at http_main.c:4640
#12 0x809af43 in main (argc=4, argv=0x7ce4) at http_main.c:5004
=
The tail of the strace was:
=
stat("/usr/local/apache/lib/perl/Apache/Icon.pmc", 0x7fffd7ac) = -1 ENOENT
(No such file or directory)
open("/usr/local/apache/lib/perl/Apache/Icon.pm", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/usr/local/lib/perl5/5.6.0/i586-linux/Apache/Icon.pmc", 0x7fffd7ac) =
-1 ENOENT (No such file or directory)
open("/usr/local/lib/perl5/5.6.0/i586-linux/Apache/Icon.pm", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/usr/local/lib/perl5/5.6.0/Apache/Icon.pmc", 0x7fffd7ac) = -1 ENOENT
(No such file or directory)
open("/usr/local/lib/perl5/5.6.0/Apache/Icon.pm", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/Apache/Icon.pmc",
0x7fffd7ac) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/Apache/Icon.pm",
O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0444, st_size=2333, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aac6000
read(5, "package Apache::Icon;\n\nuse stric"..., 4096) = 2333
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
close(5)= 0

munmap(0x2aac6000, 4096)= 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
=
I have a similar problem when I replace mod_layout with mod_auth_mda (DSO),
however I do not have a problem if I do not load mod_perl with the other
modules or if I do not load the other DSO modules (mod_layout or
mod_auth_mda).

No error_log output is generated.

Looks like some kind of  munmap() problem.

I appreciate any help I can get.  Thanks in advance.






Apache_1.3.14 mod_layout 1.24_01 core dump

2000-11-03 Thread George Sanderson

First, off, let me clairfy, I am a Newbie in almost every way. . .

I have the following configuration Apache 1.3.14, mod_perl-1.24_01
(static), Perl-5.6.0, Linux 2.2.14.
If I load load Apache::Icon, and mod_layout 2.8 (DSO), Apache will core
dump and the following gdb bt output is produced:

#0  0x8089c9d in ap_push_array (arr=0x) at alloc.c:1029
#1  0x2ac788f4 in push_item () from
/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/auto/Apache/Icon/Icon.so
#2  0x2ac78a48 in add_alt () from
/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/auto/Apache/Icon/Icon.so
#3  0x2ac78ad8 in add_icon () from
/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/auto/Apache/Icon/Icon.so
#4  0x2ac78bdf in add_raw () from
/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/auto/Apache/Icon/Icon.so
#5  0x2ac78c55 in add_icon_raw () from
/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/auto/Apache/Icon/Icon.so
#6  0x808ec79 in invoke_cmd (cmd=0x2ac7a670, parms=0x7bd4,
mconfig=0x81c115c,args=0x7fffdb5e "(CMP,/icons/compressed.gif) x-compress
x-gzip") at http_config.c:808
#7  0x808f703 in ap_handle_command (parms=0x7bd4, config=0x81c0534,
l=0x7fffdb4c "AddIconByEncoding (CMP,/icons/compressed.gif) x-compress
x-gzip") at http_config.c:1028
#8  0x808f7a7 in ap_srm_command_loop (parms=0x7bd4, config=0x81c0534)
at http_config.c:1042
#9  0x808fe68 in ap_process_resource_config (s=0x81bf95c, fname=0x81c0f4c
"/usr/local/apache/conf/httpd.test", p=0x81bf934,ptemp=0x84121dc) at
http_config.c:1298
#10 0x8090762 in ap_read_config (p=0x81bf934, ptemp=0x84121dc,
confname=0x81af760 "conf/httpd.test") at http_config.c:1580
#11 0x809a6d1 in standalone_main (argc=4, argv=0x7ce4) at http_main.c:4640
#12 0x809af43 in main (argc=4, argv=0x7ce4) at http_main.c:5004

The tail of the strace was:
stat("/usr/local/apache/lib/perl/Apache/Icon.pmc", 0x7fffd7ac) = -1 ENOENT
(No such file or directory)
open("/usr/local/apache/lib/perl/Apache/Icon.pm", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/usr/local/lib/perl5/5.6.0/i586-linux/Apache/Icon.pmc", 0x7fffd7ac) =
-1 ENOENT (No such file or directory)
open("/usr/local/lib/perl5/5.6.0/i586-linux/Apache/Icon.pm", O_RDONLY) = -1
ENOENT (No such file or directory)
stat("/usr/local/lib/perl5/5.6.0/Apache/Icon.pmc", 0x7fffd7ac) = -1 ENOENT
(No such file or directory)
open("/usr/local/lib/perl5/5.6.0/Apache/Icon.pm", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat("/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/Apache/Icon.pmc",
0x7fffd7ac) = -1 ENOENT (No such file or directory)
open("/usr/local/lib/perl5/5.6.0/site_perl/i586-linux/Apache/Icon.pm",
O_RDONLY) = 5
fstat(5, {st_mode=S_IFREG|0444, st_size=2333, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aac6000
read(5, "package Apache::Icon;\n\nuse stric"..., 4096) = 2333
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
close(5)= 0

munmap(0x2aac6000, 4096)= 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++

I have a similar problem when I replace mod_layout with mod_auth_mda (DSO),
however I do not have a problem if i do not load mod_perl with the other
modules or if I do not load the other DSO modules (mod_layout or
mod_auth_mda).

No error_log output is generated.

Looks like some kind of  munmap() problem to me.

If will appreciate any help I can get.  Thanks in advance.






Apache::Icon SIGHUP does not read directives

2000-08-28 Thread George Sanderson

I have very strange problem.  With a minimum configuration, (httpd -l) gives:
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_dir.c
  mod_alias.c
  mod_access.c
  mod_perl.c
suexec: enabled; valid wrapper /usr/local/apache/bin/suexec

and with the following build:
Apache/1.3.13-dev (Unix) mod_perl/1.24_01-dev configured
running on Linux 2.2.14 with Perl 5.6.0

The only mod_perl module loaded is Apache:Icon. (httpd.conf is attached to
the end of this message)

When I first launch httpd, Apache:Icon reads and processes all of the
autoindex directives.  

However, if I SIGHUP the running httpd root process with,
'kill -HUP httpd-root-pid'

I get the following in the error_log file:
Syntax error on line 11 of /usr/local/apache/conf/httpd.dev:
Invalid command 'AddIconByType', perhaps mis-spelled or defined by a module
not included in the server configuration  

Note that this is a valid directive and that it works fine on the initial
launch.

Can someone please point me in the right direction to solve this problem?

The following is my complete httpd.conf file.
#===
ClearModuleList
AddModule mod_log_config.c
AddModule mod_dir.c
AddModule mod_perl.c
#PerlFreshRestart On
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.dev
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.dev combined
PidFile logs/httpd.pid.dev
ScoreBoardFile logs/httpd.scoreboard.dev
LockFile logs/httpd.lock.dev
ServerName test.xorgate.com
UseCanonicalName on
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 4
MaxSpareServers 10
StartServers 6
MaxClients 50
MaxRequestsPerChild 200




Missing src/include/alloc.h ?

2000-08-25 Thread George Sanderson

I down loaded the CVS file apache-1.3_2825041201.tar.gz and attempted a
make, that included: 
--add-module=/usr/src/mod_layout-2.3/mod_layout.c
It expects src/include/alloc.h
I noticed that this header file was included in the apache_1.3.12
distribution.
Is the file missing?






Missing src/include/alloc.h ?

2000-08-25 Thread George Sanderson

Please ignore my previous message,
I let this message go out to the wrong mailing list.

I down loaded the CVS file apache-1.3_2825041201.tar.gz and attempted a
make, that included: 
--add-module=/usr/src/mod_layout-2.3/mod_layout.c
It expects src/include/alloc.h
I noticed that this header file was included in the apache_1.3.12
distribution.
Is the file missing?






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::Perfmon 0.011

2000-08-22 Thread George Sanderson

At 11:26 AM 8/22/00 +0200, you wrote:
On Tue, 22 Aug 2000, Lupe Christoph wrote:

 On Monday, 2000-08-21 at 21:06:54 -0400, Greg Stark wrote:
 
  Lupe Christoph [EMAIL PROTECTED] writes:
 
   Hmm. Apache::Benchmark sounds more like a benchmark driver to me.
   Apache::Instrumentation or so? Apache::Probe?
 
  Profile or even just Prof.

That would be misleading. A profiler is something much more sophisticated
and provides you a lot of information about the code that gets
executed. More over the Apache::DProf and Apache::SmallProf are already in
place.

 I thought about it a little more. What is does is find the
 (cpu|real)time taken to process a request. So what about
 Apache::RequestTimer or maybe Apache::Perf::RequestTimer, creating
 a new namespace for all performance-related modules?

Both sound good time, especially the second :)

How about a take off from vmstat (a great UNIX tool) and call it
Apache::HTStat





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
 




Re: Producing an error page

2000-08-21 Thread George Sanderson

At first, when I read the first message, I said to myself; (self) Why would
anyone want an error page with all the Perl HTML STDOUT/STDOUT stuff mixed
up together?  However, after reading and thinking some more, . . . (just
from a conceptional point of view and not from an implementation view
point), , , what a powerful concept!  If you (a developer) could regain the
Perl command line style of output from the web server (itself) without
having to piece together the STDOUT/STDERR during a debugging effort.  Now,
lets say that you had an Apache module that output a web page that looked
just like the stuff you could see from  the browsers "View/(Page)Source"
with the STDERR output included.  All one would have to do, is configure
the DEBUG handler in the httpd.conf, which would in turn produce what
appeared as HTML code with STDOUT included all within a HTML page.  The
STDERR output would be distinguished, with lets say:
 STDERR Opps got an error here or something. \STDERR
I'm sure you would also want a submit (DEBUG) button which could generate
the above, on-demand for form pages and such. (Kind of a DEBUG on demand
option.)

Is this what is being discussed here?  
(This is probably, not a mod_perl topic, but then again, it could be:-).


At 12:04 PM 8/21/00 -0700, you wrote:
The stuff that the server sends back comes from STDOUT if CGIs or within 
mod-perl, either $req-print or a regular print since it is tied.  The 
error messages go to STDERR which apache redirects internalls so that the 
messages go to the error log.  I don't know that it's possible and I'm 
certain it's not a good idea to try and circumvent that and send STDERR to 
the browser.  And besides that, you'd still have to send content-type 
headers.  I suppose you could write one perl program that executes your 
perl program of interest from within an eval block and capture the output 
that way.  But isn't simply looking at the error log easier?

-- Rob

--On Monday, August 21, 2000 8:56 AM -0500 Jay Strauss 
[EMAIL PROTECTED] wrote:

 Hi,

 I'm asking this again, due to lack of response (but I can't believe no
 one out there knows how to do this).

 How do I produce an error page (in HTML), when I call the script from a
 browser, that looks just like the error screen I get when I run a script
 at the command line?

 That is, if I run the following script from the command line:

 ---
 #!/usr/bin/perl -w

 use strict;
 use diagnostics;

 ($first, $second) = @ARGV;

 exit;
 ---

 I'll get a whole bunch of messages telling me I "use strict" and I have
 variables that I didn't define with "my".

 But, if I call it from my browser, I just get back a "Internal Server
 Error" page.  Instead I want all the diagnostics messages.

 Thanks
 Jay

 Jay Strauss
 [EMAIL PROTECTED]
 (h) 773.935.5326
 (c) 312.617.0264





Re: Milage may vary comments

2000-08-20 Thread George Sanderson

 2) 'Do not': "PerlFreshRestart On" in httpd.conf.

Curiously enough, "PerlFreshRestart On" has always worked for me, even
on the production servers.

It's pretty damn useful too, giving servers a graceful restart everytime
you upload a module...  it'd be a pain to have to fully restart the
server every time, that would mean like 10 seconds of downtime for the
whole site.

I should be more observant, because I think this problem ("PerlFreshRestart
On") may be related to my latest email posting "SIGHUP failure".  Perhaps
if I solve it, the solution to this problem will follow. Hopefully, someone
will respond.  It just seems like it's one think after another.  

Perhaps as my skills improve, it will become easier to get more difficult!





SIGHUP failure

2000-08-19 Thread George Sanderson

The problem is when I "apachectl restart" (SIGHUP), all Apache processes
die (no core dump). However, if I "apachectl stop", (SIGTERM) followed by
"apachectl start" everything is OK (no error_log error messages and every
thing works fine). 

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.:-)

In the httpd.conf file, I have:
#
PerlModule Apache::AutoIndex
PerlModule Apache::Icon
IndexOptions FancyIndexing
#
In error_log, after a SIGHUP, the following is recorded:
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

Any help or guidance will be appreciated






Milage may vary comments

2000-08-18 Thread George Sanderson

I the past 6 weeks I have been working on various problems with
Apache/mod_perl/AutoIndex.pm.

There needs to be a "Your Mileage May Vary" (YMMV) reference page that is
easily accessible.
For Example,after scratching at the mouse pad, I found the following URLs
with practical information:


http://www.perlreference.com/mod_perl/guide/warnings.html#Evil_things_might
_happen_when_us

http://www.perlreference.com/mod_perl/guide/control.html

There are no doubt many more URLs, but, my point is "perspective";
Practical information about, "what works and what doesn't" (WWWDuh:-).

I want to point out a couple of observations during my trouble shooting:

!) 'Do not' load mod_perl as a DSO.
2) 'Do not': "PerlFreshRestart On" in httpd.conf.
3) Always put any httpd.conf module directives after the  module is loaded.
 (Be careful about the load sequence of Perl modules from within your
"startup.pl" file.)
4) Trouble shooting is a bag of worms, which includes error_log, gdb,
strace, PERL_TRACE (on UNIX of course).  Setting up a testing environment
on a different port (I used port 81), and then "divide and concur" (core
and all:-).  Which points out, that a lot of details, change for the
various platforms.
. . .
Does anyone know what happened to or how to contact GOZER (Philippe M.
Chiasson)?  Or perhaps who maintains AutoIndex.pm?  I have some questions
and thoughts to pursue. . .





Re: Milage may vary comments

2000-08-18 Thread George Sanderson

On Fri, 18 Aug 2000, Roger Espel Llima wrote:

  !) 'Do not' load mod_perl as a DSO.

This should be a golden rule if you plan on HUPing your server with any
regularity.

  2) 'Do not': "PerlFreshRestart On" in httpd.conf.
 
 Curiously enough, "PerlFreshRestart On" has always worked for me, even
 on the production servers.
 
 It's pretty damn useful too, giving servers a graceful restart everytime
 you upload a module...  it'd be a pain to have to fully restart the
 server every time, that would mean like 10 seconds of downtime for the
 whole site.

It's even more useful if you want to cache a large quantity of data in
ram with the root process and then periodically refresh that data.

I agree!
  
What was happening to me, was that with "PerlFreshRestart On", I would get a
segmentation fault every time used AutoIndex.pm.  I removed the directive
and the problem went away.  I have seen other references to memory leaks
and such.

If anyone has suggestions as to why the "PerlFreshRestart On" would
aggervate segment faults, I would like to here them.
-- 
Douglas Leonard
[EMAIL PROTECTED]
 




Re: Apache 1.3.12/mod_perl 1.24/Perl 5.6.0 crash

2000-08-14 Thread George Sanderson

I was able to get the Apache::AutoIndex module to load and run by
statically building mod_perl into Apache.  Thanks.

Somebody should fix the flaky DSO.  I did notice that the problems are
timing related.  I would could get different results when I did a fast
"apachectl stop", "apachectl start" (the RedHat /etc/rc.d/init.d/httpd does
this) as opposed to a slow sequence.

I have Apache 1.3.12 using mod_perl 1.24 as a DSO, built with Perl 5.6.0
using
Apache::AutoIndex 0.08 which is running on Linux 2.2.14. 
Everything works fine, until, I `apachectl stop`, then add the following
to the httpd.conf:
PerlModule Apache::AutoIndex
When I do `bin/httpd -X` Linux does a core dump.

In the process, I noticed the awkwardness of the httpd.conf
"LoadModule","AddModule" directive pair.

Apache's httpd knows which modules are statically linked (evidenced by
httpd -l).   Modules should not be loaded ("LoadModule") if they are linked
statically, and conversely, DSO modules can not be added ("AddModule") if
they are not loaded (LoadModule).  

Perhaps a better directive would just be "EnableModule", so that a DSO
module would be both loaded and enabled and a statically linked  module
would not activated unless it was enabled ("EnableModule").  (I know this
sounds simple, and probably why it can't be implemented. :)






AutoIndex.pm reading autoindex directives

2000-08-14 Thread George Sanderson

Well I finally got AutoIndex to load and run.  But, . . . It does not read
the autoindex directives from the httpd.conf file.  I believe these are
suppose to be processed by Apache::Icon.

My httpd.conf is:
#
PerlModule Apache::AutoIndex
PerlModule Apache::Icon
SetHandler perl-script
PerlHandler Apache::AutoIndex
PerlTransHandler Apache::AutoIndex-transhandler
#
Note that in order to get the last line to work I had modify the
transhandler method in order to make it a object-oriented (sub transhandler
($$)) method.

Can someone please point me in the right direction so that
AutoIndex.pm/Icon.pm read and process the httpd.conf autoindex directives?
Thank you.




Re: Apache 1.3.12/mod_perl 1.24/Perl 5.6.0 crash

2000-08-11 Thread George Sanderson

Let me try this again.
Recap:
I have Apache 1.3.12 using mod_perl 1.24 as a DSO, built with Perl 5.6.0
using Apache::AutoIndex 0.08 which is running on Linux 2.2.14. 
Everything works fine, until, I `apachectl stop`, then add the following to
the httpd.conf:
PerlModule Apache::AutoIndex
When I do `bin/httpd -X` Linux does a core dump.

Has anyone tried this configuration with AutoIndex.pm with either
successful or with problems?
The following is the gdb bt listing:
=
(gdb) bt 
Program received signal SIGSEGV, Segmentation fault. 
0x8054b09 in ap_remove_module () 
(gdb) bt 
#0 0x8054b09 in ap_remove_module () 
#1 0x8054bdf in ap_remove_loaded_module () 
#2 0x804f2cc in unload_module () 
#3 0x805126e in run_cleanups () 
#4 0x804f910 in ap_clear_pool () 
#5 0x8060683 in standalone_main () 
#6 0x8060f23 in main () 
#7 0x2ab304a5 in __libc_start_main () from /lib/libc.so.6 
#8 0x815b in ?? () 
Cannot access memory at address 0xe853.

The following is tail end of a verbose strace ouput during a core dump. 
=
open("/usr/local/apache/logs/error_log.test", O_WRONLY|O_APPEND|O_CREAT,
0666) = 4
fcntl(4, F_DUPFD, 15)   = 15
close(4)= 0
fcntl(15, F_GETFL)  = 0x401 (flags O_WRONLY|O_APPEND)
fstat(15, {st_mode=S_IFREG|0644, st_size=13212, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,0) =
0x2aac
_llseek(15, 0, [0], SEEK_CUR)   = 0
dup2(15, 2) = 2
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
open("/usr/local/apache/conf/apache-mime.types", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=7374, ...}) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=7374, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,0) =
0x2aac8000
read(4, "# This is the default mime.types"..., 4096) = 4096
read(4, "m.EXT\napplication/vnd.osa.netdep"..., 4096) = 3278
brk(0x848)  = 0x848
read(4, "", 4096)   = 0
close(4)= 0
munmap(0x2aac8000, 4096)= 0
open("/usr/local/apache/logs/access_log.test", O_WRONLY|O_APPEND|O_CREAT,
0644)= 4
fcntl(4, F_DUPFD, 15)   = 16
close(4)= 0
getpid()= 1404
time(NULL)  = 965956118
close(16)   = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
munmap(0x2ad9d000, 14288)   = 0
munmap(0x2ae0a000, 16308)   = 0
munmap(0x2ae0e000, 13712)   = 0
munmap(0x2ae12000, 22668)   = 0
munmap(0x2ada1000, 9064)= 0
munmap(0x2ae18000, 46408)   = 0
munmap(0x2ae24000, 29000)   = 0
munmap(0x2ae2c000, 9736)= 0

--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
=
The following is the tail end of a mod_perl PERL_TRACE output:
=
  5:   _compile();
   entering CGI::_compile
665:my($func) = $AUTOLOAD;
666:my($pack,$func_name);
667:{
668:local($1,$2); # this fixes an obscure variable
suicide problem.
668:local($1,$2); # this fixes an obscure variable
suicide problem.
669:$func=~/(.+)::([^:]+)$/;
670:($pack,$func_name) = ($1,$2);
671:$pack=~s/::SUPER$//;# fix another obscure problem
673:unless defined(${"$pack\:\:AUTOLOADED_ROUTINES"});
672:$pack = ${"$pack\:\:AutoloadClass"} ||
$CGI::DefaultClass
675:my($sub) = \%{"$pack\:\:SUBS"};
675:my($sub) = \%{"$pack\:\:SUBS"};
676:unless (%$sub) {
682:   my($code) = $sub-{$func_name};
684:   $code = "sub $AUTOLOAD { }" if (!$code and
$func_name eq 'DESTROY');
685:   if (!$code) {
695:   die "Undefined subroutine $AUTOLOAD\n" unless $code;
696:   eval "package $pack; $code";
697:   if ($@) {
702:CORE::delete($sub-{$func_name});  #free storage
703:return "$pack\:\:$func_name";
   exited CGI::_compile
   2:   foreach (@_) {
  exited CGI::AUTOLOAD for CGI::_compile_all
exited CGI::_setup_symbols
exited CGI::compile
46: 1;
3:
entering Config::DESTROY
exited Config::DESTROY
entering IO::Handle::DESTROY
exited IO::Handle::DESTROY
Carp::(/usr/local/lib/perl5/5.6.0/Carp.pm:97):
97: { local $@; require Carp::Heavy; }  # XXX fix require to not
clear $@?
Carp::(/usr/local/lib/perl5/5.6.0/Carp.pm:97):
97: { local $@; require Carp::Heavy; }  # XXX fix require to not
clear 

Re: Apache 1.3.12/mod_perl 1.24/Perl 5.6.0 crash

2000-08-11 Thread George Sanderson

At 03:59 PM 8/11/00 -0700, you wrote:
Just curious, but how did you build 5.6.0?  Running 5.6.0 and  
mdo_perl dso,  I got the same thing.  Have you tried compiling it 
statically?

On 11 Aug 2000, at 16:52, George Sanderson wrote:
 Let me try this again.
 Recap:
 I have Apache 1.3.12 using mod_perl 1.24 as a DSO, built with Perl
 5.6.0 using Apache::AutoIndex 0.08 which is running on Linux 2.2.14.
 Everything works fine, until, I `apachectl stop`, then add the
 following to the httpd.conf: PerlModule Apache::AutoIndex When I do
 `bin/httpd -X` Linux does a core dump.
 
 
I really like the modular nature of DSO.  One benifit from the DSO is that,
I can just rebuild mod_perl independently of httpd.  I normally build a
production and a debug version of mod_perl then start up httpd on a
differnt port to toubleshoot problems.  I have tried the static build in
the past but not resently.  Do you know if there is more success one way or
the other (static vr. DSO)?

I've attached the Perl 5.6.0 config.sh file.
 
For mod_perl I used a makepl_args.mod_perl file in the src root as follows:
EVERYTHING=1
#PERL_DEBUG=1
#PERL_TRACE=1
USE_APXS=1
WITH_APXS=/usr/bin/apxs
#DO_HTTPD=1
#NO_HTTPD=1
#PREP_HTTPD=1
APACHE_PREFIX=/usr/local/apache
APACHE_SRC=/usr/src/apache_1.3.12/src


#!/bin/sh
#
# This file was produced by running the Configure script. It holds all the
# definitions figured out by Configure. Should you modify one of these values,
# do not forget to propagate your changes by running "Configure -der". You may
# instead choose to run each of the .SH files by yourself, or "Configure -S".
#

# Package name  : perl5
# Source directory  : .
# Configuration time: Fri Aug 11 12:29:20 CDT 2000
# Configured by : george
# Target system : linux estore.xorgate.com 2.2.14 #3 sat jan 15 08:41:41 cst 
2000 i586 unknown 

Author=''
Date='$Date'
Header=''
Id='$Id'
Locker=''
Log='$Log'
Mcc='Mcc'
RCSfile='$RCSfile'
Revision='$Revision'
Source=''
State=''
_a='.a'
_exe=''
_o='.o'
afs='false'
alignbytes='4'
ansi2knr=''
aphostname='/bin/hostname'
api_revision='5'
api_subversion='0'
api_version='5'
api_versionstring='5.005'
ar='ar'
archlib='/usr/local/lib/perl5/5.6.0/i586-linux'
archlibexp='/usr/local/lib/perl5/5.6.0/i586-linux'
archname64=''
archname='i586-linux'
archobjs=''
awk='awk'
baserev='5.0'
bash=''
bin='/usr/bin'
bincompat5005='undef'
binexp='/usr/bin'
bison=''
byacc='byacc'
byteorder='1234'
c=''
castflags='0'
cat='cat'
cc='gcc'
cccdlflags='-fpic'
ccdlflags='-rdynamic -Wl,-rpath,/usr/local/lib/perl5/5.6.0/i586-linux/CORE'
ccflags='-fno-strict-aliasing -I/usr/local/include'
ccsymbols='__GNUC_MINOR__=91 __i386=1 __i386__=1 __i686=1 __i686__=1 __linux=1 
__linux__=1 __pentiumpro=1 __pentiumpro__=1 __unix=1 __unix__=1 cpu=i386 machine=i386 
pentiumpro=1 system=posix system=unix'
cf_by='george'
cf_email='[EMAIL PROTECTED]'
cf_time='Fri Aug 11 12:29:20 CDT 2000'
charsize='1'
chgrp=''
chmod=''
chown=''
clocktype='clock_t'
comm='comm'
compress=''
contains='grep'
cp='cp'
cpio=''
cpp='cpp'
cpp_stuff='42'
cppccsymbols='__ELF__=1 __GNUC__=2 i386=1 i686=1 linux=1 unix=1'
cppflags='-fno-strict-aliasing -I/usr/local/include'
cpplast='-'
cppminus='-'
cpprun='gcc -E'
cppstdin='gcc -E'
cppsymbols='__GNUC_MINOR__=91 _POSIX_C_SOURCE=199506 _POSIX_SOURCE=1 __STDC__=1 
__i386=1 __i386__=1 __i686=1 __i686__=1 __linux=1 __linux__=1 __unix=1 __unix__=1'
crosscompile='undef'
cryptlib=''
csh='csh'
d_Gconvert='gcvt((x),(n),(b))'
d_PRIEldbl='define'
d_PRIFldbl='define'
d_PRIGldbl='define'
d_PRIX64='define'
d_PRId64='define'
d_PRIeldbl='define'
d_PRIfldbl='define'
d_PRIgldbl='define'
d_PRIi64='define'
d_PRIo64='define'
d_PRIu64='define'
d_PRIx64='define'
d_access='define'
d_accessx='undef'
d_alarm='define'
d_archlib='define'
d_atolf='undef'
d_atoll='define'
d_attribut='define'
d_bcmp='define'
d_bcopy='define'
d_bincompat5005='undef'
d_bsd='undef'
d_bsdgetpgrp='undef'
d_bsdsetpgrp='undef'
d_bzero='define'
d_casti32='undef'
d_castneg='define'
d_charvspr='undef'
d_chown='define'
d_chroot='define'
d_chsize='undef'
d_closedir='define'
d_const='define'
d_crypt='define'
d_csh='define'
d_cuserid='define'
d_dbl_dig='define'
d_difftime='define'
d_dirnamlen='undef'
d_dlerror='define'
d_dlopen='define'
d_dlsymun='undef'
d_dosuid='undef'
d_drand48proto='define'
d_dup2='define'
d_eaccess='undef'
d_endgrent='define'
d_endhent='define'
d_endnent='define'
d_endpent='define'
d_endpwent='define'
d_endsent='define'
d_endspent='define'
d_eofnblk='define'
d_eunice='undef'
d_fchmod='define'
d_fchown='define'
d_fcntl='define'
d_fd_macros='define'
d_fd_set='define'
d_fds_bits='undef'
d_fgetpos='define'
d_flexfnam='define'
d_flock='define'
d_fork='define'
d_fpathconf='define'
d_fpos64_t='undef'
d_fs_data_s='undef'
d_fseeko='define'
d_fsetpos='define'
d_fstatfs='define'
d_fstatvfs='define'
d_ftello='define'
d_ftime='undef'
d_getcwd='define'
d_getfsstat='undef'
d_getgrent='define'
d_getgrps='define'
d_gethbyaddr='define'
d_gethbyname='define'
d_gethent

Re: httpd.conf directive PerlHandler Apache::Hello-handler errors

2000-08-10 Thread George Sanderson

Ah I C, said the Perl man!
Thank you for the clarification.

At 09:55 AM 8/10/00 -0500, you wrote:
[EMAIL PROTECTED] (G.W. Haywood) wrote:

Hi there,

On Wed, 9 Aug 2000, George Sanderson wrote:

 PerlModule Apache::Hello
 Location /hello/world
 SetHandler perl-script 
 PerlHandler Apache::Hello-handler
 /Location
 #
 Results in the following error_log output: 
 [Sun Aug 6 21:48:02 2000] [error] Undefined subroutine
 Apache::Hello-handler::handler
 called at PerlHandler subroutine `Apache::Hello-handler' line 1.

Page 70, Eagle Book.

You mean

PerlHandler Apache::Hello::handler

To clarify - some handlers can be called using object-oriented
techniques, and some can't.  The switch for this behavior is that the
handler is prototyped with ($$).  Apache::Hello isn't, so you can't call
its handler as a method, only as a function.

Eagle book, p. 190.
 




Re: Apache 1.3.12/mod_perl 1.24/Perl 5.6.0 crash

2000-08-10 Thread George Sanderson

At 10:49 PM 8/10/00 +0200, you wrote:
On Thu, Aug 10, 2000 at 07:39:24AM -0500, George Sanderson wrote:
 At 12:22 PM 8/10/00 +0200, you wrote:
 
 with almost the same conf as your, I had a core dump even with httpd
 -t. I did a strace, and I noticed this is due to an inexistant module :
 Tie::*hash or something similar. A quick search on CPAN give me the
 package to install. After that, no more segfault ...
 
 I did a strace and the last entries were:
 
 munmap(0x2ae2c000, 9736)= 0
 --- SIGSEGV (Segmentation fault) ---
 +++ killed by SIGSEGV +++
 
 Could this be a lack of memory?

dunno...
if you haven't answer on the list, perhaps a more verbose strace trace
could help...


Good luck,

Thanks (I'd rather be lucky than good!-)
Recap:
I have Apache 1.3.12 using mod_perl 1.24 as a DSO, built with Perl 5.6.0
using Apache::AutoIndex 0.08 which is running on Linux 2.2.14. 
Everything works fine, until, I `apachectl stop`, then add the following to
the httpd.conf:
PerlModule Apache::AutoIndex
When I do `bin/httpd -X` Linux does a core dump.

I added more memory the computer but the program still crashes at the same
point.

Here's more of a more verbose strace ouput during the core dump. 
Any clues?

open("/usr/local/apache/logs/error_log.test", O_WRONLY|O_APPEND|O_CREAT,
0666) = 4
fcntl(4, F_DUPFD, 15)   = 15
close(4)= 0
fcntl(15, F_GETFL)  = 0x401 (flags O_WRONLY|O_APPEND)
fstat(15, {st_mode=S_IFREG|0644, st_size=13212, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aac
_llseek(15, 0, [0], SEEK_CUR)   = 0
dup2(15, 2) = 2
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
open("/usr/local/apache/conf/apache-mime.types", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=7374, ...}) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=7374, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x2aac8000
read(4, "# This is the default mime.types"..., 4096) = 4096
read(4, "m.EXT\napplication/vnd.osa.netdep"..., 4096) = 3278
brk(0x848)  = 0x848
read(4, "", 4096)   = 0
close(4)= 0
munmap(0x2aac8000, 4096)= 0
open("/usr/local/apache/logs/access_log.test", O_WRONLY|O_APPEND|O_CREAT,
0644) = 4
fcntl(4, F_DUPFD, 15)   = 16
close(4)= 0
getpid()= 1404
time(NULL)  = 965956118
close(16)   = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
rt_sigprocmask(SIG_BLOCK, NULL, [], 8)  = 0
munmap(0x2ad9d000, 14288)   = 0
munmap(0x2ae0a000, 16308)   = 0
munmap(0x2ae0e000, 13712)   = 0
munmap(0x2ae12000, 22668)   = 0
munmap(0x2ada1000, 9064)= 0
munmap(0x2ae18000, 46408)   = 0
munmap(0x2ae24000, 29000)   = 0
munmap(0x2ae2c000, 9736)= 0
--- SIGSEGV (Segmentation fault) ---
+++ killed by SIGSEGV +++
[
I also did a PERL_TRACE of mod_perl.  The end of which was:

  5:   _compile();
   entering CGI::_compile
665:my($func) = $AUTOLOAD;

666:my($pack,$func_name);
667:{
668:local($1,$2); # this fixes an obscure variable
suicide problem.
668:local($1,$2); # this fixes an obscure variable
suicide problem.
669:$func=~/(.+)::([^:]+)$/;
670:($pack,$func_name) = ($1,$2);
671:$pack=~s/::SUPER$//;# fix another obscure problem
673:unless defined(${"$pack\:\:AUTOLOADED_ROUTINES"});
672:$pack = ${"$pack\:\:AutoloadClass"} ||
$CGI::DefaultClass
675:my($sub) = \%{"$pack\:\:SUBS"};
675:my($sub) = \%{"$pack\:\:SUBS"};
676:unless (%$sub) {
682:   my($code) = $sub-{$func_name};
684:   $code = "sub $AUTOLOAD { }" if (!$code and
$func_name eq 'DESTROY');
685:   if (!$code) {
695:   die "Undefined subroutine $AUTOLOAD\n" unless $code;
696:   eval "package $pack; $code";
697:   if ($@) {
702:CORE::delete($sub-{$func_name});  #free storage
703:return "$pack\:\:$func_name";
   exited CGI::_compile
   2:   foreach (@_) {
  exited CGI::AUTOLOAD for CGI::_compile_all
 exited CGI::_setup_symbols
exited CGI::compile
46: 1;
3:
entering Config::DESTROY
exited Config::DESTROY
entering IO::Handle::DESTROY

Apache 1.3.12/mod_perl 1.24/Perl 5.6.0 crash

2000-08-09 Thread George Sanderson

I have Apache 1.3.12 using mod_perl 1.24 as a DSO, built with Perl 5.6.0
using Apache::AutoIndex 0.08 which is running on Linux 2.2.14.
Everything works fine, until, I `apachectl stop`, then add the following to
the httpd.conf:

PerlModule Apache::AutoIndex

When I do  `bin/httpd -X` Linux does a core dump.
Since I compiled in DEBUG the 'gdb bin/httpd core` reports a segmentation
fault with:

Program received signal SIGSEGV, Segmentation fault.
0x8054b09 in ap_remove_module ()
(gdb) bt
Program received signal SIGSEGV, Segmentation fault.
0x8054b09 in ap_remove_module ()
(gdb) bt
#0  0x8054b09 in ap_remove_module ()
#1  0x8054bdf in ap_remove_loaded_module ()
#2  0x804f2cc in unload_module ()
#3  0x805126e in run_cleanups ()
#4  0x804f910 in ap_clear_pool ()
#5  0x8060683 in standalone_main ()
#6  0x8060f23 in main ()
#7  0x2ab304a5 in __libc_start_main () from /lib/libc.so.6
#8  0x815b in ?? ()
Cannot access memory at address 0xe853.
==
I don't understand why Apache/mod_perl has to remove a module when it
should be installing it.  Maybe its just a confusing naming convention or
something?

Note: that I believe I was careful to clean out old versions before the makes.

I did have to 'not use' "large file support" for the Perl 5.6.0 build in
order to get mod_perl to launch.

Please help!   ... and thankyou for any input.  (You all do great work!)