Location directive in httpd.conf

Location directive in httpd.conf

am 21.09.2006 22:44:49 von sajid khan

------=_Part_14246_29326154.1158871489657
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I asked the below question in apache user group as well, but with no answers

We have 2 location directives, one for all the requests ( ...
) and one for specific url /someurl>. We declare some variables using PerlSetVar inside those and read
from the perl scripts.

In Apache 1.3 , I am able to read the variable(decl using PerlSetVar )
inside , however in Apache 2.0, I am not able to read the
variable. Has the Location directive usage changed in apache 2.0 ?, Any help
is appreciated

Thanks

------=_Part_14246_29326154.1158871489657
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I asked the below question in apache user group as well, but with no answers

We have 2 location directives, one for all the requests (<Location /> ... </Location>) and one for specific url <Location /someurl> </Location /someurl>. We declare some variables using PerlSetVar inside those and read from the perl scripts.


In Apache 1.3 , I am able to read the variable(decl using PerlSetVar ) inside <Location /someurl>, however in Apache 2.0, I am not able to read the variable. Has the Location directive usage changed in apache
2.0 ?, Any help is appreciated

Thanks


------=_Part_14246_29326154.1158871489657--

Re: Location directive in httpd.conf

am 22.09.2006 07:15:30 von Fred Moyer

On Thu, 21 Sep 2006 1:51 pm, sajid khan wrote:
> I asked the below question in apache user group as well, but with no
> answers
>
> We have 2 location directives, one for all the requests (
> ...
) and one for specific url
>
. We declare some variables using PerlSetVar inside
> those and read from the perl scripts.
>
> In Apache 1.3 , I am able to read the variable(decl using PerlSetVar )
> inside , however in Apache 2.0, I am not able to
> read the variable. Has the Location directive usage changed in apache
> 2.0 ?, Any help is appreciated

What version of modperl and perl are you using, and what OS are you
using? IIRC the location directive usage has not changed. Are you
saying that in 2.0 PerlSetVar works properly for you in ,
but not ? If you could submit a snippet of your conf
that would help in resolving you issue.

Re: Location directive in httpd.conf

am 26.09.2006 04:33:28 von sajid khan

------=_Part_39923_27365914.1159238008457
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Fred, below is sample configuration used


SetHandler perl-script
PerlHandler Apache::Hello
PerlSetVar somevar 50


Regarding your below question, the answer is yes
>>Are you
>>saying that in 2.0 PerlSetVar works properly for you in ,
>>but not ?

Please let me know if I am overlooking or missing anything, I am not able to
read the "somevar" from the handler in apache 2

Thanks



On 9/22/06, Fred Moyer wrote:
>
> On Thu, 21 Sep 2006 1:51 pm, sajid khan wrote:
> > I asked the below question in apache user group as well, but with no
> > answers
> >
> > We have 2 location directives, one for all the requests (
> > ...
) and one for specific url
> >
. We declare some variables using PerlSetVar inside
> > those and read from the perl scripts.
> >
> > In Apache 1.3 , I am able to read the variable(decl using PerlSetVar )
> > inside , however in Apache 2.0, I am not able to
> > read the variable. Has the Location directive usage changed in apache
> > 2.0 ?, Any help is appreciated
>
> What version of modperl and perl are you using, and what OS are you
> using? IIRC the location directive usage has not changed. Are you
> saying that in 2.0 PerlSetVar works properly for you in ,
> but not ? If you could submit a snippet of your conf
> that would help in resolving you issue.
>

------=_Part_39923_27365914.1159238008457
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Fred, below is sample configuration used

<Location /someurl>
SetHandler perl-script

PerlHandler Apache::Hello
PerlSetVar   somevar 50

</Location>


Regarding your below question, the answer is yes
>>Are you
>>saying that in 2.0 PerlSetVar works properly for you in <Location />,
>>but not <Location /someurl>? 


Please let me know if I am overlooking or missing anything, I am not able to read the "somevar" from the handler in apache 2

Thanks



On 9/22/06,
Fred Moyer
<> wrote:

On Thu, 21 Sep 2006 1:51 pm, sajid khan wrote:
> I asked the below question in apache user group as well, but with no
> answers
>
> We have 2 location directives, one for all the requests (<Location />

> ... </Location>) and one for specific url <Location /someurl>
> </Location /someurl>. We declare some variables using PerlSetVar inside
> those and read from the perl scripts.
>

> In Apache 1.3 , I am able to read the variable(decl using PerlSetVar )
> inside <Location /someurl>, however in Apache 2.0, I am not able to
> read the variable. Has the Location directive usage changed in apache

> 2.0 ?, Any help is appreciated

What version of modperl and perl are you using, and what OS are you
using?  IIRC the location directive usage has not changed.  Are you
saying that in 2.0 PerlSetVar works properly for you in <Location />,

but not <Location /someurl>?  If you could submit a snippet of your conf
that would help in resolving you issue.



------=_Part_39923_27365914.1159238008457--

Re: Location directive in httpd.conf

am 26.09.2006 06:58:52 von pgollucci

sajid khan wrote:
> Fred, below is sample configuration used
>
>
> SetHandler perl-script
> PerlHandler Apache::Hello
> PerlSetVar somevar 50
>

I'm almost sure this works correctly (but I could be wrong). Can you look at t/response/TestModperl/setupenv.pm
and see if your case is covered. I believe it is.

--
------------------------------------------------------------ ------------
Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F

When I call your name, Girl, it starts to flame
Burning in my heart, Tearing it all apart..
No matter how I try My love I cannot hide....