One cgi test fails w/ "CGI open of tmpfile: Permission denied"

2000-05-05 Thread Dan Harkless


Hello.  I just ran the `make test' for mod_perl 1.23 with Apache 1.3.12, and
I got a single failure in modules/cgi.  Here's an individual run with -v:

shell1-root> TEST -v modules/cgi.t
modules/cgi.module CGI is installed
1..5
ok 1
ok 2
ok 3
ServerError:
CGI open of tmpfile: Permission denied

dump of %@:
/perl/cgi.pl = CGI open of tmpfile: Permission denied

ok 5
FAILED test 4
Failed 1/5 tests, 80.00% okay
Failed Test  Status Wstat Total Fail  Failed  List of failed
-...
modules/cgi.t 51  20.00%  4
Failed 1/1 test scripts, 0.00% okay. 1/5 subtests failed, 80.00% okay.

I checked the archive and this was discussed in January of this year with
the subject "Weird message from make test".  The only suggestions given in
that thread were to check that the permissions were 1777 on all the tmp
directories.  This is the case for me.  I do not have a ~/tmp for the root
account (actually I did, but I deleted it and the test still fails).

Nancy Lin, the original poster in that thread, said that she was running
Apache 1.3.9 on Redhat 6.0.  I'm running different versions of the software
(listed above) on Solaris/SPARC 2.6.  Both of us are running CGI.pm 2.56
(she said the problem went away after downgrading to 2.46).

As she stated, there seems to be a problem with the cgi.t test module, with
CGI.pm, or with the interaction between the two.  Hopefully someone involved
with that area of the code can take a look.

I guess I'll go ahead with my installation and hope everything's okay
despite the failure.

--
Dan Harkless
[EMAIL PROTECTED]



re: mod perl + proxy returns Document has no data

2000-05-05 Thread lists

Ok it's definitely a problem with the proxy...

Set the backend running on its own with httpd -X, run a large (3MB) upload 
and everything is fine - so no
mod_perl/embperl problem... (Thanks Gerald!)



Set both the backend and frontend running, both with httpd -X, run the same 
upload:

Frontend appears to accept the upload, but returns a document with no data.

Backend bombs out with:

[error] CGI.pm: Server closed socket during multipart read (client aborted?)

After this, any access to the back-end (directly) returns no data at all 
and is logged
as '200 - ' in the log.

This can be repeated consistently, so I guess this is a mod_proxy problem...

I have worked around by getting the front-end to run embpcgi.pl as a CGI 
script for uploads
which (so far as I have tested) works fine...








Re: perl.conf file

2000-05-05 Thread Jeff Beard

If you'll forgive a stupid question, did you include the perl.conf in the 
httpd.conf:

Include perl.conf

I've also done this:


 Include perl.conf




--Jeff

At 06:39 PM 5/5/00, James Xie wrote:

>I was trying the "Hello World" sample provided by Lincoln & Doug's book.
>It says I can put location directive in the "perl.conf" file but I don't
>have this file on my system.  I created one according to the book but it
>didn't work, the server cannot find the hello world program when I try to
>access it through browser. If I put everything in the httpd.conf then the
>program works fine.  Is perl.conf part of Apache?
>
>James
>[EMAIL PROTECTED]



Jeff Beard
_
Web:www.cyberxape.com
Email:  jeff at cyberxape.com
Location:   Boulder, CO, USA






Re: Newbie Question -

2000-05-05 Thread Gunther Birznieks

At 06:56 PM 5/5/00 -0400, Jim Winstead wrote:
>On May 05, Adi wrote:
> > You can still use CGI.pm from within mod_perl (and you should).  There is
> > nothing better at handling data passed from a browser via HTTP POST and/or
> > GET.  If you currently use CGI.pm, I think you'll find that a lot of your
> > current code can simply be cut-and-pasted into a mod_perl setup.
>
>Well, arguably Apache::Request is better at handling data passed
>from a browser via HTTP POST and/or GET in a mod_perl environment.
>And it has the advantage that is entirely focused on request
>handling, and doesn't have any of the HTML generation cruft like
>CGI.pm.

The "HTML Generation cruft" is optional "cruft" and doesn't have to be 
compiled in.


__
Gunther Birznieks ([EMAIL PROTECTED])
Extropia - The Web Technology Company
http://www.extropia.com/




perl.conf file

2000-05-05 Thread James Xie


I was trying the "Hello World" sample provided by Lincoln & Doug's book.
It says I can put location directive in the "perl.conf" file but I don't
have this file on my system.  I created one according to the book but it
didn't work, the server cannot find the hello world program when I try to
access it through browser. If I put everything in the httpd.conf then the
program works fine.  Is perl.conf part of Apache?

James
[EMAIL PROTECTED]




RE: Help - Install mod_perl-1.23

2000-05-05 Thread James Xie


Thanks, I finally got the problem resolved.  It's the permission problem, I
used Linuxconf to create my account, for some reason it didn't put my
account into users group. 

I changed my group from passwd file directly, login as myself, re-install
mod_perl. Everything was working fine now. 

James








Re: Apache 1.3.12+mod_perl + mod_ssl + FP extensions

2000-05-05 Thread Jeff Beard

The last time I included fp extensions (a while ago) I believe I applied 
that patch last. Not sure that it actually matters, though.

--Jeff

At 06:52 PM 5/5/00, Rafael Caceres wrote:
>Hi,
>
>I'm getting ready to setup the following combination of packages for our
>webserver:
>Perl 5.005
>Apache 1.3.12
>mod_perl 1.23
>mod_ssl (for Apache 1.3.12)
>FP extensions (latest RTR software version, 'compatible' with Apache 1.3.12)
>
>Is there any particular 'appropriate' order to do patching/setup? Both
>mod_ssl and the FP extensions will try to patch Apache, and I'm not sure
>what's the proper order of installation. Any and all help is greatly
>appreciated.
>
>Regards,
>Rafael



Jeff Beard
_
Web:www.cyberxape.com
Email:  jeff at cyberxape.com
Location:   Boulder, CO, USA






Re: Apache::ASP - Win32?

2000-05-05 Thread Capriotti

Hi !

I am a newbie as well, but I've been frying my ass over mod_perl and ASP
for the last few days, and I think I can answer this one.

Once you get Perl working on your OS, you will be able to compile mod_perl,
and, consequently, compile/build Apache::ASP.

Therefore the answer would be : YES it will run; Once you compile Prel, the
rest will be platform-independent.

BUT, if you want to start conquering your freedom, I suggest you to Start
using FreeBSD, Linux, OpenBSD, NetBSD, or other free platform.

I hope it helps.

[]s

Capriotti


At 17:03 05-05-00 -0700, you wrote:
>I'm a beginner when it comes to web servers.  Will Apache::ASP run with the 
>Win32 version?
>
>TCM
>
>
>



Compiling mod_perl

2000-05-05 Thread Rich Theisen

Hello,
  I can build Apache 1.3.11 with mod_perl 1.21 without any difficulties
using mod_perl. The problem comes in when I try to incorperate mod_ssl
or mod_jserv. I can build Apache with either mod_ssl or mod_jserv
without any problems. (I haven't tried yet combining both mod_ssl and
mod_jserv with Apache.)
  I've tried using mod_perl to build Apache and the third party modules.
I've also tried compiling mod_perl independantly and the compile Apache
with the other modules. When I try to compile the parts independantly,
mod_perl always comes back with errors stating undefined reference. I've
tried to include the required include files. I still get the same error.

  I've gotten to a point where I'm ready to not include mod_perl. Any
help is appreciated! The system I'm using is a Sun Ultra 2 running
Solaris 2.6.

Thank you,
  Richard




Re: Apache::ASP - Win32?

2000-05-05 Thread Joshua Chamas

"Thomas C. Maresh" wrote:
> 
> I'm a beginner when it comes to web servers.  Will Apache::ASP run with the
> Win32 version?
> 

Yes, but you will need to get a whole apache modperl win 
build, listed at http://perl.apache.org/distributions.html

Note too that this is perl scripting only, not vbscript,
which is much better anyway :), but will only run 
one thread at a time, so you have to know what you are
doing if you want to put this into production.  I use
this more for development, and light production, but 
the real power comes when moving to a Unix environment.

-- Joshua



Apache 1.3.12+mod_perl + mod_ssl + FP extensions

2000-05-05 Thread Rafael Caceres

Hi,

I'm getting ready to setup the following combination of packages for our
webserver:
Perl 5.005
Apache 1.3.12
mod_perl 1.23
mod_ssl (for Apache 1.3.12)
FP extensions (latest RTR software version, 'compatible' with Apache 1.3.12)

Is there any particular 'appropriate' order to do patching/setup? Both
mod_ssl and the FP extensions will try to patch Apache, and I'm not sure
what's the proper order of installation. Any and all help is greatly
appreciated.

Regards,
Rafael 




Re: Apache::ASP not working under FreeBSD 4

2000-05-05 Thread Joshua Chamas

Ime Smits wrote:
> 
> <...>
> 
>   SetHandler perl-script
>   PerlHandler Apache::ASP
>   PerlSetVar Global /www/data/state
> 
> 
> (change the last directory to some place where your Apache UID can write,
> this is where the session objects are stored)
> 
> Second option, leave your httpd.conf as is, without any Apache::ASP in it,
> just with the "AllowOveride All" as you have it, and put the 5 lines as
> above in the directory where your *.asp scripts are in a file called
> .htaccess. So if your DocumentRoot is '/usr/local/etc/apache/htdocs' and
> your eg directory with examples from Apache:::ASP resides there, save this
> file to '/usr/local/etc/apache/htdocs/eg/.htaccess . Everything in .htaccess
> will automatically apply to the complete directory tree thereunder.
> 

I think Ime has done a good job with the pointers here.  
>From a top level perspective, you must first configure Apache
to use Apache::ASP in the httpd.conf.  This can be done with 
the Files directive, or an AllowOverride All ... then copy over
the site/eg dir from the distribution to your apache doc
root, and hit it with a http URL that corresponds to that
ASP examples directory.

Note that all of the Perl* commands are mod_perl specific, 
but everything else is for configuring Apache, so part of 
the process here is you getting to learn how to configure
the Apache server in general.

The asp site is at http://www.nodeworks.com/asp/ and may
be of some use to you.

-- Joshua



Apache::ASP - Win32?

2000-05-05 Thread Thomas C. Maresh

I'm a beginner when it comes to web servers.  Will Apache::ASP run with the 
Win32 version?

TCM




Re: Apache::Session question

2000-05-05 Thread Neil Conway

On Fri, May 05, 2000 at 05:58:33PM +0200, Francesc Guasch wrote:
>> [Solaris + Apache::Session]
> After the use Apache::Session you maybe have
> to type something like this.
> 
> $Apache::Session::SysVSemaphoreLocker::nsems=16;

In my preliminary testing, it appears this is also necessary to get SysVSem
working on FreeBSD 3.x (I'm not running 4, but it may also apply there). Can
someone confirm this? I had some problems with Apache::Session, tried the
above fix, and it seemed to work, but I haven't used Apache::Session since, so
I can't be sure.

If it IS necessary, it should probably be added to the guide and / or comments
in the Apache::Session .pm that controls this (can't remember the filename
offhand, but it had a comment referring to Solaris + nsems=16 or 8).

TIA

-- 
Neil Conway <[EMAIL PROTECTED]>
Get my GnuPG key from: http://klamath.dyndns.org/mykey.asc
Encrypted mail welcomed

It is dangerous to be right when the government is wrong.
-- Voltaire

 PGP signature


Re: Can't use Apache::exit() in command-line scripts

2000-05-05 Thread Bill Moseley

At 12:05 AM 05/04/00 -0700, Doug MacEachern wrote:
>you're calling exit in a module?  shame on you.  if you call exit() from a
>script that is compiled by Apache::Registry (not include *.pm), exit()
>will be overridden for you to call Apache::exit, no changes needed.
>if you really want to call it in a module, which you really don't, do you?

I'm a bit confused.

When you say "module" you mean a module use'd by the Apache::Registry
script?  Because exit() is overridden in those modules, too, no?

I can call exit() fine in a module, but if I say CORE::exit() the child is
killed off.




Bill Moseley
mailto:[EMAIL PROTECTED]



Re: Newbie Question -

2000-05-05 Thread Adi

Jim Winstead wrote:
> 
> On May 05, Adi wrote:
> > You can still use CGI.pm from within mod_perl (and you should).  There is
> > nothing better at handling data passed from a browser via HTTP POST and/or
> > GET.  If you currently use CGI.pm, I think you'll find that a lot of your
> > current code can simply be cut-and-pasted into a mod_perl setup.
> 
> Well, arguably Apache::Request is better at handling data passed
> from a browser via HTTP POST and/or GET in a mod_perl environment.
> And it has the advantage that is entirely focused on request
> handling, and doesn't have any of the HTML generation cruft like
> CGI.pm.

Wow, I wasn't aware of Apache::Request.. thanks for letting me know.



Re: Newbie Question -

2000-05-05 Thread Jim Winstead

On May 05, Adi wrote:
> You can still use CGI.pm from within mod_perl (and you should).  There is
> nothing better at handling data passed from a browser via HTTP POST and/or
> GET.  If you currently use CGI.pm, I think you'll find that a lot of your
> current code can simply be cut-and-pasted into a mod_perl setup.

Well, arguably Apache::Request is better at handling data passed
from a browser via HTTP POST and/or GET in a mod_perl environment.
And it has the advantage that is entirely focused on request
handling, and doesn't have any of the HTML generation cruft like
CGI.pm.

(But you are certainly correct in saying that you can continue to
use CGI.pm with mod_perl.)

Jim



Re: PerlAddVar ?

2000-05-05 Thread brian moseley

On Fri, 5 May 2000, Doug MacEachern wrote:

> > Cool! I guess it's a non-documented feature :)
> 
> it's documented in ch9 of the eagle book :)

:)




Re: Newbie Question -

2000-05-05 Thread Adi

"Pierre J. Nicolas" wrote:
> 
> Good Morning,
> 
> I just started using mod_perl, I'm still using the CGI.pm module, but I
> plan
> to convert.

You can still use CGI.pm from within mod_perl (and you should).  There is
nothing better at handling data passed from a browser via HTTP POST and/or
GET.  If you currently use CGI.pm, I think you'll find that a lot of your
current code can simply be cut-and-pasted into a mod_perl setup.

-Adi




Re: PerlAddVar ?

2000-05-05 Thread Stas Bekman

> > Cool! I guess it's a non-documented feature :)
> 
> it's documented in ch9 of the eagle book :)

If it is, consider it documented in the next version of the Guide :)

__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




Re: PerlAddVar ?

2000-05-05 Thread Doug MacEachern

> Cool! I guess it's a non-documented feature :)

it's documented in ch9 of the eagle book :)




Re: PerlAddVar ?

2000-05-05 Thread Stas Bekman

On Fri, 5 May 2000, Doug MacEachern wrote:

> On Fri, 5 May 2000, Stas Bekman wrote:
>  
> > OK, if this is the case, I'd prefer to have only one variable type -- an
> > array - so $r->dir_config will always return a list. So if it's a sigular
> > value, it'll be the first element. If you want it to be a hash -- you can
> > have it as well. This makes thing simple and even eliminates the need for
> > PerlSetVar, you can have only PerlAddVar for everything. 
> 
> my @values = $r->dir_config->get('Key');
> and
> my %hash = $r->dir_config->get('Key');
> 
> already does that, regardless of using PerlSetVar or PerlAddVar.
> although, PerlSetVar would end up with odd number of elements for %hash.

Cool! I guess it's a non-documented feature :)

__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




Re: PerlHandler stopped working???

2000-05-05 Thread Doug MacEachern

On Fri, 5 May 2000, Matt Sergeant wrote:
 
> Really really freaky. However I assume you saw the post - I solved it by
> doing push_handler() with a Fixup and returning DECLINED. That way
> mod_mime gets to do its stuff, and my content_type still gets set
> regardless.

yeah, i know, it's cinco de mayo, so take that code with a tequilla shot
and some grains of salt ;)




Re: Redirecting Problem --- Please look at this patiently.

2000-05-05 Thread Doug MacEachern

On Fri, 5 May 2000, sadhanandham balaraman wrote:

> Hi Gurus,
>I'm facing a typical problem in Apache web server. The problem is that I 
> want to call a perl script whenever a request is made to the server, and 
> that script should be able to change the URI and submit to the server back.
> 
>The thing I got from the net is that adding PerlscriptTransHandler 
> directive will call a perl script, whenever request is made. The problem 
> with this is that it disables Alias and ScriptAlias directives, so my other 
> perl scripts won't run.

if your PerlTransHandler returns OK, then the mod_alias translate handler
is skipped.  just change the uri in your TransHandler and return DECLINED
to let mod_alias do it's thing.
 
>  The other thing is redirecting any request using RewriteRule. I used 
> this to redirect any request to my perl script which again redirects to 
> another document which is in same server by 'Location' header. The problem 
> is that it goes to endless recursive request loop.
> 
>  So how to call a perl script or redirect the request to the SAME web 
> server.

$r->internal_redirect should work.  we'd need a tiny example that
reproduces the recursion problem to help with that.




Re: newbie problem..

2000-05-05 Thread Doug MacEachern

On Fri, 5 May 2000, Kiran Banoor wrote:

> hi,
> 
> I have written a handler for controlling access control on the basis of
> domain/ip address so that  i can restrict the users on the limit of sessions
> from a perticular domain name.And i placed my handler in .htaccess file.
> The problem is when request is made by the client for a perticular file and
> it goes to my handler Gatekeeper.pm were if the requested file is having any
> ssis it takes as a seperate request so i don't know wether it is write or
> not and when i send the file by using send_fd(filehandle)it just displays
> the contents of the document but not the ssis.
> Another problem is when i set the cookie in the header and use the
> send_fd(filehandle)to send the file back it will not work but if i use
> print() it works i don't know why ..

i don't see why print() would end up with different results than
send_fd().  sounds like what you really want is
$r->lookup_uri('/foo.ssi')->run





RE: Newbie Question -

2000-05-05 Thread Doug MacEachern

 
> mod_perl overrides the perl print() function - print()ing to STDOUT
> explititly will not work.
> just use print() if you can...

sure it will,

print STDOUT "hi";

and

print "hi";

are the same thing, provided STDOUT is the currently selected output
filehandle, which it is by default.




Re: Newbie Question -

2000-05-05 Thread Doug MacEachern

On Fri, 5 May 2000, Pierre J. Nicolas wrote:

> Good Morning,
> 
> I just started using mod_perl, I'm still using the CGI.pm module, but I
> plan
> to convert.  I've loaded the Apache::Registry and I'm experiencing a
> strange
> problem.
> 
> I have this snippet:
> 
>print "Content-Type: text/html\n\n";
>print_template(file_handle, *file_handle_ref) {
>  open file_handle()
>  while (file_handle()) {
>manipulate current_line
>print file_handle_ref
> current_line
>   }
>}
> 
> where "*file_handle_ref" could be a reference to STDOUT,
> this snippet worked fine, but now it stopped working, instead
> I get the message "The document contained no data"

are you saying you re-open STDOUT?  if so, you break the tie to the
browser.  but, i don't understand the code you've posted, if you have a
tiny example that we can actually run, we should be able to see the
problem.




Re: [Q ]Differences between RequestNotes and Request ?

2000-05-05 Thread Doug MacEachern

On Fri, 5 May 2000, Thierry-Michel Barral wrote:
 
> I have another question, no connection from the previous one:
> 
> I believe using 
> 
> open FH " 
> is in fact a call to the shell. Right ?

no!  but open FH, "cal|"; would result in a fork/subprocess.  see the
perldocs, this is not any different under mod_perl.
 
> So, in mod_perl, I prefer not to call the shell, so is
> 
> $fh= new IO::File($filename, "r");
> 
> a better solution ?

no!  that calls the builtin open() underneath, so it's no different in
the end, other than the extra layers to get there.




Re: apxs and first class configuration

2000-05-05 Thread Doug MacEachern

On Fri, 5 May 2000, Stas Bekman wrote:

> On Fri, 5 May 2000, Matt Sergeant wrote:
> 
> > When building first class configuration directives, you run Makefile.PL
> > and it says:
> > 
> > which: no apxs in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin)
> > apxs:Error: Sorry, no DSO support for Apache available
> > apxs:Error: under your platform. Make sure the Apache
> > apxs:Error: module mod_so is compiled into your server
> > apxs:Error: binary `/usr/local/apache/bin/httpd'.
> > 
> > But it compiles correctly anyhow. Is this just a check to make sure you
> > have mod_so compiled in?
> 
> It's a warning. Corrected in the CVS version. -- check out the archives
> and the Changes file. It's harmless.

