Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Do hosting providers allow you to execute C++ code on their web-servers? I have a C++ algorithm that is used for converting file types and I want users to be able to upload their files to my website to get put through my algorithm. So far I haven't worked out how to execute C++ code on a webhost though? I can execute scripts and .Net assemblies and that's about all I can find. The algorithm is not platform dependent so it can be compiled to .exe or a.out. It's no big deal for me to rewrite the algorithm in C# or php (if I really have to ) but it would take quite a while so if prefer to keep it in C++.

share|improve this question

closed as too localized by Sven, MDMarra, Iain, Ben Pilbrow, Zoredache Nov 19 '11 at 18:47

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

It's unclear from your question exactly where the problem is. Have you tried uploading your compiled binary to the server but can't execute it? Are you having trouble uploading it? Are you having troubles compiling it locally? Have you uploaded the source code to the webserver but are having trouble compiling it there? Please edit your question to include what you have tried already and exactly where you got stuck. –  Ladadadada Nov 19 '11 at 15:29
Execute C++ code? Easy, compile it into an executable for that particular operating system. C++ is not javascript, php or perl; in other words, not a scripted language. –  Fiasco Labs Nov 19 '11 at 18:41
How are the uploading? –  Zoredache Nov 19 '11 at 18:48
@Ladadadada My Question was not unclear at all and was satisfactorily answered by others who don't have trouble reading. Thanks. –  Sebastian Nov 21 '11 at 6:55

2 Answers 2

up vote 0 down vote accepted
  1. Conceptual clarification: C and C++ are compiled languages. There is no such thing as a web host that allows you to execute C++ code directly; however, there are countless hosting/VPS providers that will allow you to set up a development environment, compile your code, and execute binaries.

  2. Answer: Who will let you compile and execute binaries on your web server? Any VPS or cloud server instance that includes root access certainly will enable you to install a compiler and whatever libraries you need, compile your code, and execute it. Additionally, a few shared hosting providers (e.g. Pair Networks and Liquid Web) offer a standard Unix development environment on shared hosting accounts without root access.

share|improve this answer
-1 for you first point. A large number of hosts supoort CGI. CGI can is just any arbitrary executeable. –  Zoredache Nov 19 '11 at 18:45
@Zoredache ..and C++ code is not executable until it's compiled. Shared hosting environments do not always allow customers to login via ssh and compile their own code. It may be possible to cross-compile a binary for a shared hosting environment that doesn't provide dev tools, but... why not just do it correctly? –  Skyhawk Nov 19 '11 at 19:04
Thanks a lot Miles. Everything I needed. Don't know what all these other people are complaining about. –  Sebastian Nov 21 '11 at 6:57

Some do, some don't. Depends. If in doubt, ask the provider.

share|improve this answer
Can you give an example of one that does? –  Sebastian Nov 19 '11 at 15:09
No. I don't know this market. –  Sven Nov 19 '11 at 15:17
Your answer is totally worthless then. –  Sebastian Nov 19 '11 at 15:20
You asked: "Do hosting providers allow you to execute C++ code...?". I told you that some do and some don't and you have to ask the provider in question. That's exactly answering your question, which is off topic anyway. –  Sven Nov 19 '11 at 15:23
@epic we don't do shopping recommendations here. Read the faq. It's rude to join a community, not read the ground rules, and then insult their members. –  MDMarra Nov 19 '11 at 15:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.