...The Dreaded "/cgi-bin/"....

Problems with the Windows version of XAMPP, questions, comments, and anything related.

...The Dreaded "/cgi-bin/"....

Postby Popparodz » 19. December 2008 23:57

...I did a search for "cgi-bin"...and got this....
...{ No posts were found because the word cgi-bin is not contained in any post.}....

....I've been using XAMPP for awhile now and figured I'd graduate to cgi stuff.....

....but I can't seem to get the combination right....

...when the file {perltest.cgi}...and {cgi.cgi} are in the C:\xampp\cgi-bin directory...I get an error {Object Not Found - 404 error}....

....but I copy/pasted them into the http://localhost/xampp/website/perltest.cgi directory and I got the "CGI with MiniPerl is ready"......the cgi.cgi gave me an "OK".....

....So do I put any "abc.cgi" directly into the [website] folder for it to run on the local server for testing,and not even bother with the [cgi-bin] until I upload them to my server...remembering to change the ...#!"C:\xampp\perl\bin\perl.exe"....?
Popparodz
 
Posts: 1
Joined: 19. December 2008 23:33

Re: ...The Dreaded "/cgi-bin/"....

Postby Sharley » 20. December 2008 00:16

Popparodz wrote:....So do I put any "abc.cgi" directly into the [website] folder for it to run on the local server for testing,and not even bother with the [cgi-bin] until I upload them to my server...remembering to change the ...#!"C:\xampp\perl\bin\perl.exe"....?
Yes you may do this, because the defaults in the httpd.conf file allow .cgi scripts anywhere within the htdocs tree.
This line in the htdocs <Directory> directive for the htdocs folder ensures that:
Options MultiViews Indexes FollowSymLinks Includes ExecCGI
http://localhost/xampp/website/perltest.cgi is in the htdocs tree.

http://localhost/cgi-bin/perltest.cgi may be the correct URI for your other 404 issue.
http://localhost/xampp/cgi-bin/perltest.cgi will give the 404 page not found error.

BTW if you have a perl script with a .pl extension then if you add it to this line in the httpd.conf file then it too will be available from anywhere in the htdocs tree - like so:
AddHandler cgi-script .cgi .pl
...and if you get perl errors from your scripts then you may have to install the full Perl Addon (with ActiveState Perl).

(Also the search facility is broken since the upgrade to phpBB3 - no sign yet of it being fixed by the forum administrator or even if the admin is trying to fix it).
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 88 guests