You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Bjørn Erik Jacobsen <bj...@sparkit.no> on 2006/03/13 18:45:01 UTC
Problem with perl sections + @Include + Options statement
Hello,
I seem to have a rather strange problem when using Perl sections in
httpd.conf to load extra config files. Including files the normal way
works fine, but when including the same file using @Include in a Perl
section, it chokes on the "Options ..." keyword (see included error
message below). Everything else but this keyword is working fine,
even very complex config files. The original setup is a bit more
complex than what is included here, but I have stripped it down to
what is needed to reproduce (for me at least, on three different
servers, same results).
Anyone got any ideas about this one? I could not find any references
to this anywhere on the list or in the docs.
This works fine (httpd.conf):
====
...
Include /sites/doglegs.com/etc/httpd.conf
...
=====
Whereas the following does not:
====
...
<Perl>
push(@Include, "/sites/doglegs.com/etc/httpd.conf");
</Perl>
...
====
and creates the following error:
Syntax error on line 233 of /data/apps/apache2/conf/httpd.conf:
$parms->add_config() has failed: Option Indexes not allowed here at
/usr/local/lib/perl5/site_perl/5.8.7/i386-freebsd/Apache2/PerlSections
.pm line 203.\n
The file being included, contains nothing spectacular. Also, when
commenting out the Options line, it loads fine and the virtual host
is working as expected:
====
<VirtualHost test12.sparkit.no:80>
ServerName doglegs.com
DocumentRoot /data/sites/doglegs.com/htdocs
ErrorLog /data/sites/doglegs.com/logs/error.log
TransferLog /data/sites/doglegs.com/logs/access.log
<Location />
Options Indexes FollowSymLinks
</Location>
</VirtualHost>
====
*** mod_perl version 2.000002
*** using
/usr/local/lib/perl5/site_perl/5.8.7/i386-freebsd/Apache2/BuildConfig.pm
*** Makefile.PL options:
MP_APR_LIB => aprext
MP_AP_PREFIX => /data/apps/apache2
MP_COMPAT_1X => 0
MP_GENERATE_XS => 1
MP_LIBNAME => mod_perl
MP_USE_DSO => 1
*** The httpd binary was not found
*** (apr|apu)-config linking info
-L/data/apps/apache2/lib -laprutil-1 -lexpat
-L/data/apps/apache2/lib -lapr-1 -lcrypt
*** /usr/local/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 7) configuration:
Platform:
osname=freebsd, osvers=4.11-stable, archname=i386-freebsd
uname='freebsd test12.sparkit.no 4.11-stable freebsd 4.11-stable
#0: sat dec 17 23:06:15 cet 2005
root@test12.sparkit.no:usrsrcsyscompilesparkit-4-10 i386 '
config_args='-d -e'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H
-fno-strict-aliasing -pipe -I/usr/local/include',
optimize='-O',
cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H
-fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='2.95.4 20020320 [FreeBSD]', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8,
Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags ='-Wl,-E -L/usr/local/lib'
libpth=/usr/lib /usr/local/lib
libs=-lm -lcrypt -lutil -lc
perllibs=-lm -lcrypt -lutil -lc
libc=, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-DPIC -fPIC', lddlflags='-shared -L/usr/local/lib'
Re: Problem with perl sections + @Include + Options statement
Posted by Torsten Foertsch <to...@gmx.net>.
On Monday 13 March 2006 18:45, Bjørn Erik Jacobsen wrote:
> Syntax error on line 233 of /data/apps/apache2/conf/httpd.conf:
> $parms->add_config() has failed: Option Indexes not allowed here at
> /usr/local/lib/perl5/site_perl/5.8.7/i386-freebsd/Apache2/PerlSections
> .pm line 203.\n
Is this Apache 2.2?
There is a problem with 2.0.2, "Options" and Apache 2.2. Apache 2.2 has
changed the AllowOverride directive to control which options can be
overridden. Mp 2.0.2 does not regard this. Unfortunately, the set of Options
that can be overridden by default is empty. There is a patch you can try. See
http://www.gossamer-threads.com/lists/modperl/modperl/87487#87487
Torsten