Gossamer Forum
Home : Products : Gossamer Links : Discussions :

mod_perl trouble

Quote Reply
mod_perl trouble
hi,

i'm trying to make my links_sql run under mod_perl but i still have some problems.

when i'm looking at

links_sql-->admin-->setup-->environment

i see the following:






System Information
======================================
Perl Version: 5.006
Links SQL Version: 2.1.0
Persistant Env: mod_perl (0) SpeedyCGI (0)
@INC =
/var/www/cgi-bin/shop/admin
/usr/lib/perl5/5.6.0/i386-linux
/usr/lib/perl5/5.6.0
/usr/lib/perl5/site_perl/5.6.0/i386-linux
/usr/lib/perl5/site_perl/5.6.0
/usr/lib/perl5/site_perl
.






..........






AUTH_TYPE => Basic
DOCUMENT_ROOT => /var/www/html
GATEWAY_INTERFACE =>
CGI/1.1





........






SERVER_SOFTWARE => Apache/1.3.19 (Unix) (Red-Hat/Linux) mod_ssl/2.8.1 OpenSSL/0.9.6 DAV/1.0.2 PHP/4.0.4pl1 mod_perl/1.24_01





So if i am right, mod_perl is already installed but links_sql doesn't run under mod_perl.

in my http.conf file i've added:

<IfModule mod_perl.c>
Alias /perl/ /var/www/perl/
<Location /perl>
SetHandler perl-script
PerlHandler Apache::Registry
Options +ExecCGI
allow from all
PerlSendHeader On
</Location>
<Location /var/www/cgi-bin/shop>
/path/to/linkssql
SetHandler perl-script
PerlHandler Apache::Registry
PerlSendHeader On
Options +ExecCGI
</Location>
PerlRequire /var/www/cgi-bin/startup.pl
</IfModule>



Also i have created a startup.pl :






#!/usr/bin/perl


use strict;

{
use lib '/var/www/cgi-bin/shop/admin';
use Links::mod_perl;


}
1;









can anybody help me making links_sql run under mod_perl????

what am i doing wrong ??



cheers,

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] mod_perl trouble In reply to
I had a similar problem with GForum, and found the problem to be a rewrite rule. See http://gossamer-threads.com/...orum.cgi?post=190093.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] mod_perl trouble In reply to
thanks for your answer,

but the linked thread doesn't say how to change the rewrite rule.

can you please explain this. i'm an apache-newbee.



thanks!

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.

Last edited by:

ManuGermany: Apr 9, 2002, 12:04 PM
Quote Reply
Re: [ManuGermany] mod_perl trouble In reply to
In httpd.conf, look for something like:

Code:
<IfDefine PERLPROXIED>
RewriteEngine on
RewriteRule ^proxy:.* - [F]
RewriteRule ^(.*\/perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
RewriteRule ^(.*\/cgi-perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
RewriteRule ^(.*\/forum\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
</IfDefine>
I have added the third line. For you, it should probably be
Code:
RewriteRule ^(.*\/cgi-bin\/shop\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
But that depends of course heavily on your apache and mod_perl setup.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] mod_perl trouble In reply to
In Reply To:
In httpd.conf, look for something like:

Code:
<IfDefine PERLPROXIED>
RewriteEngine on
RewriteRule ^proxy:.* - [F]
RewriteRule ^(.*\/perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
RewriteRule ^(.*\/cgi-perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
RewriteRule ^(.*\/forum\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
</IfDefine>
Thanks but i don't have something similar in my http.conf so i still don't know what to do! Cheers,
Code:

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] mod_perl trouble In reply to
HELP....PLEASE!

Crazy

Can anyone please help me !!



Cheers,

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] mod_perl trouble In reply to
Hi,

<Location /var/www/cgi-bin/shop> /path/to/linkssql

That's not a path, but a URL (minus http and domain). You want:

<Location /cgi-bin/linkssql>

or:

<Location /perl>

or something similiar. Not a directory though.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [ManuGermany] mod_perl trouble In reply to
I compiled apache using mod_perl on my server. Here's a step by step:


First just create a temporary folder and cd into it. Then do:

-----------------------------------------

lwp-download http://www.apache.org/dist/httpd/apache_1.3.24.tar.gz

lwp-download http://perl.apache.org/dist/mod_perl-1.26.tar.gz

tar -zvxf apache_1.3.24.tar.gz

tar -zvxf mod_perl-1.26.tar.gz

cd mod_perl-1.26

perl Makefile.PL APACHE_SRC=../apache_1.3.24/src DO_HTTPD=1 USE_APACI=1 EVERYTHING=1

make && make test && make install

cd ../apache_1.3.24

make install

-----------------------------------------


Sean

Last edited by:

SeanP: Apr 11, 2002, 10:37 AM
Quote Reply
Re: [Alex] mod_perl trouble In reply to
In Reply To:
Hi,

<Location /var/www/cgi-bin/shop> /path/to/linkssql

That's not a path, but a URL (minus http and domain). You want:

<Location /cgi-bin/linkssql>


i dont' think so. the url is http://www.shop-netz.com/cgi-bin/shop/

but the server path ist /var/www/cgi-bin/shop

i think you misunderstood somthing...or am i wrong?

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] mod_perl trouble In reply to
You'll need:

<Location /cgi-bin/shop>
Quote Reply
Re: [Paul] mod_perl trouble In reply to
wow !



CoolSmileLaughSly I T W O R K S !!!



THANK YOU VERY MUCH !!!

YOU ARE THE BEST !!!!



Cheers,

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] mod_perl trouble In reply to
o.k. mod_perl works now. thats great.

but now i've got another problem.

nph-build.cgi seems to hang itself up every time i try to build my pages. before i had installed mod_perl it works fine and quick.

does anyone have an idea how to solve the problem ?

Cheers,

Regards,
Manu

Shopping Portal Shop-Netz.de® | Partnerprogramme | Flugreisen & Billigflüge | KESTERMEDIA e.K. | European Affiliate Marketing Forum.
Quote Reply
Re: [ManuGermany] mod_perl trouble In reply to
I am taking the plunge and converting linkssql over to run under mod_perl. I have followed the readme etc and tried some of the posts, but I cannot get it to work.

My server runs ensim and supposedly mod_perl is setup to run.

There is a directory called perl which is where I assume scripts that run under mod_perl should be. My first problem is that I cannot seem to get install.cgi to do a new install in this directory.

Also as a side note, each site on the server has a file called mod_perl and in it is the following. Can anyone tell me what this is? How does this relate to the changes in readme for mod_perl setup?

<IfModule mod_perl.c>
Alias /perl /home/virtual/site17/fst/var/www/perl
<Directory /home/virtual/site17/fst/var/www/perl>
Allow from All
AllowOverride All
Order allow,deny
Options +ExecCGI
</Directory>
SetEnv SITE_PERL /home/virtual/site17/fst/var/www/perl
</IfModule>


Thanks to all in advance for your help.
Webmaster
http://www.e-bannerx.com