Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 5 of 5

This is a discussion on Error 500 in the Shared & Semi-Dedicated forum
Here's the issue... I open the shell and type in "perl somescript.pl" and get what I would like to see in the browser. I go ...

  1. #1
    JPC Member
    Join Date
    Feb 2004
    Posts
    3

    Error 500

    Here's the issue...

    I open the shell and type in "perl somescript.pl" and get what I would like to see in the browser.

    I go to site.com/cgi-bin/somescript.pl and get the lovely Error 500.

    My site is hosted by someone else that is a client here and that's why I can't get direct support, so I decided to ask the nice comminuty people :-)

    I've tried doing some chmod'ing and making sure it's in the bin and out of the bin and everything I can think of. But alas, Apache says "Error 500."

    The main problem is I'm trying to get GreyMatter going on here but it's dead. I get nothing. I tried FormMail since it's super simple and that didn't even work.

    All perl scripting was working in the browser, but, the main host decided to change a .htaccess and something died in that part. He's tried and so have I so I don't know where else to go. The .htaccess file was...
    Code:
    Options +ExecCGI -Indexes
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    I'm simply out of ideas of where else to turn and what to look at. I was thinking about something with the .conf file, but I doubt it could be that would be owned by root.

    Perhaps I'm over looking something? Is there some kind of diagnostic thing I can use? Help Please!!!

    Thanks!!

  2. #2
    Jag Veteran
    Join Date
    Sep 2002
    Posts
    650
    First, try executing some test scrip, something like
    Code:
    #!/usr/bin/perl
    #
    
    print &HTMLcontext; 
    #-------------------------------------------------------------
    # function: HTMTcontext
    #-------------------------------------------------------------
    sub HTMLcontext
    {
    return "Content-type: text/html\n\n"; 
    }
    Upload it to cgi-bin, chmod ugo+x <filename> and try to execute both from shell and via browser.

    If that doesn't work, paste here the relevant lines from Apache error log file. We will start from there

  3. #3
    Just Walking...
    Join Date
    Oct 2002
    Location
    England
    Posts
    436
    Sounds like a permissions issue to me. Run a script under shell and it's run under your username, as you uploaded it you have the correct perms to execute it. However run it via apache and it's run under the user 'nobody' and 'nobody' doesn't have the correct perms to execute it.

    Chmod'ing it to 755 or 777 should work, but it seems you've already tried that?

    /me scratches his head

  4. #4
    JPC Member
    Join Date
    Feb 2004
    Posts
    3
    I get the correct print out calling it from the shell. Again, Error 500 from Apache. Here's what the server log had to say about it...
    Code:
    [2004-02-25 19:19:59]: error: directory is writable by others: (/home/jcra/public_html/cgi-bin)
    *Feels Dumb...*

  5. #5
    JPC Member
    Join Date
    Feb 2004
    Posts
    3
    ALAS! The error has been fixed!

    Amazing what happens to CGI when public_html is set to 777. Set to 701 everything works so that's that good deal.

    Thanks for all your help!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •