proton

Hi there,

reading here and at syndk8 just for a while, I came across some problems ... maybe some of you can point me the right direction  Applause.

Some weeks ago I started

learn

 ing 

perl

  using WinXP and Xampp (www.

apache

 friends.org) ... however, since

perl

  was developed for UNIX and I'm already using K

Ubuntu

  and Gentoo, I thought I'd set up a local development environment at the first one. Ok, so far its done. I installed

apache

 2, fastcgi and some other modules, setted up a virtual host in my home directory and successfully tested a little fast written cgi-script.

Since this worked, I wanted to install shadowMaker (Im sure, some here are familiar with this prog  :roflmaoApplause at my virtual host, where I have to add that it runs without problems at my normal webspace, but here I got some error messages I can't get around. I guess it has something to do with my

apache

  configuration  Applause

Running shadowmaker.cgi in my browser it gives me an '500 internal server error'
My access.log:
127.0.0.1 - - [20/Jul/2007:23:07:47 +0200] "GET /cgi-bin/shadowmaker.cgi HTTP/1.1" 500 655 "-" "Mozilla/5.0 (X11; U;

Linux

  i686; en-US; rv:1.8.1.5) Gecko/20061201 Firefox/2.0.0.5 (

Ubuntu

 -feisty)"

my error.log
[Fri Jul 20 23:07:47 2007] [error] (2)No such file or directory: exec of '/home/industrie13/web/shadow/cgi-bin/shadowmaker.cgi' failed
[Fri Jul 20 23:07:47 2007] [error] [client 127.0.0.1] Premature end of script headers: shadowmaker.cgi


and when I run it in command line, it gives me:
industrie13@linworks:~$

perl

  /home/industrie13/web/shadow/cgi-bin/shadowmaker.cgi
Content-type: text/html

<h1>Software error:</h1>
<pre>Can't locate SMSetup.pm in @INC (@INC contains: /etc/

perl

  /usr/local/lib/

perl

 /5.8.8 /usr/local/share/

perl

 /5.8.8 /usr/lib/

perl

 5 /usr/share/

perl

 5 /usr/lib/

perl

 /5.8 /usr/share/

perl

 /5.8 /usr/local/lib/site_

perl

  .) at /home/industrie13/web/shadow/cgi-bin/shadowmaker.cgi line 24.
BEGIN failed--compilation aborted at /home/industrie13/web/shadow/cgi-bin/shadowmaker.cgi line 24.
</pre>
<p>
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.

</p>
[Fri Jul 20 23:11:24 2007] shadowmaker.cgi: Can't locate SMSetup.pm in @INC (@INC contains: /etc/

perl

  /usr/local/lib/

perl

 /5.8.8 /usr/local/share/

perl

 /5.8.8 /usr/lib/

perl

 5 /usr/share/

perl

 5 /usr/lib/

perl

 /5.8 /usr/share/

perl

 /5.8 /usr/local/lib/site_

perl

  .) at /home/industrie13/web/shadow/cgi-bin/shadowmaker.cgi line 24.
[Fri Jul 20 23:11:24 2007] shadowmaker.cgi: BEGIN failed--compilation aborted at /home/industrie13/web/shadow/cgi-bin/shadowmaker.cgi line 24.


Ok, SMSetup.pm is definitely in the same dir as shadowmaker.cgi and the dot '.' at the end of the @INC listing indicates, that it searches directory where the script itself is located too, but can't find it ... and that confuses me.
I could try to change the path to the .pm as an absolute path, but that could not be the solution, the error must be somewhere else.

My VH setup file is:
<VirtualHost 127.0.0.1>
ServerName shadow
DocumentRoot /home/industrie13/web/shadow/
ServerAdmin webmaster@localhost

<Applauseirectory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Applauseirectory /home/industrie13/web/shadow/>
Options ExecCGI Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
# This directive allows us to have

apache

 2's default start page
                # in /

apache

 2-default/, but still have / go to the right place
                #RedirectMatch ^/$ /

apache

 2-default/
</Directory>

ScriptAlias /cgi-bin/ /home/industrie13/web/shadow/cgi-bin/
<Applauseirectory "/home/industrie13/web/shadow/cgi-bin">
    AllowOverride Indexes FileInfo Authconfig
    Options ExecCGI +Indexes +Includes +FollowSymlinks
    SetHandler cgi-script
    AddHandler cgi-script .cgi .pl
    Order allow,deny
    Allow from all
</Directory>

ErrorLog /var/log/

apache

 2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/

apache

 2/access.log combined
ServerSignature On

</VirtualHost>


anyone got an idea? trying to figure this out the whole evening  Applause

Bompa

hi, i would put a copy of SMSetup.pm in /etc/

perl

  or whatever just to see the effect.

also not sure if you're into

perl

  or not, but

perl

  is case sensitive

wish i could help more

Bompa

dirk

Bompa,

as we have developed the script I have already sent an answer via PM.
(This is a normal support issue.)

But to give a more general answer which can also be interesting for
other scripts:

If loading a module Module.pm fails the path can be included, like:


BEGIN {
  push(@INC, '/absolute_path_name/');
};

use Module;



Perkiset's Place Home   Politics @ Perkiset's