cgi error

Discussion in 'PHP' started by member1, Jun 19, 2007.

  1. #1
    hi there any one hi expert in cgi and perl

    i have probleme in instalation i install a new script in cgi
    i config step by step like he the manual instalation
    but whene i tray to enter to my administration he give me
    this error

    Error 500 - Internal server error
    
    Un problème inattendu est survenu.
    Veuillez réessayer ultérieurement.
    PHP:
    i tray it to find out with cgi Contrôle scripts he find out this error
    in admin.cgi
    Résultat :
    - 2 CGI returned nonzero status
    Can't locate conf.pm in @INC (@INC contains: modules /usr/local/lib/perl/5.6.1 /usr/local/share/perl/5.6.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.6.1 /usr/share/perl/5.6.1 /usr/local/lib/site_perl .) at /kunden/homepages/3/d192671145/htdocs/find/cgi-bin/admin.cgi line 6.
    BEGIN failed--compilation aborted at /kunden/homepages/3/d192671145/htdocs/find/cgi-bin/admin.cgi line 6.
    STDOUT OK STDERR OK
    PHP:
    and i test it in
    conf.pm he give this
    Résultat :
    - cgi: File not present or has invalid modes
    (no output) 
    PHP:
    there is anyone he can help me how i fix this
     
    member1, Jun 19, 2007 IP
  2. ajsa52

    ajsa52 Well-Known Member

    Messages:
    3,426
    Likes Received:
    125
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Try with these:

    1.- Make sure your file has executable attributes. (755 is ok)
    2.- End your perl file with this line:
    
    1;
    
    Code (markup):
    3.- Add this line at the beginning of your perl file, an check output:
    
    #! /usr/bin/perl
    eval { conf.pm; }; if ($@) { print "ERROR with $_<br />\n"; } else { print "OK with $_<br />\n"; }
    
    Code (markup):
    4.- Check your environment:
    
    # Check Environment
    print "<hr/>ENV<br />";
    foreach my $key (sort keys %ENV) { print "$key=$ENV{$key}<br/>\n"; }
    
    Code (markup):
     
    ajsa52, Jun 19, 2007 IP
  3. member1

    member1 Active Member

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    68
    #3
    i make it the file chomod 755 he give this error
    For help, please send mail to the webmaster , giving this error message and the time and date of the error.

    in the manual instalation he telle me chomod the file module to 644
    and this file conf.pm is inside
    and the admin.cgi he request this conf.pm
     
    member1, Jun 19, 2007 IP
  4. member1

    member1 Active Member

    Messages:
    65
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    68
    #4
    hi i did all this setep but nothig the same error whene i tray to enter to my administration the main page is empty whaite paper

     
    member1, Jun 21, 2007 IP
  5. RogerBaxter

    RogerBaxter Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I was getting the same error message on a perl script that I had run for years on another server, but when I moved it to a new server I got this error message. After reading the above posts I went to check over my script and noticed that a final semi-colon (;) was missing at the end of the last sub-routine in the script. After fixing that, and up-loading the corrected script, it ran just fine ... like it always had done before the move.

    Thanks for the ideas ... even though my fix was only a modification of one of the ideas posted ... it got me looking for the right type of cause to my problem!
     
    RogerBaxter, Oct 12, 2009 IP