How to execute binary script?

How to execute binary script?

Posted by: Dimaz
Posted on: 2007-12-12 01:03:00

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?


Re: How to execute binary script?

Posted by: wholly
Posted on: 2007-12-12 04:57:00

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.

Re: How to execute binary script?

Posted by: Dimaz
Posted on: 2007-12-12 06:04:00

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.Edited by Dimaz on 12/12/07 06:12 AM (server time).

Re: How to execute binary script?

Posted by: rlparker
Posted on: 2007-12-12 07:53:00

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

Re: How to execute binary script?

Posted by: wholly
Posted on: 2007-12-12 18:21:00

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.

Re: How to execute binary script?

Posted by: Dimaz
Posted on: 2007-12-12 23:59:00

Thank you! That solved the problem!

Re: How to execute binary script?

Posted by: rlparker
Posted on: 2007-12-13 00:01:00

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

--rlparker

Re: How to execute binary script?

Posted by: wholly
Posted on: 2007-12-13 07:04:00

Good to hear!

Wholly - Use promo code WhollyMindless for discount.

Tags: stdin