Gossamer Forum
Home : Products : Gossamer Links : Discussions :

mod_perl setting for multi linksql installation

Quote Reply
mod_perl setting for multi linksql installation
Hi,

If I want to install multi linksql under apache server and have mod_perl support, do I need to have mod_perl directive configuration for each installation such as:

<Directory /cgi-bin/install1>
perl-handler Apache::Registry>
...
</Directory>

<Directory /cgi-bin/install2>
perl-handler Apache::Registry>
...
</Directory>

Or there is method to have one directory only?

Thanks,

C
Quote Reply
Re: [cefs99] mod_perl setting for multi linksql installation In reply to
Is this topic out of the scope of this forum or what else make this question not that "popular"?
Quote Reply
Re: [cefs99] mod_perl setting for multi linksql installation In reply to
For the VirtualHost

<IfModule mod_perl.c>
Alias /perl/ /path/to/your/cgi-bin/
PerlModule Apache::Registry
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI -Indexes
</Location>
</IfModule>

Now
http://www.yourdomain.tld/perl/links1/page.cgi
http://www.yourdomain.tld/perl/links2/page.cgi

Should be working under mod_perl

And

http://www.yourdomain.tld/cgi-bin/links1/page.cgi
http://www.yourdomain.tld/cgi-bin/links2/page.cgi

as plain cgi

if you have your startup.pl setup correctly.

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================
Quote Reply
Re: [HyperTherm] mod_perl setting for multi linksql installation In reply to
Hi HyperTherm,

Thanks so much!

Since I am using mod_perl, so I changed the Apache::Registry in your sample configuration to ModPerl::Registry. As well as adding the startup.pl file in httpd.conf. However, I still encounter one problem:

when I access the url http://x.com/perl/test1/admin/admin.cgi, it displays following error in the error_log:

[Fri Jun 17 13:22:55 2005] [error] Can't locate object method "request" via package "Apache" at /usr/local/httpd-2.0.54/cgi-bin/test1/admin/GT/CGI.pm line 73.\n


What does this mean?

btw, my startup.pl is:

#!/usr/bin/perl
use lib '/usr/local/httpd-2.0.54/cgi-bin/test1/admin';
use Links::mod_perl;
1;


C
Quote Reply
Re: [cefs99] mod_perl setting for multi linksql installation In reply to
Hi,

After some searching it seems that the problem related to mod_perl version.

I'd both installed mod_perl 1.29 and 2.0 in my box, since I hadnt found a way to remove the v1.29 so just left there.

Now seems the linksql still think I am using 1.29 only.

Since I am actually installed modperl 2.0 at last so the actual modperl version is 2.0 but linksql still use 1.29 so that it display the "cant find ...error" in my last post.

from the admin/GT/CGI.PM as below, the reason is clearly: linksql think MOD_PERL is <1.99 :-(

....
if (MOD_PERL and MOD_PERL >= 1.99 and $Apache::ServerStarting != 1) {
require Apache2;
require APR::Pool;
Apache->request->pool->cleanup_register(\&reset_env);
}
elsif (MOD_PERL and $Apache::ServerStarting != 1) {
require Apache;
Apache->request->register_cleanup(\&reset_env);
#this above line is the one output errors in error_log
}
......

WHat Can I do?
Quote Reply
Re: [cefs99] mod_perl setting for multi linksql installation In reply to
No experience with apache2.x/mod_perl1.99(2.x)
if installed via rpm route

rpm -qa | grep mod_perl to see which version you are on.

Why don't you build mod_perl 1.99 back in as DSO (i don't really trust rpm route pr statically compiled mod_perl if you are on cpanel setup)
Google around and you would find the steps.

BTW, i am sure you are installing Glinks in a existing VirtualHost with the directives going in the VirtualHost container.

Thanks
HyTC
==================================
Mail Me If Contacting Privately Is That Necessary.
==================================

Last edited by:

HyperTherm: Jun 18, 2005, 11:41 AM
Quote Reply
Re: [HyperTherm] mod_perl setting for multi linksql installation In reply to
Tks for your help, HT. Now my problem was completely fixed. The original CGI.pm and GT.pm with glink 3.0.3 and older version doesn't support mod_perl 2.x. so I asked linksql support people and they send me 2 updated version of CGI.pm and GT.pm and now it works after restart apache 2.0.54. Also you can get these 2 file updated via the Update section in the admin panel.

And your given httpd.conf setting for mod_perl works very well except replace following code:

PerlHandler Apache::Registry

with

PerlHandler ModPerl::Registry

For mod_perl 2.0's sake,


Tks,

Hong
Quote Reply
Re: [cefs99] mod_perl setting for multi linksql installation In reply to
I'm running LinksSQL 2.2.0 on a RedHat ES 3 box with Apache 2.0.46 and Mod_Perl 1.99 and encounter the same error message when starting under Mod_Perl:

Code:
ModPerl::Registry: Can't locate object method "request" via package "Apache" at /<snip>/cgi-bin/admin/GT/CGI.pm line 69

Is there any chance to get those two updated files mentioned above?
Quote Reply
Re: [Ca5ey] mod_perl setting for multi linksql installation In reply to
Hi,

mod_perl questions you should send a question to support or to Alex. That seems to be his baby, and he has the deepest understanding of the issues surrounding it. Especially with mod_perl 2.0, as it still seems to be a work in progress.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.