the correction is part of 1.23 too.




Re: PerlAddVar ?

2000-05-05 Thread Doug MacEachern

On Fri, 5 May 2000, Stas Bekman wrote:
 
> OK, if this is the case, I'd prefer to have only one variable type -- an
> array - so $r->dir_config will always return a list. So if it's a sigular
> value, it'll be the first element. If you want it to be a hash -- you can
> have it as well. This makes thing simple and even eliminates the need for
> PerlSetVar, you can have only PerlAddVar for everything. 

my @values = $r->dir_config->get('Key');
and
my %hash = $r->dir_config->get('Key');

already does that, regardless of using PerlSetVar or PerlAddVar.
although, PerlSetVar would end up with odd number of elements for %hash.




Re: how to get Devel::Symdump working with mod_perl code?

2000-05-05 Thread Doug MacEachern

On Thu, 4 May 2000, Tom Roche wrote:

> I'm trying to use Devel::Symdump to document code, but Perl
> is choking when it hits (what appears to me to be) autoloadable
> stuff. I'd like to know how to invoke (or patch, or whatever) Perl in
> such a way so as to ignore such problems (or perhaps merely warn/carp
> about them), or how to run Devel::Symdump under Apache.
 
> Unfortunately Loader, or rather Perl, is having a problem with
> Apache::DBI.pm. The first source file require's OK. The second source
> file, GetDBs.pm, use's Apache::DBI(), line 202 of which is
> 
> > ) if ($INC{'Apache.pm'} and Apache->module('Apache::Status'));

