You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Ian D. Stewart" <id...@compuvative.com> on 2002/05/26 15:43:46 UTC

Configuring mod_perl on Debian

Dear List,

I have been trying for the better part of the day to get Apache 
w/mod_perl working on a Debian Woody system.  With the help of the 
Configuration section of the mod_perl Guide, I have set up httpd.conf 
w/ mod_perl support, I have setup a /perl location with 
Apache::Registry as the PerlHandler, and I have copied a test script 
from /usr/share/doc/libapache-mod-perl/examples into /perl.  However, 
whenever I try to display http://localhost/perl/test.pl, the browser 
(Galeon-1.2.1) displays a dialog asking if I want to save the file to 
disk or open it with an external application.

here is the pertinant section of httpd.conf:

Alias /perl /var/www/perl

PerlModule Apache::Registry
<Location /perl>
     SetHandler perl-script
     PerlHandler Apache::Registry
     Options ExecCGI
     allow from all
     PerlSendHeader on
</Location>


Any clues as to what I may be doing wrong, or where to look for more 
info, would be greatly appreciated.


Regards,
Ian

RE: Configuring mod_perl on Debian

Posted by Joe Yates <jo...@tin.it>.
Dear Ian,

I think we may looking for the problem in the wrong place.

The fact that the browser offers to save something means that it is 
receiving a response from the server, and that it is not interpreting said 
response as HTML text.

You are not actually outputting any '<HTML>', '<HEAD>', or '<BODY>' tags. 
If you add them, your browser is more likely to recognise the response as HTML.

Joe Yates


> > -----Original Message-----
> > From: Ian D. Stewart [mailto:idstewart@compuvative.com]
> > Sent: Sunday, May 26, 2002 10:44 AM
> > To: modperl@perl.apache.org
> > Cc: debian-user@lists.debian.org
> > Subject: Configuring mod_perl on Debian
> >
> >
> > Dear List,
> >
> > I have been trying for the better part of the day to get Apache
> > w/mod_perl working on a Debian Woody system.  With the help of the
> > Configuration section of the mod_perl Guide, I have set up httpd.conf
> > w/ mod_perl support, I have setup a /perl location with
> > Apache::Registry as the PerlHandler, and I have copied a test script
> > from /usr/share/doc/libapache-mod-perl/examples into /perl.  However,
> > whenever I try to display http://localhost/perl/test.pl, the browser
> > (Galeon-1.2.1) displays a dialog asking if I want to save the file to
> > disk or open it with an external application.
> >
> > here is the pertinant section of httpd.conf:
> >
> > Alias /perl /var/www/perl
> >
> > PerlModule Apache::Registry
> > <Location /perl>
> >      SetHandler perl-script
> >      PerlHandler Apache::Registry
> >      Options ExecCGI
> >      allow from all
> >      PerlSendHeader on
> > </Location>
> >
> >
> > Any clues as to what I may be doing wrong, or where to look for more
> > info, would be greatly appreciated.
> >
> >
> > Regards,
> > Ian
> >


Re: Configuring mod_perl on Debian

Posted by Andrew McNaughton <an...@scoop.co.nz>.

On Tue, 28 May 2002, Ian D. Stewart wrote:

