Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 16, 2012, 05:54:42 PM

Pages: [1]   Go Down
  Print  
Author Topic: C executable  (Read 2718 times)
davbeck
Trekkie
**
Offline Offline

Posts: 12


WWW
« on: June 26, 2010, 03:12:44 PM »

Is it possible to launch a c executable with the shared hosting? Not necessarily as a CGI but from a PHP script.
Logged

MrPhil
Senior Moderator
Berserker Poster
*****
Offline Offline

Posts: 5191



« Reply #1 on: June 26, 2010, 05:17:20 PM »

It would have to be compiled and linked with a compiler and library compatible with whatever LP is running for the operating system (some version of CentOS, I think). As compilers and linkers are not installed (or at least, are not available to the common rabble) on shared systems, you would have to set up a clone of your server in order to compile and link.

I would presume that the servers are x86 architecture, but even if you statically linked your module (no shared libraries) I don't know what kind of executable formats (a.out, elf, etc.) would work. I recall several years ago this subject was hashed over quite thoroughly -- if you haven't done so already, a trip down Memory Lane with the search function is in order.

Is there some critical reason that this has to be written in C? If it's so big that CPU load is critical, you'll probably get in trouble anyway for overloading the server. In that case, you may want to talk to LP about VPS and dedicated plans. If what you have is C source for something, consider translating it into Perl or PHP (PHP is quite close to C in syntax). It will run a bit slower than a compiled C executable, but you don't have to go through all the hassle of creating a system to compile and link on.
« Last Edit: July 31, 2010, 05:06:50 PM by MrPhil » Logged

Visit My Site

E-mail Me
  
-= From the ashes shall rise a sooty tern =-
Pages: [1]   Go Up
  Print  
 
Jump to: