Jump to content

CGI/Perl Not Working


Byron

Recommended Posts

Hi,

 

Did you try to see output from the script? Try use CGI::Carp.

At first you have to install it from cpanel, and add the code shown below to you script before use modules.

 

best regards

 

BEGIN {
   my $homedir = ( getpwuid($>) )[7];
   my @user_include;
   foreach my $path (@INC) {
       if ( -d $homedir . '/perl' . $path ) {
           push @user_include, $homedir . '/perl' . $path;
       }
   }
   unshift @INC, @user_include;
}

use CGI::Carp qw(fatalsToBrowser);

Link to comment
Share on other sites

djbob, it seems that all of my cgi/perl files are working in every directory except my root directory:

 

CGI-BIN (works)

http://byrondallas.heliohost.org/cgi-bin/time.pl

 

TEST (works)

http://byrondallas.heliohost.org/test/time.pl

 

ROOT (doesn't work)

http://byrondallas.heliohost.org/time.pl

 

Hopefully that will give you some clue to what's going on?

 

Byron

 

 

Hi,

 

Did you try to see output from the script? Try use CGI::Carp.

 

best regards

 

My cPanel Error Log is showing a 500 Error - File does not exist.

 

Regards,

Byron

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...