How do I get a windows .exe script to work on my account?

  • Answered
I just transferred my simple site to inmotion. I was previously on a Windows server and had one cgi program. It was a Windows .exe and was written in C++. When it was uploaded to the cgi-bin folder on the Windows server it worked fine when an html link pointed to the .exe in the cgi-bin folder.

When I transferred to inmotion I was under the impression that Windows/Linux/Mac OS would all work but I learned that this only applies to the client machines. I found my Windows cgi .exe wouldn't work because inmotion's servers are Linux and cannot natively execute a Windows .exe.

Therefore I compiled my cgi program in Linux-Ubuntu g++ and uploaded to the cgi-bin folder and it still doesn't seem to work.

I believe that cgi can be written in most any language. It seems the most common language for cgi is Perl and it seems most hosts are geared to support Perl. I had a similar problem with my previous host on the Windows server. Initially my C++ .exe wouldn't run because they were expecting something in Perl but eventually they were able to get it to work for me.

Anyway hopefully my Linux compiled version of my cgi program will somehow work here.
Tim S.
Hi keith_,

Thanks for posting your question. I'm more than happy to assist you today. To make sure Apache can recognize the scripts as usable you'll want make sure they process their input using STDIN/ STDOUT and make sure the shebang line of your script is set to correctly.

To make sure the server parses the file correctly, you have to make sure you've properly configured the Apache handlers for your account. This can be done using the "Apache Handlers" option in cPanel or through your htaccess file.

If you need further assistance please feel free to contact us.


Tim S