The Cache: Technology Expert's Forum
Welcome, Guest. Please login or register. September 23, 2019, 12:43:50 AM

Login with username, password and session length

Pages: [1]
Author Topic: Can't locate in @INC  (Read 35038 times)
Offline Offline

Posts: 5

View Profile
« on: July 20, 2007, 02:24:52 PM »

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  Wink.

Some weeks ago I started learning perl using WinXP and Xampp ( ... however, since perl was developed for UNIX and I'm already using KUbuntu and Gentoo, I thought I'd set up a local development environment at the first one. Ok, so far its done. I installed apache2, 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  ROFLMAO) 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  Huh?

Running shadowmaker.cgi in my browser it gives me an '500 internal server error'
My access.log:
Code: - - [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: Gecko/20061201 Firefox/ (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] 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 in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /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.
For help, please send mail to this site's webmaster, giving this error message
and the time and date of the error.

[Fri Jul 20 23:11:24 2007] shadowmaker.cgi: Can't locate in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /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, 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:
ServerName shadow
DocumentRoot /home/industrie13/web/shadow/
ServerAdmin webmaster@localhost

<Directory />
Options FollowSymLinks
AllowOverride None
<Directory /home/industrie13/web/shadow/>
Options ExecCGI Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
Allow from all
# This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                #RedirectMatch ^/$ /apache2-default/

ScriptAlias /cgi-bin/ /home/industrie13/web/shadow/cgi-bin/
<Directory "/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

ErrorLog /var/log/apache2/error.log

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

CustomLog /var/log/apache2/access.log combined
ServerSignature On


anyone got an idea? trying to figure this out the whole evening  D'oh!

No links in signatures please
Offline Offline

Posts: 564

Where does this show?

View Profile
« Reply #1 on: July 20, 2007, 08:06:49 PM »

hi, i would put a copy of 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


"The most beautiful and profound emotion we can experience is the sensation of the mystical..." - Albert Einstein
Global Moderator
Offline Offline

Posts: 416

View Profile
« Reply #2 on: July 21, 2007, 10:45:27 AM »


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 fails the path can be included, like:

  push(@INC, '/absolute_path_name/');

use Module;

Pages: [1]
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks

Valid XHTML 1.0! Valid CSS!