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


keith_
Asked:
2012-01-08 12:11 am EST

Hits: 7,001
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.

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

Tim S.
Staff
6,907 Points
2012-01-09 10:35 am EST
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.

Thanks!

Tim S

You must login before you can post a comment about this answer.

Like this Question?
Write New!
Do you want to publish a tutorial to our support center?

News / Announcements

SSL Certficate Warnings
Updated 2014-04-14 11:34 am EST
Hits: 2229
Heartbleed 0-day OpenSSL security bug
Updated 2014-04-14 04:43 pm EST
Hits: 5653

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!