.cgi and .pl files open a "file save" dialog box

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

.cgi and .pl files open a "file save" dialog box

Postby jwzumwalt » 15. January 2009 08:45

I followed the instructions carefully given in other posts on how to set up a cgi-bin directory. When I attempt to execute a .cgi or .pl file I get a ms windows dialog box asking if I want to save or open it.
Thanks for the help - jz
jwzumwalt
 
Posts: 4
Joined: 15. January 2009 08:32

Re: .cgi and .pl files open a "file save" dialog box

Postby Izzy » 15. January 2009 08:50

jwzumwalt wrote:I followed the instructions carefully given in other posts on how to set up a cgi-bin directory
Mind tellings me what you did exactly to set up a cgi-bin directory as I can't see what you mean and therefore have no idea how to help you?

Also how are you trying to access this mystery directory in your browser - what url?

Where is this directory located in the xampp installation tree?

Is Apache running and how do you know?

Any clues in the xampp\apache\logs\error.log file

Etc. etc.

Remember we can only see what you relay to us that which you can see.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: .cgi and .pl files open a "file save" dialog box

Postby jwzumwalt » 15. January 2009 09:25

1) apache eror message [Thu Jan 15 00:21:12 2009] [error] [client 127.0.0.1] attempt to invoke directory as script: C:/xampp/htdocs/cgi-bin/

2) here is the result http://www.neatinfo.com/temp/pic1.png

3) here is my apache config file http://www.neatinfo.com/temp/httpd.conf

thanks for the quick reply!
jwzumwalt
 
Posts: 4
Joined: 15. January 2009 08:32

Re: .cgi and .pl files open a "file save" dialog box

Postby Izzy » 15. January 2009 09:47

EDIT - (Everything looks in order in the images).
There are issues with the httpd.conf file pointed out in a later post.

Try http://127.0.0.1/cgi-bin/printenv.pl

Can you see the XAMPP Welcome page by going to http://localhost

Also open the file in the text editor and check the first line (shebang) contains the correct path to the perl.exe file.

Mine looks like this:
#!"C:\xampp\perl\bin\perl.exe"

I have just tested on a 1.7.0 vanilla install on XP and printenv.pl displays the Environment Variables just fine.

Are you on Vista?
Last edited by Izzy on 15. January 2009 10:31, edited 2 times in total.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: .cgi and .pl files open a "file save" dialog box

Postby Wiedmann » 15. January 2009 09:49

I followed the instructions carefully given in other posts

What have you done exactly?

BTW:
to set up a cgi-bin directory

"cgi-bin" is ready to use in a default XAMPP installation and accessing "printenv.pl" should work out of the box.
--> No need to configure anything.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Re: .cgi and .pl files open a "file save" dialog box

Postby jwzumwalt » 15. January 2009 09:51

1) I just switched from WAMP to XAMPP today. And loaded the default XAMPP twice - it did this from the very start so I tried to manually configure the httpd.conf file.

2) Thanks for looking at it... It seems like the MS command prompt file association is somehow overriding the Apache server trying to do its thing!!! I looked at my envirionment varibales but could not see anything out of place.
jwzumwalt
 
Posts: 4
Joined: 15. January 2009 08:32

Re: .cgi and .pl files open a "file save" dialog box

Postby Izzy » 15. January 2009 10:00

Izzy wrote:Mind telling me what you did exactly to set up a cgi-bin directory...?
Mind answering this please as it has now been asked 2 times?

This in your httpd.conf file is not the default:
<Directory "C:/xampp/htdocs/cgi-bin">
AllowOverride All
Options Indexes FollowSymLinks ExecCGI
Order allow,deny
Allow from all
</Directory>

The default looks like this:
<Directory "C:/xampp/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>

This line then is also not the default:
ScriptAlias /cgi-bin/ "C:/xampp/htdocs/cgi-bin/"

The default is:
ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/"

Also this is not in the default httpd.conf file:
Include conf/extra/perl.conf
Did you install the perl addon?

Try reverting all your changes to the install defaults as the file you are trying to access will work on a default XAMPP installation.

Always make a backup of any conf or ini file before editing then you can always revert if necessary.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Problem Solved

Postby jwzumwalt » 15. January 2009 10:43

Problem Solved
I decided to look at MS file explorer associations and both .cgi and .pl had a "run" association for "Perl.exe" When I deleted the run association it started to work! SO for some reason I am unable to have a DOS box file association live happily with XAMPP Apache. One of the reasons that I decided to try XAMPP today instead of WAMP is I had had perl problems with WAMP too :(
jwzumwalt
 
Posts: 4
Joined: 15. January 2009 08:32

Re: .cgi and .pl files open a "file save" dialog box

Postby Izzy » 15. January 2009 10:49

Thanks for posting back with your solution.

IMHO most of your issues with XAMPP have been caused by wamp which more than likely has changed things in the registry and in the paths which have not been cleared when uninstalling it.

From the readme_en.txt file in the xampp folder.
Note: XAMPP makes no entries in the windows registry and no settings for the system variables.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Re: .cgi and .pl files open a "file save" dialog box

Postby OLDo » 12. February 2009 19:44

Had the same problem after removing WAMP (having tried to integrate ActivePerl, unsuccessfully).

The solution was to search the registry for perl.exe, and delete any entries, especially those with relation to wamp. Hope this helps someone. :)
OLDo
 
Posts: 1
Joined: 06. October 2005 12:53


Return to XAMPP for Windows

Who is online

Users browsing this forum: tysonzach and 149 guests