> Date: Tue, 28 May 2002 08:14:26 -0400
> From: Ian D. Stewart <id...@compuvative.com>
> To: Jeff A <je...@bircholme.com>
> Cc: modperl@perl.apache.org, debian-user@lists.debian.org
> Subject: Re: Configuring mod_perl on Debian
>
> On 2002.05.28 04:03 Jeff A wrote:
> >
> > > From: Andrew McNaughton [mailto:andrew@scoop.co.nz]
> > > Sent: 27 May 2002 21:02
> > > To: Ian D. Stewart
> > ...
> > > You miss most of the advantage of debian's package management
> > > if you start building core components independently.  Debian
> > > looks after you pretty well, but it's a bit of an all or
> > > nothing affair.  ie it's worth a little effort to stick
> > > with the debian packages if you can.
> >
> > I agree with Andrew - getting Apache, Mod_SSL, PHP4 and mod_perl
> > with PHP4/MySQL and mod_perl/mySQL all co-operating is a relative
> > doddle with Debian packaging. Especially in view of the volume of
> > the 'I cant build...' comments on the mod_perl mailing lists.
> >
> > We usually wget the .debs we want installed as a set, into a dir
> > e.g. /usr/local/deb/<build date> and then do a
> >   dpkg -i *.deb
> >   apt-get check
> >
> > FYI, these are SOME of the installed packages on our Dev server
> > yes - it's a bit messy, but it's potato flavoured, with woody
> > extras, and we don't seem to have any issues.
> > ---------------------------------------------------------------------
> > apache         1.3.23-1    Versatile, high-performance HTTP server
> > apache-common  1.3.23-1    Support files for all Apache webservers
> > libapache-mod-ssl 2.8.7-1  Strong cryptography (HTTPS support)
> > libssl0.9.6    0.9.6c-1    SSL shared libraries
> >
> > mysql-client   3.23.46-2   mysql database client binaries
> > mysql-common   3.23.46-2   mysql database common files
> > libmysqlclient 3.23.38-2   mysql database client library
> >
> > perl           5.6.1-7     Larry Wall's Practical Extraction and
> > libperl5.6     5.6.1-7     Shared Perl library.
> >
> > libapache-dbi-perl 0.88-5  Connect apache server to database via
> > libapache-mod-perl 1.26-2  Integration of perl with the Apache web
> > libapache-reload-perl 0.07-1  Reload changed modules in a mod_perl
> > libapache-request-perl 0.33-1 Generic Apache Request Library
> > libapache-session-perl 1.54-1 Perl modules for keeping persistent
> > libapache-ssi-perl 2.16-1  perl Apache::SSI - Implement Server Side
> > libdbd-mysql-perl 1.2216-2 mySQL database interface for Perl
> > libdbi-perl    1.21-2      The Perl5 Database Interface by Tim Bunce
> >
> > php4           4.1.2-1     A server-side, HTML-embedded scripting
> > php4-mysql     4.1.2-1     MySQL module for php4
> > php4-pear      4.1.2-1     PEAR - PHP Extension Application Reposit
> > ---------------------------------------------------------------------
>
> Ok.  I'll give it a another go.
>
> Interestingly, I have not seen a lot of "I can't build this" messages
> on modperl, but have seen a fair number of "why isn't this working
> messages on debian-user.

It's not just about ease of getting started, it's about ease of
maintenance over time.  debian makes it very easy to keep your software up
to date (though you shouldn't even think about letting debian's package
configuration mess with your httpd.conf once you get going)

Also, if you want to install any debian package that depends on apache,
then debian is going to want a debian apache installation, and you have to
start jumping through hoops to keep it happy, or installing all the other
packages from source, which then also lose out on debian's tools for
keeping them up to date.

Andrew


Re: Configuring mod_perl on Debian

