frederick213 has asked for the wisdom of the Perl Monks concerning the following question:

well, i got this book "Perl and CGI For The World Wide Web" cause i'm just starting out, and i'm trying to install the stuff i need to get perl to work... i have a xitami server up and running, and it also told me to download a Perl interpreter at activestate.com which i did... but when i try to test my script "HTTP/1.1 404: Not found" keeps coming up, though i dont' know why. i tested the server and it's working, so i dont' think it's that. can anyone give me any suggestions, or point out my error? you can even email me at blazingdragons91@aol.com and any help is much appreciated.

2006-06-09 Retitled by GrandFather, as per Monastery guidelines
Original title: 'New User'

Replies are listed 'Best First'.
Re: cgi problem with xitami server
by ww (Archbishop) on Jun 09, 2006 at 18:41 UTC
    This is NOT a rant against Xitami; I used it on 'doze boxen for several years with pleasure and satisfaction.

    However, Xitami's default config does NOT, IIRC, countenance local cgi-bin dirs inside a user dir; rather, all has to be stuffed in the cgi-bin in server_root, unless you parse Xitami's documentation successfully and learn how to config for local cgi-bins... AMONG OTHER ISSUES.

    Hence, my current inclination would be to second the suggestion that you install XAMPP or even Apache 2.n for Windows. They're both free, and working with Apache and it's (sometimes murky) docs puts you on the road to mastering an industry standard.

Re: cgi problem with xitami server
by davis (Vicar) on Jun 09, 2006 at 17:58 UTC
    Welcome to the monastery! Incidentally, we tend not to email users answers as that would prevent anyone else from getting helpful hints.
    An HTTP 404 means that you've asked your webserver for a file which it can't find, for whatever reason. The file may not be where you're telling the server to look (e.g. a different directory), it might have a different filename, or it simply may not exist.
    However, as you're just starting with this, I'd recommend installing Xampp, because it makes things really very easy for the beginner. Try getting used to the test/example scripts available, and then try using your own.
    cheers

    davis
    Kids, you tried your hardest, and you failed miserably. The lesson is: Never try.
Re: 404 executing Perl on a xitami server
by ikegami (Patriarch) on Jun 09, 2006 at 17:55 UTC

    It's definitely a server error. It is misconfigured, you are using the wrong URL or the script is not in the right place.

    Pick better titles, please. How (not) to ask a question

Re: cgi problem with xitami server
by Joost (Canon) on Jun 09, 2006 at 17:56 UTC
Re: cgi problem with xitami server
by kabeldag (Hermit) on Jun 10, 2006 at 02:58 UTC
    Apache's httpd web server is the way to go, if you ask me.

    Download it for wind-blows or *nix here : http://httpd.apache.org/download.cgi

    You may want to have something like the following 2 entries in conf/httpd.conf configuration file in the Windows version (depending on where you want to serve pages from).
    They point to the default document root directory and a cgi-bin directory:

    DocumentRoot "C:/Program Files/Apache Group/apache/mydefaultpages/"

    ScriptAlias /cgi-bin/ "C:/Program Files/Apache Group/Apache/cgi-bin/"

    Perl scripts within (C:/Program Files/Apache Group/Apache/cgi-bin/) will need to point to the Perl binary.
    So, in each Perl script on the very first line you need to put in the path to perl.exe using the "hash bang + path-to-perl" entry.

    IE: #!/some-dir/bin/perl

    Here is an example perl cgi test script:

    #!/perl/bin/perl print "Content-type:text/html\n\n"; print "<b>Perl</b> is working\n";
Re: cgi problem with xitami server
by Anonymous Monk on Feb 01, 2008 at 23:40 UTC
    copy the testperl.pl program that is in cgi-src directory into the cgi-bin directory and rename it to testperl.cgi. Change the first line to #!perl and it works. Ofcourse that is assuming you have perl installed and that it works from a dos prompt when you give the command c:\perl.
Re: cgi problem with xitami server
by ahmad (Hermit) on Jun 10, 2006 at 09:21 UTC

    404 Not Found means you're calling the wrong directory