Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Problem configuring to run with mod_perl

Quote Reply
Problem configuring to run with mod_perl
I have mod_perl installed ok and I'm at the stage where I need to make the entries to httpd.conf for glinks 3.

My problem is as I understand it I need to make these entries in the vhost section for the domain (ergo247.com) :

PerlRequire /etc/httpd/conf/startup.pl
<Location /cgi-bin>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>

Glinks is in the cgi-bin itself and I had to create the startup.pl file and placed in it :

use lib '/home/ergo247/public_html/cgi-bin/admin';
use Links::mod_perl;
1;

as per instructions.

When I make these entries apache restart fails.

What am I doing wrong??

Quote Reply
Re: [roman365] Problem configuring to run with mod_perl In reply to
What is the error?
Check the httpd error_log file for errors.
Check httpd.conf for any syntax errors.

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] Problem configuring to run with mod_perl In reply to
Thanks for the reply.

I'm not that great with apache :(

How do i check the error log?

As far as syntax goes I'll need to do some looking up, I'm only as far as finding where to put the entries as described in the glinks mod perl readme.
Quote Reply
Re: [roman365] Problem configuring to run with mod_perl In reply to
Maddening.

This bit seems ok, apache restarts with it in the virtual host section for the site running links 3

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


But the minute I put in :

PerlRequire /etc/httpd/conf/startup.pl

or

PerlRequire etc/httpd/conf/startup.pl

in the same virtual host entry restart of apache fails.

Where in httpd.conf is it supposed to go and is the syntax ok?

This is all that is in the startup.pl file :

use lib '/home/ergo247/public_html/cgi-bin/admin';
use Links::mod_perl;
1;

is the structure correct?

Can anyone advise please?

Quote Reply
Re: [roman365] Problem configuring to run with mod_perl In reply to
What's the actual error?

Adrian
Quote Reply
Re: [brewt] Problem configuring to run with mod_perl In reply to
This is whats reported for httpd restart

/usr/sbin/httpd restart: configuration broken, ignoring restart
/usr/sbin/httpd restart: (run 'apachectl configtest' for details)
Quote Reply
Re: [roman365] Problem configuring to run with mod_perl In reply to
What's apachectl configtest say then.

Adrian
Quote Reply
Re: [brewt] Problem configuring to run with mod_perl In reply to
I couldnt get it to run til it dawned on me just now I should be running httpd configtest :

With the entry in I get :

root@sol [/etc/httpd/conf]# httpd configtest
[Thu May 26 03:12:51 2005] [error] Can't locate Links/mod_perl.pm in @INC (@INC contains: home/ergo247/public_html/cgi-bin/admin /usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /etc/httpd/conf/startup.pl line 2.\nBEGIN failed--compilation aborted at /etc/httpd/conf/startup.pl line 2.\nCompilation failed in require at (eval 4) line 1.\n
Syntax error on line 1567 of /usr/local/apache/conf/httpd.conf:
Can't locate Links/mod_perl.pm in @INC (@INC contains: home/ergo247/public_html/cgi-bin/admin /usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /etc/httpd/conf/startup.pl line 2.
BEGIN failed--compilation aborted at /etc/httpd/conf/startup.pl line 2.
Compilation failed in require at (eval 4) line 1.
Quote Reply
Re: [roman365] Problem configuring to run with mod_perl In reply to
Sounds like the path to your admin is not right.... could that be it?
dave

Big Cartoon DataBase
Big Comic Book DataBase
Quote Reply
Re: [carfac] Problem configuring to run with mod_perl In reply to
Seems that way but it is correct, mod_perl.pm exists in a dir under admin Links but nothing changes if the path is adjusted to reflect that.
Quote Reply
Re: [roman365] Problem configuring to run with mod_perl In reply to
Messed about a bit and now got this :