Posted by "Ian D. Stewart" <id...@compuvative.com>.
On 2002.05.28 04:03 Jeff A wrote:
> 
> > From: Andrew McNaughton [mailto:andrew@scoop.co.nz]
> > Sent: 27 May 2002 21:02
> > To: Ian D. Stewart
> ...
> > You miss most of the advantage of debian's package management
> > if you start building core components independently.  Debian
> > looks after you pretty well, but it's a bit of an all or
> > nothing affair.  ie it's worth a little effort to stick
> > with the debian packages if you can.
> 
> I agree with Andrew - getting Apache, Mod_SSL, PHP4 and mod_perl
> with PHP4/MySQL and mod_perl/mySQL all co-operating is a relative
> doddle with Debian packaging. Especially in view of the volume of
> the 'I cant build...' comments on the mod_perl mailing lists.
> 
> We usually wget the .debs we want installed as a set, into a dir
> e.g. /usr/local/deb/<build date> and then do a
>   dpkg -i *.deb
>   apt-get check
> 
> FYI, these are SOME of the installed packages on our Dev server
> yes - it's a bit messy, but it's potato flavoured, with woody
> extras, and we don't seem to have any issues.
> ---------------------------------------------------------------------
> apache         1.3.23-1    Versatile, high-performance HTTP server
> apache-common  1.3.23-1    Support files for all Apache webservers
> libapache-mod-ssl 2.8.7-1  Strong cryptography (HTTPS support)
> libssl0.9.6    0.9.6c-1    SSL shared libraries
> 
> mysql-client   3.23.46-2   mysql database client binaries
> mysql-common   3.23.46-2   mysql database common files
> libmysqlclient 3.23.38-2   mysql database client library
> 
> perl           5.6.1-7     Larry Wall's Practical Extraction and
> libperl5.6     5.6.1-7     Shared Perl library.
> 
> libapache-dbi-perl 0.88-5  Connect apache server to database via
> libapache-mod-perl 1.26-2  Integration of perl with the Apache web
> libapache-reload-perl 0.07-1  Reload changed modules in a mod_perl
> libapache-request-perl 0.33-1 Generic Apache Request Library
> libapache-session-perl 1.54-1 Perl modules for keeping persistent
> libapache-ssi-perl 2.16-1  perl Apache::SSI - Implement Server Side
> libdbd-mysql-perl 1.2216-2 mySQL database interface for Perl
> libdbi-perl    1.21-2      The Perl5 Database Interface by Tim Bunce
> 
> php4           4.1.2-1     A server-side, HTML-embedded scripting
> php4-mysql     4.1.2-1     MySQL module for php4
> php4-pear      4.1.2-1     PEAR - PHP Extension Application Reposit
> ---------------------------------------------------------------------

Ok.  I'll give it a another go.

Interestingly, I have not seen a lot of "I can't build this" messages 
on modperl, but have seen a fair number of "why isn't this working 
messages on debian-user.


Ian

RE: Configuring mod_perl on Debian

Posted by Jeff A <je...@bircholme.com>.
> From: Andrew McNaughton [mailto:andrew@scoop.co.nz] 
> Sent: 27 May 2002 21:02
> To: Ian D. Stewart
...
> You miss most of the advantage of debian's package management 
> if you start building core components independently.  Debian 
> looks after you pretty well, but it's a bit of an all or 
> nothing affair.  ie it's worth a little effort to stick 
> with the debian packages if you can.

I agree with Andrew - getting Apache, Mod_SSL, PHP4 and mod_perl
with PHP4/MySQL and mod_perl/mySQL all co-operating is a relative 
doddle with Debian packaging. Especially in view of the volume of 
the 'I cant build...' comments on the mod_perl mailing lists.

We usually wget the .debs we want installed as a set, into a dir
e.g. /usr/local/deb/<build date> and then do a 
  dpkg -i *.deb
  apt-get check

FYI, these are SOME of the installed packages on our Dev server 
yes - it's a bit messy, but it's potato flavoured, with woody 
extras, and we don't seem to have any issues.
---------------------------------------------------------------------
apache         1.3.23-1    Versatile, high-performance HTTP server
apache-common  1.3.23-1    Support files for all Apache webservers
libapache-mod-ssl 2.8.7-1  Strong cryptography (HTTPS support) 
libssl0.9.6    0.9.6c-1    SSL shared libraries

mysql-client   3.23.46-2   mysql database client binaries
mysql-common   3.23.46-2   mysql database common files
libmysqlclient 3.23.38-2   mysql database client library

perl           5.6.1-7     Larry Wall's Practical Extraction and 
libperl5.6     5.6.1-7     Shared Perl library.

libapache-dbi-perl 0.88-5  Connect apache server to database via 
libapache-mod-perl 1.26-2  Integration of perl with the Apache web
libapache-reload-perl 0.07-1  Reload changed modules in a mod_perl
libapache-request-perl 0.33-1 Generic Apache Request Library
libapache-session-perl 1.54-1 Perl modules for keeping persistent 
libapache-ssi-perl 2.16-1  perl Apache::SSI - Implement Server Side
libdbd-mysql-perl 1.2216-2 mySQL database interface for Perl
libdbi-perl    1.21-2      The Perl5 Database Interface by Tim Bunce

php4           4.1.2-1     A server-side, HTML-embedded scripting
php4-mysql     4.1.2-1     MySQL module for php4
php4-pear      4.1.2-1     PEAR - PHP Extension Application Reposit
---------------------------------------------------------------------



-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org





RE: Configuring mod_perl on Debian

Posted by Jeff A <je...@bircholme.com>.
> From: Andrew McNaughton [mailto:andrew@scoop.co.nz] 
> Sent: 27 May 2002 21:02
> To: Ian D. Stewart
...
> You miss most of the advantage of debian's package management 
> if you start building core components independently.  Debian 
> looks after you pretty well, but it's a bit of an all or 
> nothing affair.  ie it's worth a little effort to stick 
> with the debian packages if you can.

I agree with Andrew - getting Apache, Mod_SSL, PHP4 and mod_perl
with PHP4/MySQL and mod_perl/mySQL all co-operating is a relative 
doddle with Debian packaging. Especially in view of the volume of 
the 'I cant build...' comments on the mod_perl mailing lists.

We usually wget the .debs we want installed as a set, into a dir
e.g. /usr/local/deb/<build date> and then do a 
  dpkg -i *.deb
  apt-get check

FYI, these are SOME of the installed packages on our Dev server 
yes - it's a bit messy, but it's potato flavoured, with woody 
extras, and we don't seem to have any issues.
---------------------------------------------------------------------
apache         1.3.23-1    Versatile, high-performance HTTP server
apache-common  1.3.23-1    Support files for all Apache webservers
libapache-mod-ssl 2.8.7-1  Strong cryptography (HTTPS support) 
libssl0.9.6    0.9.6c-1    SSL shared libraries

mysql-client   3.23.46-2   mysql database client binaries
mysql-common   3.23.46-2   mysql database common files
libmysqlclient 3.23.38-2   mysql database client library

perl           5.6.1-7     Larry Wall's Practical Extraction and 
libperl5.6     5.6.1-7     Shared Perl library.

libapache-dbi-perl 0.88-5  Connect apache server to database via 
libapache-mod-perl 1.26-2  Integration of perl with the Apache web
libapache-reload-perl 0.07-1  Reload changed modules in a mod_perl
libapache-request-perl 0.33-1 Generic Apache Request Library
libapache-session-perl 1.54-1 Perl modules for keeping persistent 
libapache-ssi-perl 2.16-1  perl Apache::SSI - Implement Server Side
libdbd-mysql-perl 1.2216-2 mySQL database interface for Perl
libdbi-perl    1.21-2      The Perl5 Database Interface by Tim Bunce

php4           4.1.2-1     A server-side, HTML-embedded scripting
php4-mysql     4.1.2-1     MySQL module for php4
php4-pear      4.1.2-1     PEAR - PHP Extension Application Reposit
---------------------------------------------------------------------



Re: Configuring mod_perl on Debian

Posted by Andrew McNaughton <an...@scoop.co.nz>.
My guess is that some error message is terminating your headers before the
content-type is sent.  stdout and stderr get buffered independently so the
stderr can come out of your script first, even if it's generated later in
your code.

* Set $|=1; as the first thing you do in your test script, immediately
followed by your content-type header.  This turns of buffering of your IO
streams.

* look at what's in your error logs, though this might not be much until
you set $|.

* Don't use your browser to test what's going on. go lower level.  If
you're not comfortable doing this with telnet, use `lynx -mime_header` or
`Get -Se`, although be aware that both of these can mung the output a
little, as does apache.

I've gotten debian's mod_perl running on multiple machines under both
potato and woody.

You miss most of the advantage of debian's package management if you start
building core components independently.  Debian looks after you pretty
well, but it's a bit of an all or nothing affair.  ie it's worth a little
effort to stick with the debian packages if you can.

Andrew



On Mon, 27 May 2002, Ian D. Stewart wrote:

