godaddy & perl

Discussion in 'Perl Misc' started by grouchy.oldgit@googlemail.com, Mar 29, 2009.

  1. Guest

    I've just started learning perl and am trying to run the script below
    entitled p1.pl on godaddy in folder /cgi

    #!/usr/bin/perl
    print "hello world";

    It keeps returning 500 Internal Sever Error

    Is there some problem in my program? Or am I not using godaddy's perl
    implementation correctly?
     
    , Mar 29, 2009
    #1
    1. Advertising

  2. wrote:
    > I've just started learning perl and am trying to run the script below
    > entitled p1.pl on godaddy in folder /cgi
    >
    > #!/usr/bin/perl
    > print "hello world";
    >
    > It keeps returning 500 Internal Sever Error
    >
    > Is there some problem in my program? Or am I not using godaddy's perl
    > implementation correctly?


    Have you consulted the Go Daddy documentation about whether they offer
    CGI support and, if they do, what their requirement are to make it work?

    Or did you ask the Go Daddy support?

    Think that's the proper way to start.

    --
    Gunnar Hjalmarsson
    Email: http://www.gunnar.cc/cgi-bin/contact.pl
     
    Gunnar Hjalmarsson, Mar 29, 2009
    #2
    1. Advertising

  3. <> wrote:
    > I've just started learning perl and am trying to run the script below
    > entitled p1.pl on godaddy in folder /cgi
    >
    > #!/usr/bin/perl
    > print "hello world";
    >
    > It keeps returning 500 Internal Sever Error
    >
    > Is there some problem in my program?



    No, it looks fine. (assuming that is the correct location for perl)


    > Or am I not using godaddy's perl
    > implementation correctly?



    You need to find out *what* internal error it is.

    You will probably find that in the web server's error log.

    Ask your hosting provider how you can access the server error log.


    Also, try it without Perl, perhaps by using a shell instead:

    #!/bin/bash
    echo "hello world"

    If that also fails, then it is clear that your problem is not
    related to Perl, as it fails in the same way even when not
    using any Perl.


    --
    Tad McClellan
    email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"
     
    Tad J McClellan, Mar 29, 2009
    #3
  4. In article
    <>,
    wrote:

    > I've just started learning perl and am trying to run the script below
    > entitled p1.pl on godaddy in folder /cgi
    >
    > #!/usr/bin/perl
    > print "hello world";
    >
    > It keeps returning 500 Internal Sever Error
    >
    > Is there some problem in my program? Or am I not using godaddy's perl
    > implementation correctly?


    CGI isn't the same as shell programming. The above will only output
    "hello world" when executed from the web page. CGI requires the output
    type be defined before it's processed by the remote browser (these are
    called headers). You sent an invalid header.

    Try this instead:

    #!/usr/bin/perl
    print "content-type: text/plain;\n\n";
    print "hello world\n";
    exit;

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...
    [I filter all Goggle Groups posts, so any reply may be automatically by ignored]
     
    Michael Vilain, Mar 29, 2009
    #4
  5. Gunnar Hjalmarsson <> wrote:
    [I don't see see the OP, therefore replying to your post]
    > wrote:
    >> I've just started learning perl and am trying to run the script below
    >> entitled p1.pl on godaddy in folder /cgi
    >>
    >> #!/usr/bin/perl
    >> print "hello world";
    >>
    >> It keeps returning 500 Internal Sever Error


    See 'perldoc -q 500':
    My CGI script runs from the command line but not the browser.
    (500 Server Error)

    >> Is there some problem in my program?


    Aside of not using
    use warnings;
    use strict;
    which is strongly recommended, no, the script as such looks ok. Did you
    run it from the command line? What was the result? I bet it printed
    "hello world" which is a strong indication that your problem is not
    Perl-related.

    However it appears you are running the Perl script in a CGI environment
    and your script is not producing the required CGI headers. I don't know
    what godaddy is and if this observation is relevant for godaddy or if
    godaddy provides those headers or whatever.

    >>Or am I not using godaddy's perl
    >> implementation correctly?

    >
    >Have you consulted the Go Daddy documentation about whether they offer
    >CGI support and, if they do, what their requirement are to make it work?


    A very sound advice.

    jue
     
    Jürgen Exner, Mar 29, 2009
    #5
  6. smallpond Guest

    On Mar 28, 8:34 pm, wrote:
    > I've just started learning perl and am trying to run the script below
    > entitled p1.pl on godaddy in folder /cgi
    >
    >    #!/usr/bin/perl
    >    print "hello world";
    >
    > It keeps returning 500 Internal Sever Error
    >
    > Is there some problem in my program? Or am I not using godaddy's perl
    > implementation correctly?


    http://www.godaddy.com/gdshop/hosting/shared.asp?isc=goaz2001aa&ci=8971#tabs

    perl cgi is not offered on the basic plan. upgrade.
     
    smallpond, Mar 29, 2009
    #6
  7. brian d foy Guest

    brian d foy, Mar 30, 2009
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. d2005\\

    HttpWebRequest on GoDaddy Problem

    d2005\\, May 15, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    661
    Joerg Jooss
    May 18, 2005
  2. RepAlciere

    GoDaddy closes case.

    RepAlciere, Dec 30, 2003, in forum: HTML
    Replies:
    5
    Views:
    444
    Matthew Superstar Swass
    Dec 31, 2003
  3. Nomen Nescio
    Replies:
    10
    Views:
    777
    brucie
    May 26, 2004
  4. Anonymous via the Cypherpunks Tonga Remailer

    GODADDY SUCKS--DO NOT REGISTER DOMAIN NAMES WITH THEM

    Anonymous via the Cypherpunks Tonga Remailer, May 26, 2004, in forum: HTML
    Replies:
    0
    Views:
    391
    Anonymous via the Cypherpunks Tonga Remailer
    May 26, 2004
  5. perl script at godaddy

    , Mar 28, 2005, in forum: Perl Misc
    Replies:
    5
    Views:
    410
    Gunnar Hjalmarsson
    Apr 1, 2005
Loading...

Share This Page