Hello people
I have a website which is placed on a Linux platform
I want to upload an EXE file to it, and I want to make this file open from the server.
This file is a network messenger server written on C#. I want to open it.
Is there anyway to do so? I heard that PHP has something that's called Program Execution.
What do you think? Is it useful? If not, do you have any solution?

Recommended Answers

All 8 Replies

By EXE (and C#) I assume that this was compiled on a Windows-based machine? If so, no. You can not run an executable compiled for one platform on another.

In general that is absolutely right. Linux (server or anything else) compiles files at run time into a file that does what it should ; Windows compiles before running and turns the file into an exe file and that then runs when ever called.

Whilst they are incomptible it might be possible to get the server to use a program called WINE which is a linux emulator for running EXE windows type programs. However the programming required to do this and also to get any return calls to go back to the server are way beyond me. But thats the theory of the problem you have.

M

Thank you for answering my question, but if my website was on a Windows-based server, how could I run an EXE program while I don't have the server? I only got my website hosted on some server, so how can I run an EXE file on it?
Thank you

Technically but you need more expertise than I can give but when I ran a windows network on a school server all you had to do was from one of the other machines click on the exe file and it ran as if from and on the terminal you were using. I do not think there is any special magic or software necessary to do this but I may be wrong. Certainly the school server I used just ran the programs as if as above.

M

Thank you, but how can I run an EXE file while I don't have access to the servers' computers? I only have a website with a control panel.
So, can I run an executable file without the need to access the servers' computers?
Thank you

If you do not have access to a physical machine then you must use the available interface to make the request that the EXE be run on your behalf. I'm not indicating that this is even an option for your given interface. I surely would not offer to run random executables on my server - who knows what one might do.

The process would look something like the following if you could do it:
- upload the binary file
- request that the binary be executed at some future time (a cron job or scheduled task)

I doubt you are going to get the above, however, much less the ability to arbitrarily execute programs by hand.

[edit]
As an aside, what is it - exactly - that you are trying to do? Do you have a linux or Windows server? What functionality are you trying to provide that the server does not already have?

Thank you
I have a messenger program written on C#. It has 2 files; the "server" and the client.
So I want to upload the "server" file and run it on the server so that all my users can use the client to connect to the server together.
Thanks

Hello,

As mjdodd mentioned, you have to get WINE or crossover installed on your server in order for the server to be able to run it. However, if you have the source code in C#, you can compile it on linux using mono, but make sure that it is not depending on windows libraries or else it will fail to compile.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.