> Date: Mon, 27 May 2002 14:22:02 -0400
> From: Ian D. Stewart <id...@compuvative.com>
> To: Ian D. Stewart <id...@compuvative.com>
> Cc: Eric <er...@taedium.net>, modperl@perl.apache.org,
>      debian-user@lists.debian.org
> Subject: Re: Configuring mod_perl on Debian
>
> Well, I haven't had any better luck with the debian package but I have
> gotten Apache and mod_perl running by building from source.
>
>
> Thanx for all the help,
> Ian
>
>
> On 2002.05.27 13:06 Ian D. Stewart wrote:
> > On 2002.05.27 12:59 Eric wrote:
> >> On Mon, May 27, 2002 at 12:20:00PM -0400, Ian D. Stewart wrote:
> >> > On 2002.05.27 11:43 Lucas M. Saud wrote:
> >> > >maybe you can try a "chmod 755" in the script...and check the perl
> >> > >path in first line of the script...and set the directory
> >> permission
> >> to
> >> > >777....
> >> >
> >> > Tried all of those.  Still no good.
> >> >
> >> > I've downloaded the source for both Apache and mod_perl, and will
> >> be
> >>
> >> > building from scratch.  If that works, that I well chock it up to a
> >> > debian packaging/configuration issue.
> >> >
> >> >
> >> > Thanx for the feedback,
> >> > Ian
> >>
> >> You said you were using woody (testing)?
> >>
> >> I haven't been following your problems, but I was able to get
> >> apache/mod_perl running on debian with little fuss.  What packages
> >> have
> >> you tried?  As a point of reference, these are the apache packages I
> >> have installed:
> >>
> >>  % dpkg -l '*apache*' | grep "^i"
> >>  ii  apache-common  1.3.24-3       Support files for all Apache
> >> webservers
> >>  ii  apache-ssl     1.3.24.2+1.47- Versatile, high-performance HTTP
> >> server with
> >>  ii  libapache-mod- 1.26-3         Integration of perl with the
> >> Apache
> >> web serv
> >>  ii  libapache-requ 0.33-1         Generic Apache Request Library
> >>
> >> Eric
> >
> > Eric,
> >
> > Here is what I have:
> >
> > dpkg -l '*apache*' | grep '^i'
> > ii  apache-common  1.3.24-3       Support files for all Apache
> > webservers
> > ii  apache-perl    1.3.24-2-1.26- Versatile, high-performance HTTP
> > server with
> > ii  libapache-mod- 1.26-3         Integration of perl with the Apache
> > web serv
> >
> > Not sure where our configurations are different (I note you do not
> > have apache-perl installed), but after I installed apache-perl, I had
> > to copy /etc/apache/httpd.conf to /etc/apache-perl/httpd.conf, and
> > make quite a few changes by hand.
> >
> >>
> >>
> >> p.s. you shouldn't ever set a cgi directory to be world-writable
> >> (777).
> >
> > Yeah.  That struct me as being a bit off...
> >
> >
> > Thanx,
> > Ian
>


Re: Configuring mod_perl on Debian

Posted by "Ian D. Stewart" <id...@compuvative.com>.
Well, I haven't had any better luck with the debian package but I have 
gotten Apache and mod_perl running by building from source.


Thanx for all the help,
Ian


On 2002.05.27 13:06 Ian D. Stewart wrote:
> On 2002.05.27 12:59 Eric wrote:
>> On Mon, May 27, 2002 at 12:20:00PM -0400, Ian D. Stewart wrote:
>> > On 2002.05.27 11:43 Lucas M. Saud wrote:
>> > >maybe you can try a "chmod 755" in the script...and check the perl
>> > >path in first line of the script...and set the directory 
>> permission
>> to
>> > >777....
>> >
>> > Tried all of those.  Still no good.
>> >
>> > I've downloaded the source for both Apache and mod_perl, and will 
>> be
>> 
>> > building from scratch.  If that works, that I well chock it up to a
>> > debian packaging/configuration issue.
>> >
>> >
>> > Thanx for the feedback,
>> > Ian
>> 
>> You said you were using woody (testing)?
>> 
>> I haven't been following your problems, but I was able to get
>> apache/mod_perl running on debian with little fuss.  What packages
>> have
>> you tried?  As a point of reference, these are the apache packages I
>> have installed:
>> 
>>  % dpkg -l '*apache*' | grep "^i"
>>  ii  apache-common  1.3.24-3       Support files for all Apache
>> webservers
>>  ii  apache-ssl     1.3.24.2+1.47- Versatile, high-performance HTTP
>> server with
>>  ii  libapache-mod- 1.26-3         Integration of perl with the 
>> Apache
>> web serv
>>  ii  libapache-requ 0.33-1         Generic Apache Request Library
>> 
>> Eric
> 
> Eric,
> 
> Here is what I have:
> 
> dpkg -l '*apache*' | grep '^i'
> ii  apache-common  1.3.24-3       Support files for all Apache 
> webservers
> ii  apache-perl    1.3.24-2-1.26- Versatile, high-performance HTTP 
> server with
> ii  libapache-mod- 1.26-3         Integration of perl with the Apache 
> web serv
> 
> Not sure where our configurations are different (I note you do not 
> have apache-perl installed), but after I installed apache-perl, I had 
> to copy /etc/apache/httpd.conf to /etc/apache-perl/httpd.conf, and 
> make quite a few changes by hand.
> 
>> 
>> 
>> p.s. you shouldn't ever set a cgi directory to be world-writable
>> (777).
> 
> Yeah.  That struct me as being a bit off...
> 
> 
> Thanx,
> Ian

Re: Configuring mod_perl on Debian

Posted by "Ian D. Stewart" <id...@compuvative.com>.
On 2002.05.27 12:59 Eric wrote:
> On Mon, May 27, 2002 at 12:20:00PM -0400, Ian D. Stewart wrote:
> > On 2002.05.27 11:43 Lucas M. Saud wrote:
> > >maybe you can try a "chmod 755" in the script...and check the perl
> > >path in first line of the script...and set the directory permission
> to
> > >777....
> >
> > Tried all of those.  Still no good.
> >
> > I've downloaded the source for both Apache and mod_perl, and will be
> 
> > building from scratch.  If that works, that I well chock it up to a
> > debian packaging/configuration issue.
> >
> >
> > Thanx for the feedback,
> > Ian
> 
> You said you were using woody (testing)?
> 
> I haven't been following your problems, but I was able to get
> apache/mod_perl running on debian with little fuss.  What packages
> have
> you tried?  As a point of reference, these are the apache packages I
> have installed:
> 
>  % dpkg -l '*apache*' | grep "^i"
>  ii  apache-common  1.3.24-3       Support files for all Apache
> webservers
>  ii  apache-ssl     1.3.24.2+1.47- Versatile, high-performance HTTP
> server with
>  ii  libapache-mod- 1.26-3         Integration of perl with the Apache
> web serv
>  ii  libapache-requ 0.33-1         Generic Apache Request Library
> 
> Eric

Eric,

Here is what I have:

dpkg -l '*apache*' | grep '^i'
ii  apache-common  1.3.24-3       Support files for all Apache 
webservers
ii  apache-perl    1.3.24-2-1.26- Versatile, high-performance HTTP 
server with
ii  libapache-mod- 1.26-3         Integration of perl with the Apache 
web serv

Not sure where our configurations are different (I note you do not have 
apache-perl installed), but after I installed apache-perl, I had to 
copy /etc/apache/httpd.conf to /etc/apache-perl/httpd.conf, and make 
quite a few changes by hand.

> 
> 
> p.s. you shouldn't ever set a cgi directory to be world-writable
> (777).

Yeah.  That struct me as being a bit off...


Thanx,
Ian

Re: Configuring mod_perl on Debian

Posted by Eric <er...@taedium.net>.
On Mon, May 27, 2002 at 12:20:00PM -0400, Ian D. Stewart wrote:
> On 2002.05.27 11:43 Lucas M. Saud wrote:
> >maybe you can try a "chmod 755" in the script...and check the perl
> >path in first line of the script...and set the directory permission to
> >777....
> 
> Tried all of those.  Still no good.
> 
> I've downloaded the source for both Apache and mod_perl, and will be 
> building from scratch.  If that works, that I well chock it up to a 
> debian packaging/configuration issue.
> 
> 
> Thanx for the feedback,
> Ian

You said you were using woody (testing)?

