Perl directive not allowed in a Location block

Perl directive not allowed in a Location block

am 24.01.2008 21:50:49 von kgerbasi

I am currently upgrading our Apache server from 1.3 to 2.2 and I'm
encountering the following error when I try to start Apache. The config
works ok in 1.3, however in 2.2 I get the following error 'Perl directive
not allowed in a block'.

Can I no longer put a perl directive in a location block?

------------------------------------------------------------ ----------

PerlSetVar CHART_LOCATION bottom
PerlSetVar CRM 1


Some perl code



------------------------------------------------------------ ----------


Thanks,
Kevin
--
View this message in context: http://www.nabble.com/Perl-directive-not-allowed-in-a-Locati on-block-tp15074701p15074701.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Re: Perl directive not allowed in a Location block

am 24.01.2008 22:00:47 von gozer

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigEDAD071CF8A3F2C20DDF479C
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

kgerbasi wrote:
> I am currently upgrading our Apache server from 1.3 to 2.2 and I'm
> encountering the following error when I try to start Apache. The config=

> works ok in 1.3, however in 2.2 I get the following error 'Perl directi=
ve
> not allowed in a block'. =20
>=20
> Can I no longer put a perl directive in a location block?

Not anymore, no.

Can you post a more detailled example of what you are trying to do?

--=20
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/


--------------enigEDAD071CF8A3F2C20DDF479C
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHmPx/yzKhB4jDpaURAlTAAKCgTiNRVv/1Sf+4iHKgdaR+5HNs2gCg nbBo
vlapFh6P/3UDykmCeRdg+xg=
=Mc26
-----END PGP SIGNATURE-----

--------------enigEDAD071CF8A3F2C20DDF479C--

Re: Perl directive not allowed in a Location block

am 24.01.2008 22:16:50 von kgerbasi

Philippe M. Chiasson wrote:
>
> kgerbasi wrote:
>> I am currently upgrading our Apache server from 1.3 to 2.2 and I'm
>> encountering the following error when I try to start Apache. The config
>> works ok in 1.3, however in 2.2 I get the following error 'Perl directive
>> not allowed in a block'.
>>
>> Can I no longer put a perl directive in a location block?
>
> Not anymore, no.
>
> Can you post a more detailled example of what you are trying to do?
>
> --
> Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
> http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
>
>

I'm basically pulling client options from our database and setting them in
the conf file. What would the workaround be since this option has been
removed?



my $config = Config::ApacheConfiguration->new();
my @clientOptions = $config->GetClientConfiguration('5');
push @PerlSetVar, @clientOptions;



--
View this message in context: http://www.nabble.com/Perl-directive-not-allowed-in-a-Locati on-block-tp15074701p15075224.html
Sent from the mod_perl - General mailing list archive at Nabble.com.

Re: Perl directive not allowed in a Location block

am 24.01.2008 22:49:25 von gozer

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig64A61ACA2A39B81DB6F37B4F
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable



kgerbasi wrote:
>=20
>=20
> Philippe M. Chiasson wrote:
>> kgerbasi wrote:
>>> I am currently upgrading our Apache server from 1.3 to 2.2 and I'm
>>> encountering the following error when I try to start Apache. The conf=
ig
>>> works ok in 1.3, however in 2.2 I get the following error 'Perl direc=
tive
>>> not allowed in a block'. =20
>>>
>>> Can I no longer put a perl directive in a location block?
>> Not anymore, no.
>>
>> Can you post a more detailled example of what you are trying to do?
>>
>> --=20
>> Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5=
A5
>> http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.or=
g/
>> =20
>>
>=20
> I'm basically pulling client options from our database and setting them=
in
> the conf file. What would the workaround be since this option has been=

> removed?
>=20
>
>
> my $config =3D Config::ApacheConfiguration->new();
> my @clientOptions =3D $config->GetClientConfiguration('5');
> push @PerlSetVar, @clientOptions;
>

>


Just moving out of the should work just fine, no?

Otherwise, you can always do:


$Location{'/'} =3D


To inject configuration for that location.


--=20
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/


--------------enig64A61ACA2A39B81DB6F37B4F
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHmQfsyzKhB4jDpaURAtv7AKClP8sDJdNhaxYb6kEhrxfZBOGhogCf T/h6
GlCYtEURAsKahhIkfvRgqXY=
=OB7J
-----END PGP SIGNATURE-----

--------------enig64A61ACA2A39B81DB6F37B4F--

Re: Perl directive not allowed in a Location block

am 25.01.2008 17:50:29 von kgerbasi

Philippe M. Chiasson wrote:
>
>
>
> kgerbasi wrote:
>>
>>
>> Philippe M. Chiasson wrote:
>>> kgerbasi wrote:
>>>> I am currently upgrading our Apache server from 1.3 to 2.2 and I'm
>>>> encountering the following error when I try to start Apache. The config
>>>> works ok in 1.3, however in 2.2 I get the following error 'Perl
>>>> directive
>>>> not allowed in a block'.
>>>>
>>>> Can I no longer put a perl directive in a location block?
>>> Not anymore, no.
>>>
>>> Can you post a more detailled example of what you are trying to do?
>>>
>>> --
>>> Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
>>> http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
>>>
>>>
>>
>> I'm basically pulling client options from our database and setting them
>> in
>> the conf file. What would the workaround be since this option has been
>> removed?
>>
>>
>>
>> my $config = Config::ApacheConfiguration->new();
>> my @clientOptions = $config->GetClientConfiguration('5');
>> push @PerlSetVar, @clientOptions;
>>

>>

>
> Just moving out of the should work just fine, no?
>
> Otherwise, you can always do:
>
>
> $Location{'/'} =
>

>
> To inject configuration for that location.
>
>
> --
> Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
> http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
>
>
>
>

I have many blocks within a block so I can't move
it out. I can use the $Location way but I simply liked the ease of reading
the config file the way I did it in v1.3 of Apache.

Do you need to declare everything in the $Location or can you use it to
append to the existing block thats been written out using tags.


Thanks,
Kevin


--
View this message in context: http://www.nabble.com/Perl-directive-not-allowed-in-a-Locati on-block-tp15074701p15091925.html
Sent from the mod_perl - General mailing list archive at Nabble.com.