in reply to Scirpts Don't Run

My tip:
First test your LAMP (P for PERL) configuration with a simple perl script like
#!/usr/bin/perl print "Content-type: text/plain\n\n"; print "Hello!"
Call it test.pl and save in your cgi directory, then access via navigator

When you are (If you are not, you have to reconfigure your LAMP installation), research why login.pl is not found in your @INC when you execute the script, maybe you can add use lib sentence in your code to use your directory with modules or load directory in PERL5LIB environment variable

Maybe we should see the code to understand better why this message is show to you
Regards,

Replies are listed 'Best First'.
Re^2: Scirpts Don't Run
by Mtnbkr777 (Initiate) on Aug 04, 2011 at 02:53 UTC

    The test script works fine. in any browser use the following url and you can see my login script. https://www.petro-traxx.com/sql-ledger/login.pl The only thing the cgi-bin folder is test.pl the path to cgi-bin is /var/www/cgi-bin/ , my other scripts are in /var/www/html/petro/sql-ledger/ with www.petro-traxx.com pointing to the petro folder. Thanks for the help

      I assume you meant https://www.petro-traxx.com/cgi-bin/login.pl (according to your Apache config). I'm getting a 500 Internal Server Error, which is a good sign - it means the script is running, though obviously failing. Did you fix it already? At this point you want to check the error log for the cause.

Re^2: Scirpts Don't Run
by Mtnbkr777 (Initiate) on Aug 04, 2011 at 21:56 UTC

    no I meant https:;//www.petro-traxx.com/sql-ledger/login.pl I it would be easier I could give you my login for the SSH to take a look at my setup. Login.pl is not in the CGI-Bin file. I will try to add a uselib sentence in my code and see if that works. Thanks

      I included the following line in my code use lib "/usr/lib/perl5/5.8.8/"; I have included my script. I get the fail at line 119. Thanks

      #!usr/bin/perl use lib "/usr/lib/perl5/5.8.8"; ###################################################################### # SQL-Ledger ERP # Copyright (C) 2006 # # Author: DWS Systems Inc. # Web: http://www.sql-ledger.com # ###################################################################### +# # # this script sets up the terminal and runs the scripts # in bin/$terminal directory # admin.pl is linked to this script # ###################################################################### +# # setup defaults, DO NOT CHANGE $userspath = "users"; $spool = "spool"; $templates = "templates"; $images = "images"; $memberfile = "users/members"; $sendmail = "| /usr/sbin/sendmail -t"; %printer = (); ########## end ########################################### $| = 1; eval { require "sql-ledger.conf"; }; if ($ENV{CONTENT_LENGTH}) { read(STDIN, $_, $ENV{CONTENT_LENGTH}); } if ($ENV{QUERY_STRING}) { $_ = $ENV{QUERY_STRING}; } if ($ARGV[0]) { $_ = $ARGV[0]; } %form = split /[&=]/; # fix for apache 2.0 bug map { $form{$_} =~ s/\\$// } keys %form; # name of this script $0 =~ tr/\\/\//; $pos = rindex $0, '/'; $script = substr($0, $pos + 1); @scripts = qw(login.pl admin.pl custom_login.pl custom_admin.pl); if (grep !/^\Q$form{script}\E/, @scripts) { print "Content-Type: text/html\n\n" if $ENV{HTTP_USER_AGENT}; print "\nAccess denied!\n"; exit; } if (-f "$userspath/nologin" && $script ne 'admin.pl') { print "Content-Type: text/html\n\n" if $ENV{HTTP_USER_AGENT}; if (-s "$userspath/nologin") { open(FH, "$userspath/nologin"); $message = <FH>; close(FH); print "\n$message\n"; } else { print "\nLogin disabled!\n"; } exit; } if ($form{path}) { $form{path} =~ s/%2f/\//gi; $form{path} =~ s/\.\.//g; if ($form{path} !~ /^bin\//) { print "Content-Type: text/html\n\n" if $ENV{HTTP_USER_AGENT}; print "\nInvalid path!\n"; exit; } $ARGV[0] = "$_&script=$script"; require "$form{path}/$script"; } else { if (!$form{terminal}) { if ($ENV{HTTP_USER_AGENT}) { # web browser $form{terminal} = "lynx"; if ($ENV{HTTP_USER_AGENT} !~ /lynx/i) { $form{terminal} = "mozilla"; } } else { if ($ENV{TERM} =~ /xterm/) { $form{terminal} = "xterm"; } if ($ENV{TERM} =~ /(console|linux|vt.*)/i) { $form{terminal} = "console"; } } } if ($form{terminal}) { $form{terminal} =~ s/%2f/\//gi; $form{terminal} =~ s/\.\.//g; $ARGV[0] = "path=bin/$form{terminal}&script=$script"; map { $ARGV[0] .= "&${_}=$form{$_}" } keys %form; require "bin/$form{terminal}/$script"; #line 119 } else { print "Content-Type: text/html\n\n" if $ENV{HTTP_USER_AGENT}; print qq|\nUnknown terminal\n|; } } # end of main

        I re-installed Xtem where would I place the path for the xterm command?