www.webdeveloper.com
Results 1 to 6 of 6

Thread: Another Newbie needin' help

Hybrid View

  1. #1
    Join Date
    Dec 2002
    Location
    Montana
    Posts
    24

    Another Newbie needin' help

    I have written a couple of simple perl scripts(I am learing a new language, like I can control my native language.) and they work great on my PC. However when I upload them to my server they don't seem to work at all. The first line is the typical unix line /usr/bin/perl but I get an Internal Server Error when I run then. Does anyone know of a script that will allow me to look at how my server is set up to see the path to perl?
    Thanks for helping a newbie!
    P.S. My server error log tells me nothing

  2. #2
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    If you're sure it is a problem with your path to Perl then you should be able to find it in your server's documentation. If not contact, the administrator.

    If this doesn't solve the problem, another common mistake to upload your scripts in binary rather than ASCII. Perl scripts are plain text and should be handled as such.

    If this still doesn't solve the problem, try adding this to your script.

    use CGI::Carp 'fatalsToBrowser';

    If there are errors in your code that are preventing the script from compiling, this will output the error messages to the browser.

  3. #3
    Join Date
    Dec 2002
    Location
    Montana
    Posts
    24

    Thanks

    I am pretty sure the problem is with the path to Perl. The scripts seem to run fine on my IIS server on my PC. There is nothing in the server documentation, in fact, I think this guy really doesn't know what he is doing and is reselling part of his hosting account. I do know that it is a virtual host.
    As far a contacting server admin, I did that about a week ago too and still haven't heard anything back from their 27/7 technical support desk.
    Thanks for the suggestion though.
    Actually to be fair though, I sent an email early in the day 12/24 and it is morning 12/26 now, I will give him a break what with the holiday and all

  4. #4
    Join Date
    Nov 2002
    Location
    England
    Posts
    693

    another suggestion

    Another common error is not printing a header. If you are printing anything to the browser make sure you use the command print header(); before you print anything to the browser.

    If you are printing something other than HTML use:

    print header(-type=>"contentType");

    Regards

  5. #5
    Join Date
    Dec 2002
    Location
    Rolla, Mo.
    Posts
    33
    Another common problem is not leaving a blank line after the path to perl.

    #!/umr/bin/perl

    require "cgi_handlers.pl";
    &get_request;

    notice also the hash and exclaimation marks before the path.

  6. #6
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    If line 2 of your example code is the blank line you're referring to, them it's not actually required.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles