Gossamer Forum
Home : Products : Gossamer Links : Discussions :

mod_perl installed?

Quote Reply
mod_perl installed?
I runned widgetzīs modules.cgi

I think the result shows me that mod_perl is installed

............... IO::Socket::UNIX DBI Mysql mod_perl mod_perl_hooks Apache GD Storable Safe::Hole SQL::Eval SQL::Statement SQL::Statement::Hash Apache::Registry ..............

So I tried to install mod_perl for linksql like described in the readme-file,
but I get a httpd-failure when I restart httpd.


1. How can I see that mod_perl is really installed?
Can I be sure because of modules.cgi?
My IP told me he can install it for tech fee ;)


2. Iīm not sure about the path of location setting
<Location /url/to/links/cgi>
Normally I would use /home/domain/public_html/sql2


If I understand it right, what readme told me, the path should
be just /sql2 in this case.

I tried both, without success.


3. I created a startup.pl at non-public directory and made the setting
for that in httpd.conf


How to check where the problem is?

Michael

--
Michael Skaide

http://www.cycle24.de

Quote Reply
Re: [Michael Skaide] mod_perl installed? In reply to
>>
1. How can I see that mod_perl is really installed?
Can I be sure because of modules.cgi?
<<

>>
My IP told me he can install it for tech fee ;)
<<

Well then it isn't installed if the tech guy needs to install it Shocked

printing $ENV{GATEWAY_INTERFACE} will tell you if mod_perl is intalled or not.

If it is you'll see CGI-Perl

Chances are it isn't installed.
Quote Reply
Re: [Michael Skaide] mod_perl installed? In reply to
Hi,

The easiest way to see if mod_perl is installed is to go to Setup->Environment and look at:

Persistant Env: mod_perl (0) SpeedyCGI (0)

Unless you see mod_perl (1), then the program is not running under mod_perl.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] mod_perl installed? In reply to
Alex,

what I want is to check if mod_perl is compiled in apache on the server, not if the script is running under mod_perl

Michael

--
Michael Skaide

http://www.cycle24.de

Quote Reply
Re: [Michael Skaide] mod_perl installed? In reply to
Doing a HEAD request on your server should tell you:
Code:
brewt@stinky:~$ telnet brewt.org 80
Trying 24.68.28.145...
Connected to brewt.org.
Escape character is '^]'.
HEAD / HTTP/1.0
<== a \n (so press enter twice after HEAD / HTTP/1.0)
HTTP/1.1 200 OK
Date: Mon, 24 Dec 2001 09:32:11 GMT
Server: Apache/1.3.20 (Unix) mod_perl/1.26 PHP/4.0.6
Last-Modified: Mon, 24 Dec 2001 09:30:01 GMT
...

That or you could look at your error log for when apache starts up.


Adrian

Last edited by:

brewt: Dec 24, 2001, 1:35 AM
Quote Reply
Re: [brewt] mod_perl installed? In reply to
That isn't reliable. You can have mod_perl show up but not actually have perl script running under it.

For example all cobalt servers have mod_perl for handling apache but not for perl scripts.
Quote Reply
Re: [RedRum] mod_perl installed? In reply to
Well he did say "what I want is to check if mod_perl is compiled in apache on the server, not if the script is running under mod_perl"...


Adrian
Quote Reply
Re: [brewt] mod_perl installed? In reply to
Correct path for mod_perl ???

Thatīs the instruction in Readme:

You need to change '/url/to/links/cgi' to the URL where the user
cgi scripts are located (for example: add.cgi, search.cgi, etc). The
URL should start with a / and be set from your document root, but does
not contain your domain name. For example, if your scripts were at:

http://gossamer-threads.com/perl/links-sql/search.cgi

You would put: '/perl/links-sql' as location.

----------

Normally I use this path for installations ....

/home/domainname/public_html/links

If I understand the instructions right, I must use this path

/links

I canīt believe that this is right. I have more than one domain at my server.
Whatīs right?

The same question for startup.pl

use lib '/full/path/to/admin';
use Links::mod_perl;


Do I need to use the path which I would use in Links-scripts,
or do I need to use paths which are used in server-scripts ?

Michael



--
Michael Skaide

http://www.cycle24.de

Quote Reply
Re: [Michael Skaide] mod_perl installed? In reply to
If your cgi scripts are in a directory off your root called links then /links should be fine.
Quote Reply
Re: [Michael Skaide] mod_perl installed? In reply to
If you put:

<Location /links>
...
</Location>

in the httpd.conf, then /links on ALL DOMAINS will be run under mod_perl. If you put it inside a <VirtualHost> directive, then it will be only for the one domain.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] mod_perl installed? In reply to
So for a individual domain this would be like??

<VirtualHost 123.123.123.123>
...
<Location /cgi-bin/links>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>
...
</VirtualHost>
Quote Reply
Re: [Canoon] mod_perl installed? In reply to
You need the PerlRequire command to load startup.pl:

<VirtualHost 123.123.123.123>
...
PerlRequire /path/to/startup.pl
<Location /cgi-bin/links>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>
...
</VirtualHost>

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] mod_perl installed? In reply to
I thought I had mod_perl working right until I read this thread. Do I need to make a change to my configuration or is it already working correctly?

I have:

<VirtualHost 66.240.147.84>
...
<Location /cgi-bin>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>
...
</VirtualHost>

Notice that I don't have: PerlRequire /path/to/startup.pl

My enviornment states:

System Information
======================================
Perl Version: 5.008
Links SQL Version: 2.1.1
DBI.pm Version: 1.30
Persistant Env: mod_perl (1) SpeedyCGI (0)
Mod Perl Version: 1.27
@INC =
/usr/local/lib/perl5/5.8.0/i686-linux
/usr/local/lib/perl5/5.8.0
/usr/local/lib/perl5/site_perl/5.8.0/i686-linux
/usr/local/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl
.
/usr/local/apache/
/usr/local/apache/lib/perl



Which leads me to believe that the script is working under mod_perl. Is that correct or do I need that startup.pl bit?

Thanks!

Last edited by:

Demolitioncrew: Oct 2, 2002, 2:43 AM
Quote Reply
Re: [Demolitioncrew] mod_perl installed? In reply to
You need the PerlRequire line otherwise the modules won't get loaded into memory.
Quote Reply
Re: [Demolitioncrew] mod_perl installed? In reply to
Hi,

As Paul mentioned you should have the PerlRequire line to a startup.pl file that contains:

use lib '/path/to/links/admin';
use Links::mod_perl;
1;

This will load all the Links SQL modules into memory when apache starts for large memory savings and faster response times.

Cheers,

Alex
--
Gossamer Threads Inc.