Re: which module for this purpose?

2007-06-14 Thread Foo JH
Yes I did also consider using mp2.But when I searched on this list and found many guys mentioned they install/run mp2 unsucessfully,so I picked the easy way of mp1.:-) You SHOULD seriously consider mp2. There's 2 platforms on mp2: Apache 2.0 and Apache 2.2 If you're on Windows I'd suggest 2.0

Re: Executing cgi-perl scripts on IHS

2007-06-14 Thread Frank Wiles
On Thu, 14 Jun 2007 12:56:34 -0700 (PDT) Vijayram Arya <[EMAIL PROTECTED]> wrote: > Hello, > > I am totally a newbie for IHS and mod_perl.. > > I am trying to configure my IHS webserver for it to be able to > execute cgi-perl scripts on Solaris 10 box.. > I am using IHS webserver wh

Executing cgi-perl scripts on IHS

2007-06-14 Thread Vijayram Arya
Hello, I am totally a newbie for IHS and mod_perl.. I am trying to configure my IHS webserver for it to be able to execute cgi-perl scripts on Solaris 10 box.. I am using IHS webserver which has inbuilt apache modules... and also comes with cgi module by default... I kind

Re: which module for this purpose?

2007-06-14 Thread Jonathan Vanasco
On Jun 14, 2007, at 11:53 AM, Jen mlists wrote: Yes I did also consider using mp2.But when I searched on this list and found many guys mentioned they install/run mp2 unsucessfully,so I picked the easy way of mp1.:-) Thats not the easy way, thats the hard way... just install mp2 and save you

Re: which module for this purpose?

2007-06-14 Thread Jen mlists
2007/6/14, Clinton Gormley <[EMAIL PROTECTED]>: If this is a new project in mod_perl, have you considered using Apache 2 and mod_perl 2? Yes I did also consider using mp2.But when I searched on this list and found many guys mentioned they install/run mp2 unsucessfully,so I picked the easy way

Re: which module for this purpose?

2007-06-14 Thread Clinton Gormley
> > > > Thank you,would try for it. > I'm new to mp,so sorry that have asked this low-level question. > Anyway,thanks a lot. Don't worry - we all started out knowing less than you know now. If this is a new project in mod_perl, have you considered using Apache 2 and mod_perl 2? mod_perl 1 is es

set auth_type, after subrequest it lost - bug or not ?

2007-06-14 Thread Sergij Borodych
Hi ALL, I need some help I set auth_type (like $r->auth_type('MyType')) in PerlAuthenHandler if request go in "/" (root) it generate subrequest for lookup index.html file name after this in subrequest I lost auth_type (but I ignore subrequests) but even in PerlLogHandler I can't determine it thi

Re: which module for this purpose?

2007-06-14 Thread Jen mlists
2007/6/14, Clinton Gormley <[EMAIL PROTECTED]>: > > mhh,I understood for your meanings.but my real question is how I can > send the file to clients after returning OK.here is my apache config > and modperl script,please give more helps.thanks! > > from httpd.conf: > > PerlModule DLAuth > > >

Re: which module for this purpose?

2007-06-14 Thread Clinton Gormley
> > mhh,I understood for your meanings.but my real question is how I can > send the file to clients after returning OK.here is my apache config > and modperl script,please give more helps.thanks! > > from httpd.conf: > > PerlModule DLAuth > > > SetHandler perl-script > PerlHandler DLA

Re: which module for this purpose?

2007-06-14 Thread Jen mlists
2007/6/14, Clinton Gormley <[EMAIL PROTECTED]>: By using a PerlAccessHandler, you are adding a step into the standard apache process. So: - the user goes to: /path/file.xyz - your access handler performs its checks - Allowed? - Y : - return OK - file served by standard apache means

Re: modperl2 + apache2.2 unable to restart

2007-06-14 Thread Perrin Harkins
On 6/14/07, Foo JH <[EMAIL PROTECTED]> wrote: I was hoping to migrate my apps to the apache2.2 platform. The apps are fine, except that I notice now it's not possible to restart the app - the message 'The requested operation has failed!' pops up. What's the actual error from the error_log? - P

Re: which module for this purpose?

2007-06-14 Thread Foo JH
All you need to do (assuming mod_perl2) is: - set the content-type (to whatever file type you are sending) - use $r->sendfile('filename') See http://perl.apache.org/docs/2.0/api/Apache2/RequestIO.html#C_sendfile_ Good point. Something learnt today.

Re: which module for this purpose?

2007-06-14 Thread Lionel MARTIN
All you need to do (assuming mod_perl2) is: - set the content-type (to whatever file type you are sending) - use $r->sendfile('filename') See http://perl.apache.org/docs/2.0/api/Apache2/RequestIO.html#C_sendfile_ Clint Unless Im mistaken, why not use instead the Apache default handler for th

Re: which module for this purpose?

2007-06-14 Thread Clinton Gormley
On Thu, 2007-06-14 at 18:04 +0800, Foo JH wrote: > Clinton's approach may be better (with PerlAccessHandler). Try that > approach first... > > Basically to return a file content over there's not much work to be done: ...although, from the problem set that has been described, there is no reason

Re: which module for this purpose?

2007-06-14 Thread Clinton Gormley
Sorry - typo on the constants > So: > - the user goes to: /path/file.xyz > - your access handler performs its checks > - Allowed? >- Y : > - return Apache2::Const::OK > - file served by standard apache means >- N : > - return Apache2::Const::FORBIDDEN > - apache se

modperl2 + apache2.2 unable to restart

2007-06-14 Thread Foo JH
Hi all, I was hoping to migrate my apps to the apache2.2 platform. The apps are fine, except that I notice now it's not possible to restart the app - the message 'The requested operation has failed!' pops up. I am running mp2 + libapreq2 + apache2.2 + perl 5.8.8 Can anyone confirm if they ha

Re: which module for this purpose?

2007-06-14 Thread Foo JH
Clinton's approach may be better (with PerlAccessHandler). Try that approach first... Basically to return a file content over there's not much work to be done: 1. Set the content mime type to octet/ application 2. open a file for reading as you normally would - via the open() and close() functi

Re: which module for this purpose?

2007-06-14 Thread Clinton Gormley
> Yes I know whether I would return an OK or a FORBIDDEN under different > conditions. > My questions is,when return OK,what should I do on next step?How can I > send the file to clients?Do I need a redirect?When using > redirect,clients may also get the real file path by guess,isn't it? By using

open2 does not work in mod perl

2007-06-14 Thread khan.sajid
Hi all I am able to execute the below program in perl but NOT in mod_perl $pid = open2(*Reader,*Writer,$test_cmd); Writer->autoflush(); Reader->autoflush(); print Writer "mypwd\n"; while () { $output .= $_; } In mod perl , whatever I write to Writer using "print Writer " does not get reache

Re: which module for this purpose?

2007-06-14 Thread Jen mlists
2007/6/14, Clinton Gormley <[EMAIL PROTECTED]>: What you're after is a PerlAccessHandler http://perl.apache.org/docs/2.0/user/handlers/http.html#PerlAccessHandler Yes I know whether I would return an OK or a FORBIDDEN under different conditions. My questions is,when return OK,what should I do

Re: which module for this purpose?

2007-06-14 Thread Clinton Gormley
On Thu, 2007-06-14 at 14:23 +0800, Jen mlists wrote: > Hello members, > > I would config/write a modperl module to do this thing. > When someone access a file which is located on special directory,say it was, > /download/test.flv > we would do some auth check.If his IP or request time were > reaso

Re: which module for this purpose?

2007-06-14 Thread Jen mlists
2007/6/14, Foo JH <[EMAIL PROTECTED]>: Otherwise it will load the file specified in the uri and send it back. Then how can I "load the file and send it back" under modperl?Do I need to call some routines like socket read/write? Please show me more details.Thanks a lot.

Re: which module for this purpose?

2007-06-14 Thread Foo JH
A couple of ways I can think of. Code-wise, you can have modperl handle all requests to /download/. So a request to /download/test.flv will activate a modperl script which can do the checks you want (and return 404 if needed). Otherwise it will load the file specified in the uri and send it bac