Re: mod_perl and current directory (was Re: Newbie Q on Apache::Include)

2003-02-01 Thread Nikita Rego
At 06:22 PM 1/28/2003, Stas Bekman wrote:

[...]

> Is it true what was said in one of the other

threads -with mod_perl (Apache 1.3.27) the current working directory is 
different from the dir where the script lies?

[...]

As I've followed up (because I knew that that particular post will create 
confusion), it *is* the script's dir for mod_perl 1.x. (Apache::Registry 
and friends)

Ok Tks I guess I should have read the thread carefully.



It's *currently* not the case with mod_perl 2.0 (ModPerl::Registry and 
friends), but this should change to be the same as 1.x by the time 2.0 is 
released.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: mod_perl and current directory (was Re: Newbie Q on Apache::Include)

2003-01-29 Thread perl
At 10:50 AM 1/29/2003, Perrin Harkins wrote:

[EMAIL PROTECTED] wrote:

I'm not sure whether the company that's hosting my web site will want to 
install any non-critical module (They ahve done me a favor allowing me to 
run mod_perl ... ) So I want to see if I have any options installing it 
under my directory tree.

Okay.  You need to modify @INC then.  Take a look here for examples:
http://perl.apache.org/docs/1.0/guide/config.html#The_Startup_File


Tks.

Dr 



Re: mod_perl and current directory (was Re: Newbie Q on Apache::Include)

2003-01-29 Thread Perrin Harkins
[EMAIL PROTECTED] wrote:

I'm not sure whether the company that's hosting my web site will want to 
install any non-critical module (They ahve done me a favor allowing me 
to run mod_perl ... ) So I want to see if I have any options installing 
it under my directory tree.

Okay.  You need to modify @INC then.  Take a look here for examples:
http://perl.apache.org/docs/1.0/guide/config.html#The_Startup_File

- Perrin




Re: mod_perl and current directory (was Re: Newbie Q on Apache::Include)

2003-01-29 Thread perl


Actually I haven't got this to work. I'm yet trying to figure how to load 
the module (PerlModule Apache::SSI) in the .htaccess with it actuall 
residing in the "/perl/" directory rather than the standard lib directories.

Why?  It's a module, not a CGI script.


I'm not sure whether the company that's hosting my web site will want to 
install any non-critical module (They ahve done me a favor allowing me to 
run mod_perl ... ) So I want to see if I have any options installing it 
under my directory tree.

If you don't want to put it in your standard @INC paths, you can put it 
under /lib/perl/ which is automatically added to @INC by mod_perl.

- Perrin




Re: mod_perl and current directory (was Re: Newbie Q on Apache::Include)

2003-01-28 Thread Perrin Harkins
[EMAIL PROTECTED] wrote:

  works with mod_include Got a [an error 
occurred while processing this directive] (well actually the errmsg that 
I had set) with CGI::SSI. As I said I didn't really follow-up to see if 
this is a prob.

Oh, sorry, I missed the part about CGI::SSI.  That will work with 
mod_include (and thus with Apache::Include).

It does not implement SSI, it just integrates an extra tag (#perl) 
into mod_include.  Everything that works in your current mod_include 
pages should continue to work.

Oh kinda like embedding perl code in an shtml?


It lets you run any Perl subroutine in the middle of a page.  It also 
lets you include files (a "virtual include") from within a Perl script 
by calling the Apache::Include module.

Actually I haven't got this to work. I'm yet trying to figure how to 
load the module (PerlModule Apache::SSI) in the .htaccess with it 
actuall residing in the "/perl/" directory rather than the standard lib 
directories.

Why?  It's a module, not a CGI script.

If you don't want to put it in your standard @INC paths, you can put it 
under /lib/perl/ which is automatically added to @INC by 
mod_perl.

- Perrin



Re: mod_perl and current directory (was Re: Newbie Q on Apache::Include)

2003-01-28 Thread perl
At 06:54 PM 1/28/2003, Perrin Harkins wrote:

[EMAIL PROTECTED] wrote:

Tks that way worked except for the #config sizefmt of mod_include


That should work fine.  What's broken with it?


(Frankly I'm so eagar to not just get my feet wet in mod_perl (just started 
on it today), but drown in it I didn't follow up on this prob.)

  works with mod_include Got a [an error 
occurred while processing this directive] (well actually the errmsg that I 
had set) with CGI::SSI. As I said I didn't really follow-up to see if this 
is a prob.

From the documentation of the Apache::Include I couldn't make out 
whether it handled other features like set which I am using.

It does not implement SSI, it just integrates an extra tag (#perl) into 
mod_include.  Everything that works in your current mod_include pages 
should continue to work.

Oh kinda like embedding perl code in an shtml?


But your siggestion led me to search on CPAN and found Apache::SSI.


Apache::SSI is good too.  It will use more RAM, but it is slightly faster 
than mod_include.

Actually I haven't got this to work. I'm yet trying to figure how to load 
the module (PerlModule Apache::SSI) in the .htaccess with it actuall 
residing in the "/perl/" directory rather than the standard lib directories.

Tks
Dr 



Re: mod_perl and current directory (was Re: Newbie Q on Apache::Include)

2003-01-28 Thread Perrin Harkins
[EMAIL PROTECTED] wrote:

Tks that way worked except for the #config sizefmt of mod_include


That should work fine.  What's broken with it?


 From the documentation of the Apache::Include I couldn't make out 
whether it handled other features like set which I am using.

It does not implement SSI, it just integrates an extra tag (#perl) into 
mod_include.  Everything that works in your current mod_include pages 
should continue to work.

But your 
siggestion led me to search on CPAN and found Apache::SSI.

Apache::SSI is good too.  It will use more RAM, but it is slightly 
faster than mod_include.

- Perrin



Re: mod_perl and current directory (was Re: Newbie Q on Apache::Include)

2003-01-28 Thread Stas Bekman
[...]

> Is it true what was said in one of the other

threads -with mod_perl (Apache 1.3.27) the current working directory is 
different from the dir where the script lies?

[...]

As I've followed up (because I knew that that particular post will create 
confusion), it *is* the script's dir for mod_perl 1.x. (Apache::Registry and 
friends)

It's *currently* not the case with mod_perl 2.0 (ModPerl::Registry and 
friends), but this should change to be the same as 1.x by the time 2.0 is 
released.

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



mod_perl and current directory (was Re: Newbie Q on Apache::Include)

2003-01-28 Thread perl


You can do this.  Technically I think you can POST to a file, but you 
don't need to.

You can do this lots of ways, including post-processing the output of a 
CGI script with a module like CGI::SSI.  What I

Tks that way worked except for the #config sizefmt of mod_include


would suggest is writing a script that you will run under 
Apache::Registry, and calling Apache::Include->virtual('/uri/of/file') to 
do the includes.

From the documentation of the Apache::Include I couldn't make out whether 
it handled other features like set which I am using. But your siggestion 
led me to search on CPAN and found Apache::SSI. That was reasonably 
well-documented and I was planning on using it except the module couldn't 
be found. Is it true what was said in one of the other threads -with 
mod_perl (Apache 1.3.27) the current working directory is different from 
the dir where the script lies? If so how does one use code organized uder 
one's own directory? (Need to know this as my host does not want to install 
modules for me.)

Rgds
Dr