httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Cohen" <supp...@gej-it.com>
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
have:
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
be
> like: #!c:\perl\bin\perl.exe)
> 
> Yes.  printenv.pl is unmodified as I downloaded it from apache.org.
> The shebang line is
> 
> #!c:/Perl/bin/Perl.exe
> 
> this points to the ActivePerl Perl.exe.  The script produces the correct
output
> 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/printenv.pl 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 "printenv.pl" to my disk.  When I do so, the saved
> file contains the expected output of the "printenv.pl" CGI script, minus
> the first six lines (including the Content-type line, a blank line, and
four
> 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. http://www.ActiveState.com
> Built 15:34:21 Feb  4 2003
> 
> 4. when you doubleclick on printenv.pl at the first time, you would get a
> popup window: "open with.." choose the perl.exe that you have installed
and
> assign the checkbox that will associate the .pl extension to perl.exe,
that
> 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 "printenv.pl", it prints the expected output.  If I open
a
> Windows folder, the .pl files have icons that look like little yellow
pearls,
> and if I click one, it runs in an ActivePerl perl interpreter Window.  I
think
> 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
> Supoprt@GEJ-IT.com
> Tel. (416) 917-2324
> www.GEJ-IT.com
> GEJ-IT Networks!


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message