I haven't been following your problems, but I was able to get
apache/mod_perl running on debian with little fuss.  What packages have
you tried?  As a point of reference, these are the apache packages I
have installed:

 % dpkg -l '*apache*' | grep "^i"
 ii  apache-common  1.3.24-3       Support files for all Apache webservers
 ii  apache-ssl     1.3.24.2+1.47- Versatile, high-performance HTTP server with
 ii  libapache-mod- 1.26-3         Integration of perl with the Apache web serv
 ii  libapache-requ 0.33-1         Generic Apache Request Library

Eric


p.s. you shouldn't ever set a cgi directory to be world-writable (777).

Re: Configuring mod_perl on Debian

Posted by "Ian D. Stewart" <id...@compuvative.com>.
On 2002.05.27 12:49 Randy Kobes wrote:

> 
> I didn't cc the list, as I've lost the original message,
> but from what I remember, you had
>     Options ExecCGI
> in a configuration. Does
>     Options +ExecCGI
> make a difference? Also, as far as I remember, you had
>     PerlSendHeader On
> Depending on what your script does, and if you use CGI.pm
> to generate the header, try
>     PerlSendHeader Off
> 

Thanx for the feedback Randy.  I tried changing both options.  Still no 
good.


Thanx Anyways,
Ian

Re: Configuring mod_perl on Debian

Posted by "Ian D. Stewart" <id...@compuvative.com>.
On 2002.05.27 11:43 Lucas M. Saud wrote:
> maybe you can try a "chmod 755" in the script...and check the perl
> path in first line of the script...and set the directory permission to
> 777....

Tried all of those.  Still no good.

I've downloaded the source for both Apache and mod_perl, and will be 
building from scratch.  If that works, that I well chock it up to a 
debian packaging/configuration issue.


Thanx for the feedback,
Ian

Re: Configuring mod_perl on Debian

Posted by Stas Bekman <st...@stason.org>.
Ian D. Stewart wrote:
> On 2002.05.27 12:57 Andrew McNaughton wrote:
> 
>>
>> Sounds to me like you're not setting your content-type correctly for
>> some
>> reason.  Have a look at the headers being sent out.  It's either not
>> sending this header, or it's sending something the browser doesn't
>> know
>> what to do with.
> 
> 
> This is the content of test.pl
> 
> BEGIN-SCRIPT
> -- 
> #!/usr/bin/perl
> 
> # your httpd.conf should have something like this:
> 
> # Alias /perl/  /real/path/to/perl-scripts/
> 
> # <Location /perl>
> # SetHandler  perl-script
> # PerlHandler Apache::Registry
> # PerlSendHeader On
> # Options +ExecCGI
> # </Location>
> 
> print "Content-type: text/html\n\n";
> 
> print "<b>Date: ", scalar localtime, "</b><br>\n";
> 
> print "%ENV: <br>\n", map { "$_ = $ENV{$_} <br>\n" } keys %ENV;
> -- 
> END-SCRIPT
> 
> Based on this, I would expect the content to be set to text/html and the 
> page to be displayed to be a listing of the current environment.
> 
> Galeon identifies the content type as application/x-perl.  This would 
> seem to indicate to me that Apache is serving the script directly 
> instead of executing the script and serving the output.  According to 
> the mod_perl Guide, the ExecCGI option (which I have set for Location 
> /perl) is supposed to avoid this situation.

issue a request from the command line and look at the saved response. 
Use lwp's GET, or 'lynx -dump' or any other favorite downloading utility.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: Configuring mod_perl on Debian

Posted by "Ian D. Stewart" <id...@compuvative.com>.
On 2002.05.27 12:57 Andrew McNaughton wrote:
> 
> Sounds to me like you're not setting your content-type correctly for
> some
> reason.  Have a look at the headers being sent out.  It's either not
> sending this header, or it's sending something the browser doesn't
> know
> what to do with.

This is the content of test.pl

BEGIN-SCRIPT
--
#!/usr/bin/perl

# your httpd.conf should have something like this:

# Alias /perl/  /real/path/to/perl-scripts/

# <Location /perl>
# SetHandler  perl-script
# PerlHandler Apache::Registry
# PerlSendHeader On
# Options +ExecCGI
# </Location>

print "Content-type: text/html\n\n";

print "<b>Date: ", scalar localtime, "</b><br>\n";

