httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Cohen" <>
Subject RE: [users@httpd] CGI hangs on WinXP
Date Mon, 19 May 2003 21:03:48 GMT
Hi David,

I would say that you are having problem executing the .pl scripts in the
cgi-bin folder, make sure you have ScriptAlias "c:/program files/apache
group/apache2/cgi-bin" in your httpd.conf file and in the <Directory
c:/program files/apache group/apache2/cgi-bin> container, make sure that you
AddHandler cgi-script .cgi .pl
It's needed sometimes.

All the best,
Jeff Cohen

> Couple of things in a quick checklist:
> 1. do you have the shebang line pointing to your perl executable? (should
> like: #!c:\perl\bin\perl.exe)
> Yes. is unmodified as I downloaded it from
> The shebang line is
> #!c:/Perl/bin/Perl.exe
> this points to the ActivePerl Perl.exe.  The script produces the correct
> when run from the command line, that is, a list of environment variables
> and values.  The value of %PATH% seems consistent with ActivePerl.
> 2. try running http://localhost/cgi-bin/ as a test, what's the
> result? Do you see the environment variables?
> When I type in this URL and enter, I get a "File Download" popup that
> wants to save the file "" to my disk.  When I do so, the saved
> file contains the expected output of the "" CGI script, minus
> the first six lines (including the Content-type line, a blank line, and
> lines of data).  I would much rather see the script output in the browser
> window.  Maybe I need to change the Content-type line?
> 3. which version of perl are you using? Is it 5.8x or 5.6x?
> perl -v output:
> This is perl, v5.6.1 built for MSWin32-x86-multi-thread
> (with 1 registered patch, see perl -V for more detail)
> Copyright 1987-2001, Larry Wall
> Binary build 635 provided by ActiveState Corp.
> Built 15:34:21 Feb  4 2003
> 4. when you doubleclick on at the first time, you would get a
> popup window: "open with.." choose the perl.exe that you have installed
> assign the checkbox that will associate the .pl extension to perl.exe,
> way you can try out your .pl scripts from the command line.
> Apparently all the filetype associates were made by ActivePerl when I
> installed it.  If , in the command prompt window, I cd to the cgi-bin
> directory and run "", it prints the expected output.  If I open
> Windows folder, the .pl files have icons that look like little yellow
> and if I click one, it runs in an ActivePerl perl interpreter Window.  I
> all is as it should be.
> 5. if it is possible for you, try installing any of the packages into
> folders without spaces, such as c:\apache\apache2, c:\apache\perl or
> anything similar, it might cause you troubles in the future and you won't
> need to use " " when you enter folder's names.
> Is this a real problem?  If so, it seems cruel that Apache would have
> their server install into "c:/Program Files/Apache Group/Apache2" by
> default.  I don't know what scares me more, the potiental problems with
> spaces in path names or the potential problems of installing to a
> nonstandard location.  Unless you know of a blocking issue related
> to spaces in file paths, I'll live with the quotes for now.  I don't think
> that's the problem here anyway.
> All the best and good luck,
> Jeff Cohen
> Tel. (416) 917-2324
> GEJ-IT Networks!

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message