Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: browser tries to download one .exe, other .exe runs OK |
|
Author |
|
DocDJ
Joined: 11 Oct 2009 Posts: 18
|
Posted: Wed 29 Sep '10 22:21 Post subject: browser tries to download one .exe, other .exe runs OK |
|
|
{previously posted as a reply to similar topic in coding & scripting corner, but no replies - getting desparate}
I have 2 windows .exe files in the same folder on my 2 servers. For several years, they both worked. Now ONE of the .EXE's tries to download onto the user's machine. I am running Apache 2.2.16 & Windows 7-64 on 1 machine & Apache 2.2.15 & Win 7-32 on the other (both have the problem). Server .conf files are identical, except for folder names (since the 32-bit machine is on a domain). No errors in the logs (return code 200 on my Form POST request). Permissions for the 2 files are identical. Programs use the SAME DLLs, both written in C++ (without any objects).
After searching the literature and finding no help, I recompiled the failing program (MS VC 2008) and it still fails. The other one still runs properly. Here is my http.conf entry:
<Directory "E:/DJs Documents/public_html/cgi-bin">
AllowOverride
Options FollowSymLinks Includes ExecCGI
IndexIgnore ..
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
and I have:
ScriptAlias /cgi-bin/ "E:/DJs Documents/public_html/cgi-bin/"
Any suggestions greatly appreciated.
DJ |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 30 Sep '10 10:19 Post subject: |
|
|
Do you send a header in both files? |
|
Back to top |
|
DocDJ
Joined: 11 Oct 2009 Posts: 18
|
Posted: Thu 30 Sep '10 17:31 Post subject: browser tries to download .exe instead of running as CGI |
|
|
Yes, I send the "content-type" line in both. I did some further investigation and turned internal debug in the program. It is failing in trying to open a file for read+write (mode "a+"). The file does not exist, so must be created & I get errno=13 (defined as EACCES). The error slso shows up in the windows application logs in the Event Viewer. It appears that Windows 7 server apps trying to write files on the server, require some additional permissions, but I haven't figured out where/how to set them.
Any tips greatly appreciated. |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Thu 30 Sep '10 20:56 Post subject: |
|
|
It would be great to have the source code to reproduce that. |
|
Back to top |
|
|
|
|
|
|