print "%ENV: <br>\n", map { "$_ = $ENV{$_} <br>\n" } keys %ENV;
--
END-SCRIPT

Based on this, I would expect the content to be set to text/html and 
the page to be displayed to be a listing of the current environment.

Galeon identifies the content type as application/x-perl.  This would 
seem to indicate to me that Apache is serving the script directly 
instead of executing the script and serving the output.  According to 
the mod_perl Guide, the ExecCGI option (which I have set for Location 
/perl) is supposed to avoid this situation.


Thanx,
Ian

RE: Configuring mod_perl on Debian

Posted by "Lucas M. Saud" <lu...@uol.com.br>.
maybe you can try a "chmod 755" in the script...and check the perl path in first line of the script...and set the directory permission to 777....

> -----Original Message-----
> From: Ian D. Stewart [mailto:idstewart@compuvative.com]
> Sent: Sunday, May 26, 2002 10:44 AM
> To: modperl@perl.apache.org
> Cc: debian-user@lists.debian.org
> Subject: Configuring mod_perl on Debian
> 
> 
> Dear List,
> 
> I have been trying for the better part of the day to get Apache 
> w/mod_perl working on a Debian Woody system.  With the help of the 
> Configuration section of the mod_perl Guide, I have set up httpd.conf 
> w/ mod_perl support, I have setup a /perl location with 
> Apache::Registry as the PerlHandler, and I have copied a test script 
> from /usr/share/doc/libapache-mod-perl/examples into /perl.  However, 
> whenever I try to display http://localhost/perl/test.pl, the browser 
> (Galeon-1.2.1) displays a dialog asking if I want to save the file to 
> disk or open it with an external application.
> 
> here is the pertinant section of httpd.conf:
> 
> Alias /perl /var/www/perl
> 
> PerlModule Apache::Registry
> <Location /perl>
>      SetHandler perl-script
>      PerlHandler Apache::Registry
>      Options ExecCGI
>      allow from all
>      PerlSendHeader on
> </Location>
> 
> 
> Any clues as to what I may be doing wrong, or where to look for more 
> info, would be greatly appreciated.
> 
> 
> Regards,
> Ian
> 

*************************************************************
O sigilo desta mensagem é protegido por lei. Se você a recebeu por engano,
queira apagá-la e informar-nos por e-mail endereçado ao remetente.
*************************************************************
The confidentiality of this message is protected by law. If you have
received it in error, please delete it and inform us by e-mail addressed to
its sender.
*************************************************************


Re: Configuring mod_perl on Debian

Posted by Andrew McNaughton <an...@scoop.co.nz>.
Sounds to me like you're not setting your content-type correctly for some
reason.  Have a look at the headers being sent out.  It's either not
sending this header, or it's sending something the browser doesn't know
what to do with.

Andrew



On Sun, 26 May 2002, Ian D. Stewart wrote:

> Date: Sun, 26 May 2002 09:43:46 -0400
> From: Ian D. Stewart <id...@compuvative.com>
> To: modperl@perl.apache.org
> Cc: debian-user@lists.debian.org
> Subject: Configuring mod_perl on Debian
>
> Dear List,
>
> I have been trying for the better part of the day to get Apache
> w/mod_perl working on a Debian Woody system.  With the help of the
> Configuration section of the mod_perl Guide, I have set up httpd.conf
> w/ mod_perl support, I have setup a /perl location with
> Apache::Registry as the PerlHandler, and I have copied a test script
> from /usr/share/doc/libapache-mod-perl/examples into /perl.  However,
> whenever I try to display http://localhost/perl/test.pl, the browser
> (Galeon-1.2.1) displays a dialog asking if I want to save the file to
> disk or open it with an external application.
>
> here is the pertinant section of httpd.conf:
>
> Alias /perl /var/www/perl
>
> PerlModule Apache::Registry
> <Location /perl>
>      SetHandler perl-script
>      PerlHandler Apache::Registry
>      Options ExecCGI
>      allow from all
>      PerlSendHeader on
> </Location>
>
>
> Any clues as to what I may be doing wrong, or where to look for more
> info, would be greatly appreciated.
>
>
> Regards,
> Ian
>