that's because Apache::module is only defined when you're running inside
httpd.  that line should be something like:

if ($INC{'Apache.pm'} and $ENV{MOD_PERL} and Apache->module('Apache::Status'));

to work inside and outside httpd.





Re: Why does $r->print() dereference its arguments?

2000-05-05 Thread Doug MacEachern

On Thu, 4 May 2000, Jeffrey W. Baker wrote:
 
> Not strictly for debugging, but for introspection.  I was toying with 
> a module that pokes around inside the perlguts of a running mod_perl
> server and makes some nice displays out of them.  Nothing for 
> production/money mind you, just amusement.

i did have reservations when adding the stunt, but i figured the chances
of somebody printing a $reference on purpose, which was not interpolated
in another string already were pretty slim.  seems you're the first to
notice in the two years since the "feature" was added :)
btw, just to be clear, $strings passed to $r->print() are not copied, they
are passed by reference, just like any argument to a subroutine.  but
most subroutines copy the arguments into their own variables, e.g.:

sub foo {
my ($header, $body, $footer) = @_;

so the idea was that you could pass around references to strings, which
end up being passed to $r->print, without having to worry about
dereferencing.
 
> Here is a patch I made against the documentation in Apache.pm.  Actually,
> I had to attach it because it was wrapping.

thanks!




Re: PerlAddVar ?

2000-05-05 Thread Matt Sergeant

On Fri, 5 May 2000, Doug MacEachern wrote:

> On Thu, 4 May 2000, Matt Sergeant wrote:
>  
> > How do you get at $r in a directive handler?
> 
> other way around, you get at directive handler config from a handler,
> which has been passed $r, e.g.:
> 
> sub handler {
> my $r = shift;
> my $cfg = Apache::ModuleConfig->get($r, __PACKAGE__);
> 
> $cfg would contain the data stashed by the directive handler.

Ya - got that bit now. See AxKit 0.57 - it has an overloadable class for
getting the configuration, so you can either get it from
ModuleConfig() via .htaccess, or provide another method, such as brian
wants to be able to emulate Cocoon 2's sitemap feature. This allows you to
do that. Gotta love OO.

For anyone interested, AxKit is proceeding at an incredible rate. We've
now got an almost complete XSLT implementation curtesy of the Sablotron
library, and lots of other excellent things going on.

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




Re: Apache::ModuleConfig

2000-05-05 Thread Doug MacEachern

On Thu, 4 May 2000, Matt Sergeant wrote:

> On Thu, 4 May 2000, raptor wrote:
> 
> > hi,
> > someone to know is there Apache::ModuleConfig as separate package...?
> 
> No, it comes with mod_perl. I think you require mod_perl 1.17 or
> higher. Can anyone on the mod_perl list confirm this?

according to cvs log, it was added 2 years ago on the 10th of this month,
let's hope nobody is using a mod_perl older than that :)




Re: PerlAddVar ?

2000-05-05 Thread Doug MacEachern

On Thu, 4 May 2000, Matt Sergeant wrote:
 
> How do you get at $r in a directive handler?

other way around, you get at directive handler config from a handler,
which has been passed $r, e.g.:

sub handler {
my $r = shift;
my $cfg = Apache::ModuleConfig->get($r, __PACKAGE__);

$cfg would contain the data stashed by the directive handler.
 
> Anyhow, in the end I went for first class configuration directives, so now
> with AxKit you can go:
> 
> AddStyleMap text/xsl Apache::AxKit::Language::XSLT
> AddStyleMap application/x-xpathscript Apache::AxKit::Language::XPathScript
> 
> Very cool - I was amazed it worked first time!

:)




Re: Modperl/Apache deficiencies... Memory usage.

2000-05-05 Thread Doug MacEachern

On Thu, 4 May 2000 [EMAIL PROTECTED] wrote:
 
> Sounds like a good plan.  The first piece to put together is the
> script that can register callbacks, and iterate through the perl
> threads.  Do we have a devel version that's got the mip->avail type
> stuff together, or is this something that will be coming together in
> the next few weeks?

it's in there now.

>  Okay so this is a module that would be loaded via
> httpd.conf so that the thread can be spun off, and it can begin
> analyzing.  It should have some parameters so that it doesn't suck up
> too much CPU time, like sleep n seconds between jumping to the next
> apache embedded interpreter thread, blah, blah.  Are we going to dump
> this info to perlmemorylogs?  (Configurable to some location, etc)  Or
> integrate it with some sort of online status program?
>   Or both..., hehe, well, of course that's all
> later, first piece is to get the iterator built that registers
> callbacks.  As an aside, I think the callback thing was a really good
> idea on your part, that way you can analyze how much memory your
> programs are using and whether you need to re-think your design
> strategy or implement a cleaner.  Any cleaner, a real aggresive one,
> or a really kick back one.  In any event, I just wanted to mention
> that this was a really good idea of yours (the callbacks).

assuming your moving forward with this (making you a hero :), you should
be able to put the majority of it together without looking at the
mod_perl-2.0 source first.  the only thing you need to keep in mind is
that the c functions need to accept a PerlInterpreter argument with
-Dusethreads Perls.  Perl has some macros to deal with this "implicit
context", which would look something like so:

void symbol_table_walk(pTHX_ char *package, int recurse, ...)

testing with a vanilla Perl, you would call that like so:

symbol_table_walk(aTHX_ "main", TRUE, ...);

once it's integrated into mod_perl, something like so:

{
#ifdef USE_ITHREADS;
pTHX;
modperl_interp_t *interp = modperl_interp_get(...);
aTHX = interp->perl;
#endif

symbol_table_walk(aTHX_ "main", TRUE, ...);
...
}

that PerlInterpreter structure is used when macros such as:
gv_fetchpv("main", FALSE);

 translate into:

Perl_gv_fetchpv(my_perl, "main", FALSE);






Re: Problem compiling mod_perl 1.23 on Solaris 2.4

2000-05-05 Thread Doug MacEachern

On Thu, 27 Apr 2000, Steve Hay wrote:

> Steve Hay wrote:
> 
> > I'm having a problem compiling mod_perl 1.23 (with Apache 1.3.12 / Perl
> > 5.6.0) as a DSO using APXS on Solaris 2.4.
> 
> In case anyone is interested...
> 
> I've solved my own problem (just as well, really).  If I re-compile
> everything with the -Xa compiler flag then it all works out fine.

what does -Xa mean?  gcc or ld flag?  i don't see anything in the gcc
manpage, 2.6 ld manpage says:

  Options No Longer Supported
 The following SunOS 4.x.y options do not have  any  replace-
 ment in this release: -B nosymbolic (this is now the default
 if -B symbolic is not used), -d, -dc, and  -dp,  (these  are
 now  the default; see -b above to override the default), -M,
 -S, -t, -x, -X, and -ysym.

maybe that means -Xa is on by default in newer solaris?




Re: PerlHandler stopped working???

2000-05-05 Thread Matt Sergeant

On Fri, 5 May 2000, Doug MacEachern wrote:

> On Tue, 25 Apr 2000, Matt Sergeant wrote:
>  
> > I do now - just uploaded a new version. It's still not correct though - a
> > proper fix would have to pull SetHandler out of mod_mime altogether, I
> > guess. For example, say your config contains:
> 
> oh yeah, i forgot, you can call mod_mime's fixup directly too:
> 
> use Apache::Module ();
> 
> my $rc = Apache::Module->top_module->find("mod_mime")->type_checker->($r);
> 
> that digs the type_checker function pointer out of the mod_mime module
> structure and returns a reference to an anonymous xsub, which calls that
> function.  neato, eh?

Really really freaky. However I assume you saw the post - I solved it by
doing push_handler() with a Fixup and returning DECLINED. That way
mod_mime gets to do its stuff, and my content_type still gets set
regardless.

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




Re: PerlHandler stopped working???

2000-05-05 Thread Doug MacEachern

On Tue, 25 Apr 2000, Matt Sergeant wrote:
 
> I do now - just uploaded a new version. It's still not correct though - a
> proper fix would have to pull SetHandler out of mod_mime altogether, I
> guess. For example, say your config contains:

oh yeah, i forgot, you can call mod_mime's fixup directly too:

use Apache::Module ();

my $rc = Apache::Module->top_module->find("mod_mime")->type_checker->($r);

that digs the type_checker function pointer out of the mod_mime module
structure and returns a reference to an anonymous xsub, which calls that
function.  neato, eh?




RE: Apache does not like

2000-05-05 Thread Todd Strand

Thanks Geoff,

Turning on the PERL_SECTIONS did the trick.

Have a fantastic day!

Todd

-Original Message-
From: Geoffrey Young [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 05, 2000 1:05 PM
To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Subject: RE: Apache does not like 


> -Original Message-
> From: Todd Strand [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 05, 2000 12:59 PM
> To: [EMAIL PROTECTED]
> Subject: Apache does not like 
>
>
> Amici,
>
> I created my httpd (Apache 1.3.12) using the mod_perl 1.23
> install process.
> The system used to have mod_perl 1.21 (Apache 1.3.9) on it. 
> In a conf file
> that is included by httpd.conf, I have a  directive. 
> The stating of
> the server is dieing of the .  (The old httpd still
> works and the
> status from both "says" it is using the same mod_perl).  Any
> ideas why the
> new one is choking on the  directive?
>
> Invalid command '', perhaps mis-spelled or defined by a
> module not
> included in the server configuration

did you build with EVERYTHING=1 or PERL_SECTIONS=1?

you can check this under perl-status?hooks

HTH

--Geoff
>
> Thanks and have a fantastic day!
>
> Todd
> 




RE: mod perl + proxy returns Document has no data

2000-05-05 Thread Gerald Richter

>
> Occasionally the back-end server gets into a state where it returns empty
> documents

When this occurs, try to directly connect to the backend, and see if this
shows the same behaviour, so we can see if it's a mod_perl/Embperl problem
or a mod_proxy problem.

Gerald

-
Gerald Richterecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:   Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925151
WWW:http://www.ecos.de  Fax:  +49 6133 925152
-




Memory leak in DBD::Connect()

2000-05-05 Thread Matt Barringer

Has anyone else come across a problem using DBD::Oracle, where
connect() leaks approximately 80k every time it is used (which, in my
case, is with every request child processes handle)?  It's negligable with
regular perl scripts, but I've seen child sizes grow to 40 megs before I
killed them all.  This problem is using the Oracle 8.1.5 libraries.

Thanks,
Matt




RE: Apache does not like

2000-05-05 Thread Geoffrey Young



> -Original Message-
> From: Todd Strand [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 05, 2000 12:59 PM
> To: [EMAIL PROTECTED]
> Subject: Apache does not like 
> 
> 
> Amici,
> 
> I created my httpd (Apache 1.3.12) using the mod_perl 1.23 
> install process.
> The system used to have mod_perl 1.21 (Apache 1.3.9) on it.  
> In a conf file
> that is included by httpd.conf, I have a  directive.  
> The stating of
> the server is dieing of the .  (The old httpd still 
> works and the
> status from both "says" it is using the same mod_perl).  Any 
> ideas why the
> new one is choking on the  directive?
> 
> Invalid command '', perhaps mis-spelled or defined by a 
> module not
> included in the server configuration

did you build with EVERYTHING=1 or PERL_SECTIONS=1?

you can check this under perl-status?hooks

HTH

--Geoff
> 
> Thanks and have a fantastic day!
> 
> Todd
> 



Apache does not like

2000-05-05 Thread Todd Strand

Amici,

I created my httpd (Apache 1.3.12) using the mod_perl 1.23 install process.
The system used to have mod_perl 1.21 (Apache 1.3.9) on it.  In a conf file
that is included by httpd.conf, I have a  directive.  The stating of
the server is dieing of the .  (The old httpd still works and the
status from both "says" it is using the same mod_perl).  Any ideas why the
new one is choking on the  directive?

Invalid command '', perhaps mis-spelled or defined by a module not
included in the server configuration

Thanks and have a fantastic day!

Todd




Apche authentication

2000-05-05 Thread Rishi Maker

Sorry I dont know Anything about ModPerl



I just wanna know if ModPerl can help me in this. I was surfing appache.org and found 
out about modperl. Will it solvemy problem. I am allready downloading it.
-- 
---
Signature Follows :-

Rishi Maker
[EMAIL PROTECTED]

Does a good farmer neglect a crop he has planted? Does a good teacher overlook 
even the most humble student? Does a good father allow a single child to   
starve? Does a good programmer refuse to maintain his code?   -- Geoffrey  
James, "The Tao of Programming"
   
---

 PGP signature


JOBS: PHP/Perl/MySQL/DB2/AIX experts needed, top salary+options, Washingon DC area

2000-05-05 Thread Alok K. Dhir

See http://www.govshops.com/jobs.html for detailed information on positions
that are currently open.

Procurement Central, Inc, a new Washington, D.C. based company, is searching
for talented people who want to work in an exciting environment with a
well-funded startup.  Participate in building a best-of-breed online
procurement system using the latest cutting-edge technologies.  PCI does not
shy away from open-source - we encourage the use of the generally superior
open-source solutions out there in conjunction with top commercial products.

PCI offers a very competitive salary/benefits package with stock options.

Thank you for your time - we look forward to hearing from you!

Procurement Central, Inc.
[EMAIL PROTECTED]






Re: Apache::Session question

2000-05-05 Thread Francesc Guasch

Gundars Kulups wrote:
> 
> Hi!
> I am sorry to ask this bit off question, but still. Has anyone used
> Apache::Session on Solaris (Sparc, not intel)?
> We implemented system on Linux (intel) and tried to port it to Solaris, but
> session doesn't work - can not create session files. Store manager used is
> FileStore and SysV locker. Could that be a reason for problems? If so what
> kind of store and locker should be used on sparc Solaris?
> 
After the use Apache::Session you maybe have
to type something like this.

$Apache::Session::SysVSemaphoreLocker::nsems=16;


This has been talked here before, so maybe if
this doesn't work you can find hints anywhere in
the  list archives.
-- 
 - frankie -



Re: mod perl + proxy returns Document has no data

2000-05-05 Thread shane

While I have no specific insight to your problem, you might want to do
the following.  Grab the latest version of Apache, and use the
mod_proxy in that.  You also might want to take a look at the patches
that are lying around for mod_proxy, theres been a lot of work on it
of late, but most of it's waiting around and being implemented in the
2.0 version.  Also you may want to put this on the new-httpd list...,
that's more so where it should be, and that's where all the other
modproxy hackers hang out.  In particular Chris Sail, and Graham are
two folks that might be able to help you out.  Chris is the old
mod_proxy maintainer, and Graham has done EXTENSIVE work on mod_proxy.
There is also Sam, but he's more involved with the port to 2.0.  It
sounds like a bug to me with the caching or something like that.
(Well, not directly involved with the caching, but auxiliarly involved
with the caching)

Thanks,
Shane.

On Fri, May 05, 2000 at 03:24:40PM +0100, lists wrote:
> I am having a tricky problem with a mod_perl backend and a vanilla proxying 
> front end
> 
> I have set up:
> 
> Apache 1.3.9 + Mod_perl 1.23 + Embperl 1.2.1 as a back-end server
> 
> Apache 1.3.9 + mod_proxy as a front-end server.
> 
> Occasionally the back-end server gets into a state where it returns empty 
> documents
> to the front-end, and the front-end then returns a
> 
> "502 Proxy Error - document has no data" error to the client.
> 
> The only thing logged by the backend is a 200 result code with "-" for the
> amount of data transferred.
> 
> I am at a complete loss as to what is happening - server load is not 
> excessive, and
> there are plenty of spare servers. The only thing I have noticed is this 
> happens semi-consistently
> after a *large* file upload (from the client) through the proxy to the 
> back-end server. The upload is
> handled by EmbPerl.
> 
> Once the server is in this state, it will continue serving no-data pages at 
> apparently random intervals until
> it is restarted.
> 
> Any ideas/pointers would be much appreciated - I am stuck because the 
> back-end is not giving any
> error messages - just a 200 code...
> 
> 
> Thanks,
> 
> Chris Allen
> [EMAIL PROTECTED]
> 



Apache::Session question

2000-05-05 Thread Gundars Kulups

Hi!
I am sorry to ask this bit off question, but still. Has anyone used 
Apache::Session on Solaris (Sparc, not intel)?
We implemented system on Linux (intel) and tried to port it to Solaris, but 
session doesn't work - can not create session files. Store manager used is 
FileStore and SysV locker. Could that be a reason for problems? If so what 
kind of store and locker should be used on sparc Solaris?

Thanks inadvance,
Gundars
//---
// Project manager
// JSC Dati
// Kuldigas 45
// LV-1083, Riga
// Latvia
// Tel: +371-706
// Fax: +371-7619573
// Mob: +371-9466055
//---




RE: [OT?] Problems making Net::Daemon on Solaris 2.6

2000-05-05 Thread Eric Cholet

> I've tried emailing the author but haven't recieved a response.
> I'm hoping someone will have seen this problem before, or at least be able
> to point me in the right direction.
> 
> Solaris 2.7
> Perl 5.6.0
> 
> I get this when I run make test.:

This is totally offtopic. This problem with _PATH_LOG and Solaris came up
on comp.lang.perl.moderated a few weeks ago, check news archives the solution
was posted. I don't have it handy because I don't use Solaris.

> t/configYour vendor has not defined the Sys::Syslog macro _PATH_LOG at 

--
Eric




[OT?] Problems making Net::Daemon on Solaris 2.6

2000-05-05 Thread Jeff . Bulley


I've tried emailing the author but haven't recieved a response.
I'm hoping someone will have seen this problem before, or at least be able
to point me in the right direction.

Solaris 2.7
Perl 5.6.0

I get this when I run make test.:

root@eros# make test
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib 
-I/usr/local/lib/perl5/5.6.0/sun4-solaris -I/usr/local/lib/perl5/5.6.0 -e 'use 
Test::Harness qw
(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/base..ok
t/configYour vendor has not defined the Sys::Syslog macro _PATH_LOG at 
/usr/local/lib/perl5/5.6.0/sun4-solaris/Sys/Syslog.pm line 277.
Server process didn't create a file 'ndtest.prt'. at blib/lib/Net/Daemon/Test.pm line 
317.
t/configdubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 1-5
Failed 5/5 tests, 0.00% okay
t/fork..Your vendor has not defined the Sys::Syslog macro _PATH_LOG at 
/usr/local/lib/perl5/5.6.0/sun4-solaris/Sys/Syslog.pm line 277.
Server process didn't create a file 'ndtest.prt'. at blib/lib/Net/Daemon/Test.pm line 
317.
FAILED tests 1-5
Failed 5/5 tests, 0.00% okay
t/forkm.Unexpected return from Bind().
Server died: Your vendor has not defined the Sys::Syslog macro _PATH_LOG at 
/usr/local/lib/perl5/5.6.0/sun4-solaris/Sys/Syslog.pm line 277.

Client: Error Cannot connect: Connection refused at t/forkm.t line 64.

Thanks in advance,
Jeff Bulley







Re: sections and custom configuration directives

2000-05-05 Thread brian moseley

On Fri, 5 May 2000, Matt Sergeant wrote:

> Hmm... OK maybe a rethink is in order.
> 
> Perhaps something like this:
> 
> AxConfigReader MyModule
> 
> And AxKit defaults to its internal module which reads the Ax*
> configuration directives directly? You could even inherit from the
> internal config reader for options you don't want to override.
> 
> Sound OK?

i wasn't thinking of using a configuration directive for it,
i was going to use PerlModule or PerlRequire. as long as
either approach will work equivalently, it sounds like a
good plan.





Re: sections and custom configuration directives

2000-05-05 Thread Matt Sergeant

On Fri, 5 May 2000, brian moseley wrote:

> On Fri, 5 May 2000, Matt Sergeant wrote:
> 
> > Actually the idea comes from setting up the style map
> > based on an external XML site map, which would do things
> > similar to apache's  and  directives,
> > and then put them into the appropriate sections in
> > Apache::ReadConfig. It's not something I'm going to ship
> > with the product just now though - but someone wants the
> > ability to do so.
> 
> hi, that's me :)
> 
> actually matt, what i was shooting for was exposure to
> axkit's internal configuration data structures. i don't want
> to have to set up stuff in the $Apache::ReadConfig namespace
> and then have all the apache gears crank back around to your
> code. i'd rather have a configuration interface directly
> into your code.
> 
> this way i can reconfigure axkit at runtime. using apache
> config i can't do that.

Hmm... OK maybe a rethink is in order.

Perhaps something like this:

AxConfigReader MyModule

And AxKit defaults to its internal module which reads the Ax*
configuration directives directly? You could even inherit from the
internal config reader for options you don't want to override.

Sound OK?

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




Re: sections and custom configuration directives

2000-05-05 Thread brian moseley

On Fri, 5 May 2000, Matt Sergeant wrote:

> Actually the idea comes from setting up the style map
> based on an external XML site map, which would do things
> similar to apache's  and  directives,
> and then put them into the appropriate sections in
> Apache::ReadConfig. It's not something I'm going to ship
> with the product just now though - but someone wants the
> ability to do so.

hi, that's me :)

actually matt, what i was shooting for was exposure to
axkit's internal configuration data structures. i don't want
to have to set up stuff in the $Apache::ReadConfig namespace
and then have all the apache gears crank back around to your
code. i'd rather have a configuration interface directly
into your code.

this way i can reconfigure axkit at runtime. using apache
config i can't do that.




Re: Apache::ASP not working under FreeBSD 4

2000-05-05 Thread Ime Smits

<...>

| The server starts w/o problems. Perfect.

OK, your at lest 90% done now.

<...>

| file:/usr/home/cap/apache_ASP/Apache-ASP-0.18/site/eg/index.htm

That wouldn't work, because then you don't communicate via Apache, nothing
gets executed, it's just like you do a normal cat on the file.

<...>

| http://localhost/eg
| http://10.249/60.152/eg
| and I get this on the screen of my browser:

OK, this is better.

| 
|SetHandler perl-script
|PerlHandler Apache::ASP
| #   PerlSetVar Global /tmp
| 

This would have urls like http://hostname/asp/* be executed via Apache::ASP,
your stuff is in /eg, so this won't work

| Same result. Only code on browsers.

As expected.

| Finaly I also attempted to add this configuration on my httdp.conf:
|
| 
|Apache::ASP->Loader(
|'/usr/local/etc/apache/htdocs/eg/', "(asp|htm)\$",
|Global => 'usr/local/etc/apache/htdocs/eg/',
|Debug => 1, # see output when starting apache
|GlobalPackage => global.asa,
|DynamicIncludes => 1,
|StatINC => 1,
|);
| 

First, you're missing a slash before usr/local. Than again, I don't now
where you get that code snippet from, things are much easier than this.

You have two options, either in your httpd.conf, add something like:


  SetHandler perl-script
  PerlHandler Apache::ASP
  PerlSetVar Global /www/data/state


(change the last directory to some place where your Apache UID can write,
this is where the session objects are stored)

Second option, leave your httpd.conf as is, without any Apache::ASP in it,
just with the "AllowOveride All" as you have it, and put the 5 lines as
above in the directory where your *.asp scripts are in a file called
.htaccess. So if your DocumentRoot is '/usr/local/etc/apache/htdocs' and
your eg directory with examples from Apache:::ASP resides there, save this
file to '/usr/local/etc/apache/htdocs/eg/.htaccess . Everything in .htaccess
will automatically apply to the complete directory tree thereunder.

Ime






Re: sections and custom configuration directives

2000-05-05 Thread Matt Sergeant

On Fri, 5 May 2000, Stas Bekman wrote:

> On Fri, 5 May 2000, Matt Sergeant wrote:
> 
> > Answering myself: It works.
> > 
> > Damn this product (mod_perl) is cool!
> > 
> > On Fri, 5 May 2000, Matt Sergeant wrote:
> > 
> > > I have someone on the AxKit list asking if there's a way to do
> > > configuration outside of .htaccess files. I figure rather than writing
> > > some new code to do this,  sections could be used.
> > > 
> > > Will this work with custom directives, so basically could I do:
> > > 
> > > 
> > > @AxAddStyleMap = (
> > >   [ 'text/xsl' => 'Apache::AxKit::Language::XSLT' ],
> > >   ...
> > > );
> > > 
> 
> Even a cleaner solution, especially if you distribute some sample
> configuration files, would be to write this Perl file and load it with
> PerlModule
> 
> AxConfig.pm:
> 
> package Apache::ReadConfig;
> 
> @AxAddStyleMap = (
> [ 'text/xsl' => 'Apache::AxKit::Language::XSLT' ],
> ...
> );
> 
> 1;

Actually the idea comes from setting up the style map based on an external
XML site map, which would do things similar to apache's  and
 directives, and then put them into the appropriate sections in
Apache::ReadConfig. It's not something I'm going to ship with the product
just now though - but someone wants the ability to do so.

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




newbie problem..

2000-05-05 Thread Kiran Banoor

hi,

I have written a handler for controlling access control on the basis of
domain/ip address so that  i can restrict the users on the limit of sessions
from a perticular domain name.And i placed my handler in .htaccess file.
The problem is when request is made by the client for a perticular file and
it goes to my handler Gatekeeper.pm were if the requested file is having any
ssis it takes as a seperate request so i don't know wether it is write or
not and when i send the file by using send_fd(filehandle)it just displays
the contents of the document but not the ssis.
Another problem is when i set the cookie in the header and use the
send_fd(filehandle)to send the file back it will not work but if i use
print() it works i don't know why ..
I highly appreciate for the help.

Thanks
regards
kiran




Apache::ASP not working under FreeBSD 4

2000-05-05 Thread Capriotti

Hello.

I am an Apache and Perl newbie, trying to put Apache:ASP 
to work for the last few days and having very little success.

Some information on what I've done;
This will be a long email. Sorry, but I am really lost and need help.


I am using FreeBSD 4.0-RELEASE.

Retrieved the Apache sources and uncompressed it
 under my home dir : /home/cap/apache_src/apache_1.3.12

Did the same to perl - got the sources package frem CPAM and instsalled it.
 Some if the modules had to be installed using "force", since they wouldn't
test,  because of some stupid problem with the Apache binaries
(pre-compiled) I have here. All the dependencies were satisfied. At the end
of the process all the tests passed ok.

Retrieved the mod_perl sources, and followed ALL the steps. I allowed
the script to change apache's config and to build it too.

This is a screen dump of the results:

bash-2.03# perl Makefile.PL EVERYTHING=1
Enter `q' to stop search
Please tell me where I can find your apache src
 [/home/cap/apache_src/apache_1.3.12/src/]
Configure mod_perl with /home/cap/apache_src/apache_1.3.12/src/ ? [y]
Shall I build httpd in /home/cap/apache_src/apache_1.3.12/src/ for you? [y]
Appending mod_perl to src/Configuration
Using config file: /usr/home/cap/mod_perl/mod_perl-1.23/src/Configuration
Creating Makefile
 + configured for FreeBSD 4.0 platform
 + setting C compiler to gcc
 + setting C pre-processor to gcc -E
 + checking for system header files
 + adding selected modules
 + checking sizeof various data types
 + doing sanity check on compiler and options
Creating Makefile in support
Creating Makefile in os/unix
Creating Makefile in ap
Creating Makefile in main
Creating Makefile in lib/expat-lite
Creating Makefile in modules/standard
EXTRA_CFLAGS: -funsigned-char -DUSE_EXPAT -I$(SRCDIR)/lib/expat-lite
-DNO_DL_NEEDED 
PerlDispatchHandler.enabled
PerlChildInitHandlerenabled
PerlChildExitHandlerenabled
PerlPostReadRequestHandler..enabled
PerlTransHandlerenabled
PerlHeaderParserHandler.enabled
PerlAccessHandler...enabled
PerlAuthenHandler...enabled
PerlAuthzHandlerenabled
PerlTypeHandler.enabled
PerlFixupHandlerenabled
PerlHandler.enabled
PerlLogHandler..enabled
PerlInitHandler.enabled
PerlCleanupHandler..enabled
PerlRestartHandler..enabled
PerlStackedHandlers.enabled
PerlMethodHandlers..enabled
PerlDirectiveHandlers...enabled
PerlTableApienabled
PerlLogApi..enabled
PerlUriApi..enabled
PerlUtilApi.enabled
PerlFileApi.enabled
PerlConnectionApi...enabled
PerlServerApi...enabled
PerlSectionsenabled
PerlSSI.enabled
Will run tests as User: 'nobody' Group: 'wheel'
Checking CGI.pm VERSION..ok
Checking for LWP::UserAgent..ok
Checking for HTML::HeadParserok
Writing Makefile for Apache
Writing Makefile for Apache::Connection
Writing Makefile for Apache::Constants
Writing Makefile for Apache::File
Writing Makefile for Apache::Leak
Writing Makefile for Apache::Log
Writing Makefile for Apache::ModuleConfig
Writing Makefile for Apache::PerlRunXS
Writing Makefile for Apache::Server
Writing Makefile for Apache::Symbol
Writing Makefile for Apache::Table
Writing Makefile for Apache::URI
Writing Makefile for Apache::Util
Writing Makefile for mod_perl


 

after this I cd ../../apache_src/apache_1.3.12

and do a make or make install (maybe I am wront, but I am assuming that
the mod_perl (perl Makefile.PL) will do the make for me, so that
 I am using make install only; I've tried to use make too, but the final 
result was the same).

After make install, I do a /usr/local/etc/apache/bin/httpd -l and get this 
(Yes, I know this is not the best place for a binary, but this is just a
test).



bash-2.03# /usr/local/etc/apache/bin/httpd -l
Compiled-in modules:
  http_core.c
  mod_env.c
  mod_log_config.c
  mod_mime.c
  mod_negotiation.c
  mod_status.c
  mod_include.c
  mod_autoindex.c
  mod_dir.c
  mod_cgi.c
  mod_asis.c
  mod_imap.c
  mod_actions.c
  mod_userdir.c
  mod_alias.c
  mod_access.c
  mod_auth.c
  mod_so.c
  mod_setenvif.c
  mod_perl.c
suexec: disabled; invalid wrapper /usr/local/apache/bin/suexec 

Then I changed my /usr/local/etc/apache/conf/httpd.conf to have this:


Options FollowSymLinks
AllowOverride All
 


and finally call /usr/local/etc/apache/bin/httpd -f
/usr/local/etc/apache/conf/httpd.conf

The server starts w/o problems. Perfect.

But, when I try to point my netscape 4.72 (native FreeBSD, from the CDROM) to 

file:/usr/home/cap/apache_ASP/Apache-ASP-0.18/site/eg/index.htm

i get a simple 

#!/usr/local/bin/perl5 asp 

on the screen

and if I try to point it to 

file:/usr/home/cap/apache_ASP/Apache-ASP-0.18/site/eg/form.asp

I simple get the entire code on my browser.


(part of the code:)

#!/usr/local/bin

Re: sections and custom configuration directives

2000-05-05 Thread Stas Bekman

On Fri, 5 May 2000, Matt Sergeant wrote:

> Answering myself: It works.
> 
> Damn this product (mod_perl) is cool!
> 
> On Fri, 5 May 2000, Matt Sergeant wrote:
> 
> > I have someone on the AxKit list asking if there's a way to do
> > configuration outside of .htaccess files. I figure rather than writing
> > some new code to do this,  sections could be used.
> > 
> > Will this work with custom directives, so basically could I do:
> > 
> > 
> > @AxAddStyleMap = (
> > [ 'text/xsl' => 'Apache::AxKit::Language::XSLT' ],
> > ...
> > );
> > 

Even a cleaner solution, especially if you distribute some sample
configuration files, would be to write this Perl file and load it with
PerlModule

AxConfig.pm:

package Apache::ReadConfig;

@AxAddStyleMap = (
[ 'text/xsl' => 'Apache::AxKit::Language::XSLT' ],
...
);

1;

> > 
> > I don't see why not, and I haven't tested it, but I just thought I'd
> > double check here first.
> > 
> > 
> 
> -- 
> 
> 
> Fastnet Software Ltd. High Performance Web Specialists
> Providing mod_perl, XML, Sybase and Oracle solutions
> Email for training and consultancy availability.
> http://sergeant.org http://xml.sergeant.org
> 
> 



__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




Re: sections and custom configuration directives

2000-05-05 Thread Matt Sergeant

Answering myself: It works.

Damn this product (mod_perl) is cool!

On Fri, 5 May 2000, Matt Sergeant wrote:

> I have someone on the AxKit list asking if there's a way to do
> configuration outside of .htaccess files. I figure rather than writing
> some new code to do this,  sections could be used.
> 
> Will this work with custom directives, so basically could I do:
> 
> 
> @AxAddStyleMap = (
>   [ 'text/xsl' => 'Apache::AxKit::Language::XSLT' ],
>   ...
> );
> 
> 
> I don't see why not, and I haven't tested it, but I just thought I'd
> double check here first.
> 
> 

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




sections and custom configuration directives

2000-05-05 Thread Matt Sergeant

I have someone on the AxKit list asking if there's a way to do
configuration outside of .htaccess files. I figure rather than writing
some new code to do this,  sections could be used.

Will this work with custom directives, so basically could I do:


@AxAddStyleMap = (
[ 'text/xsl' => 'Apache::AxKit::Language::XSLT' ],
...
);


I don't see why not, and I haven't tested it, but I just thought I'd
double check here first.

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




mod perl + proxy returns Document has no data

2000-05-05 Thread lists

I am having a tricky problem with a mod_perl backend and a vanilla proxying 
front end

I have set up:

Apache 1.3.9 + Mod_perl 1.23 + Embperl 1.2.1 as a back-end server

Apache 1.3.9 + mod_proxy as a front-end server.

Occasionally the back-end server gets into a state where it returns empty 
documents
to the front-end, and the front-end then returns a

"502 Proxy Error - document has no data" error to the client.

The only thing logged by the backend is a 200 result code with "-" for the
amount of data transferred.

I am at a complete loss as to what is happening - server load is not 
excessive, and
there are plenty of spare servers. The only thing I have noticed is this 
happens semi-consistently
after a *large* file upload (from the client) through the proxy to the 
back-end server. The upload is
handled by EmbPerl.

Once the server is in this state, it will continue serving no-data pages at 
apparently random intervals until
it is restarted.

Any ideas/pointers would be much appreciated - I am stuck because the 
back-end is not giving any
error messages - just a 200 code...


Thanks,

Chris Allen
[EMAIL PROTECTED]




RE: Newbie Question

2000-05-05 Thread Geoffrey Young

you'll find a great many questions answered in the mod_perl guide...

http://perl.apache.org/guide/troubleshooting.html#Undefined_subroutine_Apach
e_RO

--Geoff

> -Original Message-
> From: Pierre J. Nicolas [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 05, 2000 10:15 AM
> To: [EMAIL PROTECTED]
> Subject: Newbie Question
> 
> 
> Good Morning,
> 
> I just started using mod_perl, could someone please tell me why
> I would get an error:
> "Undefined subroutine &Apache::ROOT::dir::prog_name::function_name
> called at
> /path/to/script/script_name line line_numer"
> when I specifically  "require module_with_function_name" in 
> the script.
> 
> I am using Apache::Registry.
> 
> Thanks,
> 
> Pierre
> 



Newbie Question

2000-05-05 Thread Pierre J. Nicolas

Good Morning,

I just started using mod_perl, could someone please tell me why
I would get an error:
"Undefined subroutine &Apache::ROOT::dir::prog_name::function_name
called at
/path/to/script/script_name line line_numer"
when I specifically  "require module_with_function_name" in the script.

I am using Apache::Registry.

Thanks,

Pierre




RE: Newbie Question -

2000-05-05 Thread Geoffrey Young



> -Original Message-
> From: Pierre J. Nicolas [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 05, 2000 10:00 AM
> To: [EMAIL PROTECTED]
> Subject: Newbie Question -
> 
> 
> Good Morning,
> 
> I just started using mod_perl, I'm still using the CGI.pm 
> module, but I
> plan
> to convert.  I've loaded the Apache::Registry and I'm experiencing a
> strange
> problem.
> 
> I have this snippet:
> 
>print "Content-Type: text/html\n\n";
>print_template(file_handle, *file_handle_ref) {
>  open file_handle()
>  while (file_handle()) {
>manipulate current_line
>print file_handle_ref
> current_line
>   }
>}
> 
> where "*file_handle_ref" could be a reference to STDOUT,
> this snippet worked fine, but now it stopped working, instead
> I get the message "The document contained no data"

mod_perl overrides the perl print() function - print()ing to STDOUT
explititly will not work.
just use print() if you can...

you might want to look at perl.apache.org/guide to help you get started with
mod_perl, specifically
http://perl.apache.org/guide/porting.html#STDIN_STDOUT_and_STDERR_streams


> 
> Also in my location tag  I also have the directive 
> "PerlSendHearder On"

you'll want to keep that On unless you are using the mod_perl API and
calling $r->send_http_headers yourself.

HTH

--Geoff

> however, when I remove that line all I get is the string 
> "Content-Type:
> text/html"
> displayed in the browser.
> 
> Thanks,
> 
> Pierre
> 



Newbie Question -

2000-05-05 Thread Pierre J. Nicolas

Good Morning,

I just started using mod_perl, I'm still using the CGI.pm module, but I
plan
to convert.  I've loaded the Apache::Registry and I'm experiencing a
strange
problem.

I have this snippet:

   print "Content-Type: text/html\n\n";
   print_template(file_handle, *file_handle_ref) {
 open file_handle()
 while (file_handle()) {
   manipulate current_line
   print file_handle_ref
current_line
  }
   }

where "*file_handle_ref" could be a reference to STDOUT,
this snippet worked fine, but now it stopped working, instead
I get the message "The document contained no data"

Also in my location tag  I also have the directive "PerlSendHearder On"
however, when I remove that line all I get is the string "Content-Type:
text/html"
displayed in the browser.

Thanks,

Pierre




RE: [Q ]Differences between RequestNotes and Request ?

2000-05-05 Thread Geoffrey Young



 

  -Original Message-From: Thierry-Michel Barral 
  [mailto:[EMAIL PROTECTED]]Sent: Friday, May 05, 2000 9:29 
  AMTo: [EMAIL PROTECTED]Subject: [Q ]Differences between 
  RequestNotes and Request ?
  Hi there,
   
  sorry for this "beginner question". 
   
  no bother - RequestNotes is 
  pretty new itself :) 
   
  I use Apache::Request (no more CGI.pm), and it's 
  fine for me (I use Apache::Registry for my scripts).
   
   
  So, what are the diff betwenn Request and 
  RequestNotes ?
  Is it useful for perl scripts running under 
  Registry, i.e no Apache handler for the moment
   
  Useful only for handlers ? 
   
   
  RequestNotes does the job of 
  making Apache::Request calls for you - albeit slightly differently than you 
  are probably used to in your scripts, hence the different looking 
  interface.  It also uses Apache::Cookie to gather cookie data, decreasing 
  your work yet again.  If you look at the code, you'll find it rather 
  simple...
   
  You needn't use handlers to 
  gain from using RequestNotes.  Personally, I've given up on calling 
  Apache::Request directly anymore - I thought it made little sense (for me) to 
  copy the same set of method calls for each Registry script when the mod_perl 
  API allows for better, more convienent 
  things...
   
  I hope it works for 
  you.
  
   
  I have another question, no connection from the previous 
  one:
  I believe using 
  open FH "
  is in fact a call to the shell. Right ? 
  So, in mod_perl, I prefer not to call the shell, so 
  is
  $fh= new IO::File($filename, "r");
  a better solution ? 
  for a mod_perl solution, try using Apache::File (see 
  the man pages).  Keep in mind that you need to have built mod_perl with 
  PERL_FILE_API=1 (or EVERYTHING=1)
   
  HTH
   
  --Geoff
   
  tia,
   
  kktos
   


[Q ]Differences between RequestNotes and Request ?

2000-05-05 Thread Thierry-Michel Barral



Hi there,
 
sorry for this "beginner question".
 
I use Apache::Request (no more CGI.pm), and it's 
fine for me (I use Apache::Registry for my scripts).
 
 
So, what are the diff betwenn Request and 
RequestNotes ?
Is it useful for perl scripts running under 
Registry, i.e no Apache handler for the moment
 
Useful only for handlers ?

 
I have another question, no connection from the previous 
one:
I believe using 
open FH "
is in fact a call to the shell. Right ?
So, in mod_perl, I prefer not to call the shell, so 
is
$fh= new IO::File($filename, "r");
a better solution ?
 
tia,
 
kktos
 


Re: apxs and first class configuration

2000-05-05 Thread Stas Bekman

On Fri, 5 May 2000, Matt Sergeant wrote:

> When building first class configuration directives, you run Makefile.PL
> and it says:
> 
> which: no apxs in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin)
> apxs:Error: Sorry, no DSO support for Apache available
> apxs:Error: under your platform. Make sure the Apache
> apxs:Error: module mod_so is compiled into your server
> apxs:Error: binary `/usr/local/apache/bin/httpd'.
> 
> But it compiles correctly anyhow. Is this just a check to make sure you
> have mod_so compiled in?

It's a warning. Corrected in the CVS version. -- check out the archives
and the Changes file. It's harmless.

__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




apxs and first class configuration

2000-05-05 Thread Matt Sergeant

When building first class configuration directives, you run Makefile.PL
and it says:

which: no apxs in (/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin)
apxs:Error: Sorry, no DSO support for Apache available
apxs:Error: under your platform. Make sure the Apache
apxs:Error: module mod_so is compiled into your server
apxs:Error: binary `/usr/local/apache/bin/httpd'.

But it compiles correctly anyhow. Is this just a check to make sure you
have mod_so compiled in?

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




Re: PerlAddVar ?

2000-05-05 Thread Matt Sergeant

On Fri, 5 May 2000, Stas Bekman wrote:

> On Wed, 3 May 2000, Doug MacEachern wrote:
> 
> > On Mon, 1 May 2000, Stas Bekman wrote:
> > 
> > > That [the name] would be confusing. How about:
> > 
> > not if you think of it in terms of an apache table:
> > 
> > PerlSetVar => ap_table_set
> > PerlAddVar => ap_table_add
> 
> OK, if this is the case, I'd prefer to have only one variable type -- an
> array - so $r->dir_config will always return a list. So if it's a sigular
> value, it'll be the first element. If you want it to be a hash -- you can
> have it as well. This makes thing simple and even eliminates the need for
> PerlSetVar, you can have only PerlAddVar for everything. 

And/or PerlSetVar to reset the list to 1 element.

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




RE: how do I use perl sections

2000-05-05 Thread Benedict Lofstedt

Eric Cholet writes:

 > 
 > but you're not following my example quoted above.
 > @ScriptAlias is a list of aliases. Each alias is a _reference_ to
 > a two-element array.
 > 

I got the following to work after stopping/restarting the server:


my @cgi_users = qw(xx yy);

foreach (@cgi_users) {
push @ScriptAlias, [ "/cgi-$_/", "/users/$_/cgi-bin/" ] ;
};


Thanks for the patience.

--- benedict



Re: PerlAddVar ?

2000-05-05 Thread Stas Bekman

On Wed, 3 May 2000, Doug MacEachern wrote:

> On Mon, 1 May 2000, Stas Bekman wrote:
> 
> > That [the name] would be confusing. How about:
> 
> not if you think of it in terms of an apache table:
> 
> PerlSetVar => ap_table_set
> PerlAddVar => ap_table_add

OK, if this is the case, I'd prefer to have only one variable type -- an
array - so $r->dir_config will always return a list. So if it's a sigular
value, it'll be the first element. If you want it to be a hash -- you can
have it as well. This makes thing simple and even eliminates the need for
PerlSetVar, you can have only PerlAddVar for everything. 

__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




[ANNOUNCE] Apache::RequestNotes_0.04

2000-05-05 Thread Geoffrey Young

The URL

 
http://morpheus.laserlink.net/~gyoung/modules/Apache-RequestNotes_0.04.tar.g
z

has entered CPAN as

  file: $CPAN/authors/id/G/GE/GEOFF/Apache-RequestNotes_0.04.tar.gz
  size: 4579 bytes
   md5: cafae76db41baf1b109316a0987bf170


Apache::RequestNotes now supports file uploads...


Changes:

0.04  05.04.2000
- added Apache::Upload array to $r->pnotes('UPLOADS')
  thanks to Kip Cranford for extensive testing
- added DisableUploads directive
- pod changes to reflect new functionality
- documented $Apache::RequestNotes:err
- moved cookie parsing to before form data parsing
  so cookie data will be available even if the form
  data runs into trouble
- documented that RequestNotes can run in phases other
  than init
- documented that using RequestNotes then trying to
  use Apache::Request or CGI.pm to get to POSTed data
  is both redundant and problematic.



Re: Redirecting Problem --- Please look at this patiently.

2000-05-05 Thread Matt Sergeant

On Fri, 5 May 2000, sadhanandham balaraman wrote:

> Hi Gurus,
>I'm facing a typical problem in Apache web server. The problem is that I 
> want to call a perl script whenever a request is made to the server, and 
> that script should be able to change the URI and submit to the server back.

Make a PerlHandler that does  $r->internal_redirect(URI);

-- 


Fastnet Software Ltd. High Performance Web Specialists
Providing mod_perl, XML, Sybase and Oracle solutions
Email for training and consultancy availability.
http://sergeant.org http://xml.sergeant.org




Redirecting Problem --- Please look at this patiently.

2000-05-05 Thread sadhanandham balaraman

Hi Gurus,
   I'm facing a typical problem in Apache web server. The problem is that I 
want to call a perl script whenever a request is made to the server, and 
that script should be able to change the URI and submit to the server back.

   The thing I got from the net is that adding PerlscriptTransHandler 
directive will call a perl script, whenever request is made. The problem 
with this is that it disables Alias and ScriptAlias directives, so my other 
perl scripts won't run.

 The other thing is redirecting any request using RewriteRule. I used 
this to redirect any request to my perl script which again redirects to 
another document which is in same server by 'Location' header. The problem 
is that it goes to endless recursive request loop.

 So how to call a perl script or redirect the request to the SAME web 
server.

Please add reply immediately.

Thanks,
sadha.

([EMAIL PROTECTED])

Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com




Re: search engine for the Guide

2000-05-05 Thread Dave Hodgkinson

Stas Bekman wrote:

> Yeah, it's a nice trick. The thing that defeats it a search engine, is
> it's freshness. We cannot tell google to rehash the Guide when there is a
> new version, and searching the outdated version is a bad idea.

Google is _very_ good at visiting frequently. Accounts for a
siginificant proportion of hits on some of Sift's sites :-)

-- 
Editor, "The Highway Star"   http://www.deep-purple.com
Dave endorses Yanagisawa saxes, Apache, Perl, Linux, MySQL, emacs, gnus



Re: NET::SMTP

2000-05-05 Thread Ime Smits

| Where do I get the win32 version of  NET::SMTP module???

Duh... Ever considered http://www.cpan.org?

Ime




NET::SMTP

2000-05-05 Thread Srinidhi Rao S





Hi all 
    Where do 
I get the win32 version of  NET::SMTP module???
TIA
RegardsSrinidhi RaoRobosoft 
TechnologiesE-mail: [EMAIL PROTECTED]www.robosoftin.com
 


Re: search engine for the Guide

2000-05-05 Thread Stas Bekman

On Fri, 5 May 2000, Jeremy Howard wrote:

> At 01:28 PM 5/4/00 +0300, Stas Bekman wrote:
> >Two things:
> >
> >1) I'd better concentrate on improving the content and structure of the
> >Guide and will leave this search engine task to someone who needs to use
> >the Guide but find it unusable without the proper search engine.
> >
> >2) perl.apache.org doesn't have mod_perl installed, so it's better to use
> >some other site. I don't have any.
> >

> I'd be happy to host a search engine on my site. I'm not prepared to
> write one from scratch though, so if anyone has any suggestions of what
> the best 'off-the-shelf' solutions are I'd love to hear. 

Thanks! Let's figure out what's the best one we want first :)

> One option is to use Google. Have a look at this link
> 
>
> (put it on one line, of course). It highlights the searched terms
> ('mod_perl' 'guide' in this case). Google doesn't allow searches within
> a site. However, if the same unique string were placed on each page of
> the guide, adding that string to the search query would only return hits
> from the guide. I think the best way to do this would be to create a
> custom search page that links to Google, and automatically includes the
> unique string in the request. 

Yeah, it's a nice trick. The thing that defeats it a search engine, is
it's freshness. We cannot tell google to rehash the Guide when there is a
new version, and searching the outdated version is a bad idea.

> Of course, if there are any free search tools that provide this
> functionality and come with source, that would be even better! 

So far, from the personal replies to me, htdig is the best solution given
that we stuff many anchors in the text so you could jump directly to the
right paragraph. 

Keep on these ideas/tries coming. Thanks!

__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--




Re: search engine for the Guide

2000-05-05 Thread Stas Bekman

On Thu, 4 May 2000, Gunther Birznieks wrote:

> I would think that apache.org would provide a free open source search 
> engine as an infrastructural resource? Can't we take advantage of that? Or 
> is perl.apache.org not actually part of apache.org infrastructure?
> 
> It seems to me that a lot more apache.org sites would benefit rather than 
> perl.apache.org so it could be a shared resource. As for the programmatic 
> characters not being recognized-- I think we kind of get used to that. It 
> is a pain, but better a poor search than no search. I have actually wished 
> for searching myself for just simple things here and there.

Gunther, the engine is there. Look at the bottom of /guide/index.html --
and it's the one that apache.org serves all the projects with. So it
exists but it's not as good as it could be, and it searchs the whole
perl.apache.org site.

> 
> That's another thing that makes the full print out version (PDF) so nice is 
> that you can do a Find
> 
> At 01:28 PM 5/4/00 +0300, Stas Bekman wrote:
> >On Thu, 4 May 2000, Matt Sergeant wrote:
> >
> > > On Thu, 4 May 2000, Stas Bekman wrote:
> > >
> > > > > Yes. On some of the search engines (AltaVista springs to mind) you can
> > > > > search for things on particular web sites, or even links to 
> > particular web
> > > > > sites. So as long as AltaVista keeps its search contents up to 
> > date, you
> > > > > can leverage their engine. IIRC either Randall or Lincoln did a
> > > > > WebTechniques article about this a few months ago.
> > > >
> > > > Oh, I see.
> > > >
> > > > But I want to stress these 2 points:
> > > >
> > > > 1) Currently each chapter in the Guide is a huge document, so doing 
> > search
> > > > and having a hit, doesn't really help as you still have to go thru the
> > > > page to find the exact section that you want to read. So I think we 
> > want a
> > > > search engine that's not working with the master version per se, but with
> > > > a copy which has name anchors for each line and:
> > > >
> > > >   a. can bring you to exact line with match
> > > >   b. have the keyword highlighted
> > > >
> > > > 2) Most of the search engines have problems with keywords including
> > > > non-alpha chars, like if you search for Apache::Registry you will end up
> > > > searching for Apache and Registry since :: is ignored. Now think about
> > > > '$r->print' 'BEGIN {', '$@', etc. All these are must for the doc with 
> > many
> > > > non-alpha characters which should be searched for.
> > > >
> > > > What do you think?
> > >
> > > You seem to have it all worked out. I look forward to seeing your search
> > > engine ;-)
> > >
> > > Seriously though, I have a search engine in the works, however I don't
> > > know how well it will apply to your scheme above. It looks like you're
> > > going to be better off writing one yourself. Its not too hard, provided
> > > you have a DB to store the index on. Let me know if you need some
> > > pointers.
> >
> >Two things:
> >
> >1) I'd better concentrate on improving the content and structure of the
> >Guide and will leave this search engine task to someone who needs to use
> >the Guide but find it unusable without the proper search engine.
> >
> >2) perl.apache.org doesn't have mod_perl installed, so it's better to use
> >some other site. I don't have any.
> >
> >Which leads to: If you suffer from inability to get the best out of the
> >Guide in the shortest time and wish to help others in the same boat,
> >please create a searchable mirror site which answers on the above demands.
> >You will get a monument while you are alive at the perl.apache.org site if
> >you are looking for one, but of course the most important is a great
> >feeling of giving something back and not just taking.
> >
> >Hmm, may be we should run another contest at the Perl conference. The name
> >is 'find it in the Guide'. You will be given a number of unanswered posts
> >from the mod_perl list and the first one that provides pointers in the
> >Guide that solve these problems wins. This has a double effect:
> >
> >1) You get the prize
> >
> >2) You finally answer the unanswered questions :)
> >
> >Have a good day, folks!
> >
> >__
> >Stas Bekman | JAm_pH--Just Another mod_perl Hacker
> >http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide
> >mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
> >http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
> >--
> 
> 



__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
-

RE: Help - Install mod_perl-1.23

2000-05-05 Thread Stas Bekman

On Thu, 4 May 2000, James Xie wrote:

> 
> I used root to do everything, I even changed the httpd.conf file
> (t/conf/httpd.conf) to use root user and users group.
> User  root
> Group users
> 
> But I still have the same problem when I do make test, the following is the
> directory dump, please let me know what permission should
> I change to. 

Try this:
Changes:
User/Group for 'make test' can be overridden with the environment
variables APACHE_USER/APACHE_GROUP

Otherwise do everything as a non-root and then su to install. I've been
bugged by this issue a few times, when working in weird NIS environment.

Watch the access under strace to learn where the problem arises from. 

Please don't post the whole trace, just the relevant bits. What are the
relevant bits? The ones that show where apache stat()'s the
t/docs/test.html file, just like in my original reply to you.


> -rw-r--r--   1 root users 300 May 18  1998 LoadClass.pm
> drwxr-xr-x   3 root users4096 Apr 20 23:43 STAGE
> drwxr-xr-x   2 root users4096 Apr 20 23:43 auth
> -rw-r--r--   1 root users  64 Sep 30  1998 badsyntax.pl
> -rw-rw-r--   1 root users  87 Apr 29 15:27 blib.pl
> -rw-r--r--   1 root users   21825 Dec 29  1998 book.gif
> -rw-r--r--   1 root users   2 Dec  6  1997 content.html
> -rw-r--r--   1 root users  40 Dec  6  1997 content.shtml
> drwxr-xr-x   2 root users4096 Apr 20 23:43 dirmagic
> -rw-r--r--   1 root users 551 Dec  6  1997 env.iphtml
> -rw-r--r--   1 root users  12 Dec  6  1997 error.txt
> -rw-rw-rw-   1 root users   1 Apr 29 15:27 hooks.txt
> -rw-r--r--   1 root users1003 Dec  6  1997 lists.ehtml
> -rw-r--r--   1 root users  30 Mar 19  1998 null.txt
> -rw-r--r--   1 root users  90 Dec  6  1997 rgy-include.shtml
> -rw-r--r--   1 root users 619 Sep 21  1998 rl.pl
> drwxr-xr-x   2 root users4096 Apr 29 15:27 stacked
> -rw-r--r--   1 root users 511 Dec  6  1997 stacked.pl
> -rw-r--r--   1 root users6149 Apr  6  1999 startup.pl
> drwxr-xr-x   2 root users4096 Apr 27 17:02 subr
> -rw-r--r--   1 root users3045 Jan 25  1999 test.ep
> -rw-r--r--   1 root users 566 Dec  6  1997 test.html
> -rw-rw-r--   1 root users 566 Apr 27 17:00 test.shtml
> 
> -Original Message-
> From: Stas Bekman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, May 04, 2000 2:58 PM
> To: James Xie
> Cc: Doug MacEachern; [EMAIL PROTECTED]
> Subject: RE: Help - Install mod_perl-1.23
> 
> 
> On Thu, 4 May 2000, James Xie wrote:
> 
> > 
> > It seems I have some kind of permission problem but I don't know how to
> > resolve it. Please take a look at the outputs from the commands I run.
> > Really appreciate your help!
> 
> 4145  dup2(15, 2)   = 2
> 4145  rt_sigprocmask(SIG_BLOCK, NULL, [], 8) = 0
> 4145  stat("/home/jxie/mod_perl-1.23/t/docs/test.html", 0xbabc) = -1
> EACCES (Permission denied)
> 
> File permission problem. Try to run the make test as the same user you
> have created the files with. Your server is running under some user/group
> -- the file /home/jxie/mod_perl-1.23/t/docs/test.html should be readble by
> user or/and group.
> 



__
Stas Bekman | JAm_pH--Just Another mod_perl Hacker
http://stason.org/  | mod_perl Guide  http://perl.apache.org/guide 
mailto:[EMAIL PROTECTED]  | http://perl.orghttp://stason.org/TULARC/
http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org
--