How to execute binary script?

Hello,

I have a binary script, written on C.
It reads input from stdin and writes output to
stdout. I’ve uploaded it to my host and set attrinutes to 755.
Now I want to call my script using URL:
http://mydomain.com/script?prm1=x&prm2=y
But instead of executing the script browser just show me contents of the script file.

How to solve this problem?

You are aware that C needs to be compiled and you “run” the compiled program, right?

Wholly - Use promo code WhollyMindless for full 97$ credit until 12/11/07.

Yes, of course I have a compiled binary file.
I used this file on another hosting. It was enough to upload the file and set attributes to 755 to make it executable.

It sounds like a mime-type issue. Have you tried naming the file “script.cgi”, and changing your url to “http://mydomain.com/script,cgi?prm1=x&prm2=y” ?

–rlparker

Could you show us how you’re trying to call the binary? Is there any chance your old host was not on a linux system? Maybe BSD?

Wholly - Use promo code WhollyMindless for discount.

Thank you! That solved the problem!

You are most welcome, and I am really glad you have it sorted now! :slight_smile:

–rlparker

Good to hear!

Wholly - Use promo code WhollyMindless for discount.