root@sol [/etc/httpd/conf]# httpd configtest
[Thu May 26 11:26:46 2005] [error] Can't locate Apache/DBI.pm in @INC (@INC contains: /home/ergo247/public_html/cgi-bin/admin /usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /home/ergo247/public_html/cgi-bin/admin/Links/mod_perl.pm line 22.\nBEGIN failed--compilation aborted at /home/ergo247/public_html/cgi-bin/admin/Links/mod_perl.pm line 24.\nCompilation failed in require at /etc/httpd/conf/startup.pl line 2.\nBEGIN failed--compilation aborted at /etc/httpd/conf/startup.pl line 2.\nCompilation failed in require at (eval 4) line 1.\n
Syntax error on line 1568 of /usr/local/apache/conf/httpd.conf:
Can't locate Apache/DBI.pm in @INC (@INC contains: /home/ergo247/public_html/cgi-bin/admin /usr/lib/perl5/5.8.6/i686-linux /usr/lib/perl5/5.8.6 /usr/lib/perl5/site_perl/5.8.6/i686-linux /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl . /usr/local/apache/ /usr/local/apache/lib/perl) at /home/ergo247/public_html/cgi-bin/admin/Links/mod_perl.pm line 22.
BEGIN failed--compilation aborted at /home/ergo247/public_html/cgi-bin/admin/Links/mod_perl.pm line 24.
Compilation failed in require at /etc/httpd/conf/startup.pl line 2.
BEGIN failed--compilation aborted at /etc/httpd/conf/startup.pl line 2.
Compilation failed in require at (eval 4) line 1.
Quote Reply
Re: [roman365] Problem configuring to run with mod_perl In reply to
You need to install Apache::DBI perl module.

perl -MCPAN -e 'install Apache::DBI'

should do the trick (may need to configure CPAN).

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Problem configuring to run with mod_perl In reply to
Thanks.

Tried it, this is what I get back:

CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Thu, 26 May 2005 09:57:35 GMT
Running install for module Apache::DBI
Running make for A/AB/ABH/Apache-DBI-0.94.tar.gz
CPAN: Digest::MD5 loaded ok
CPAN: Compress::Zlib loaded ok
Checksum for /root/.cpan/sources/authors/id/A/AB/ABH/Apache-DBI-0.94.tar.gz ok
Scanning cache /root/.cpan/build for sizes
Apache-DBI-0.94/
Apache-DBI-0.94/t/
Apache-DBI-0.94/t/10mysql.t
Apache-DBI-0.94/eg/
Apache-DBI-0.94/eg/startup.pl
Apache-DBI-0.94/README
Apache-DBI-0.94/MANIFEST
Apache-DBI-0.94/AuthDBI.pm
Apache-DBI-0.94/Changes
Apache-DBI-0.94/Makefile.PL
Apache-DBI-0.94/DBI.pm
Apache-DBI-0.94/traces.txt
Removing previously used /root/.cpan/build/Apache-DBI-0.94
CPAN.pm: Going to build A/AB/ABH/Apache-DBI-0.94.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Apache::DBI
cp AuthDBI.pm blib/lib/Apache/AuthDBI.pm
cp DBI.pm blib/lib/Apache/DBI.pm
Manifying blib/man3/Apache::DBI.3
Manifying blib/man3/Apache::AuthDBI.3
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/10mysql....ok 4/10# Failed test (t/10mysql.t at line 35)
# The object isn't defined
t/10mysql....NOK 5# Looks like you failed 1 tests of 10.
t/10mysql....dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 5
Failed 1/10 tests, 90.00% okay (less 5 skipped tests: 4 okay, 40.00%)
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/10mysql.t 1 256 10 1 10.00% 5
5 subtests skipped.
Failed 1/1 test scripts, 0.00% okay. 1/10 subtests failed, 90.00% okay.
make: *** [test_dynamic] Error 2
/usr/bin/make test -- NOT OK
Running make install
make test had returned bad status, won't install without force

What does it mean wont install without force?
Quote Reply
Re: [roman365] Problem configuring to run with mod_perl In reply to
Its ok, figured it out Laugh

went to cpan dir and did force install from there, worked ok.

Preloading Gossamer Links modules into mod_perl:
. . . . . . . .
All modules loaded ok!
Compiling all functions ... All modules compiled and loaded okay!

At last!!!!

Thanks for all your help :)