SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2001
    Location
    Portland, OR
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    web server error

    i am trying to run a cgi perl script to process info from a html form and i keep getting

    WEB SERVER ERROR: the resource that you tried to reach: [pathname], caused a program to run, which did not execute as intended.

    i have checked my permissions and my syntax umpteen times, as well as my pathname and filename. i know it's a long shot, but if anyone has any ideas as to where i might look for an error, you just might save an otherwise nice girl with a promising future from going to the crazy house...

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you post the code, that'll make it a bit easier...
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  3. #3
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you can, look in the server's error log. Otherwise try posting in the Perl forum:

    http://www.sitepointforums.com/forum...php?forumid=36

    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2001
    Location
    Portland, OR
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the server's error log says "no such file or directory, execution failed"; but i know that the filename and pathnames are both right.
    Here's my script (even though i am pretty sure there's nothing wrong with it, that's why i didn't write to the perl forum in the 1st place):


    #!usr/bin/perl
    #
    #
    #
    #CGI written to create on-the-fly station home page from home_page.html form
    #written 10/30/01 by sadie morse, USGS WRD skmorse@usgs.gov
    #
    #######

    print "Content-type:text/html\n\n";

    read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});
    @pairs = split(/&/, $buffer);
    foreach $pair (@pairs) {
    ($name, $value) = split(/=/, $pair);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    $value =~ s/\n/ /g; # replace newlines with spaces
    $value =~ s/\r//g; # remove hard returns
    $value =~ s/\cM//g; # delete ^M's
    $FORM{$name} = $value;
    }

    #this hash takes the data from the "name" form element and converts it back to
    #the name of the gaging stations
    %name = ( $FORM{'noselect'} => "",
    $FORM{'roosevelt'} => "Big Cr nr Roosevelt Beach",
    $FORM{'siletz'} => "Siletz nr Siletz, OR",
    $FORM{'beaver'} => "Nestucca R nr Beaver, OR",
    $FORM{'fairdale2'} =>" Nestucca R nr Fairdale",
    $FORM{'tillamook'} => "Wilson R nr Tillamook" );

    #here is the returned page
    print <<HTML;
    <html><head><title>$FORM{'name'}</title></head>
    <body bgcolor=\"#cccc99\" text=\"#003300\" vlink=\"#dd9911\" link=\"#0033aa\">
    <H3 Align=center>$FORM{'name'}</H3>
    <P>this is the gaging station from which you will be requesting information</body></html>
    HTML

  5. #5
    blonde.... Sarah's Avatar
    Join Date
    Jul 2001
    Location
    Berkshire, UK
    Posts
    7,442
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    daft question but does your server have perl support? You might want to check on that first as it sounds like its not recognised?
    Regular user


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
  •