views:

23

answers:

2

I've been currently using PHP on Apache (on Ubuntu) to do dynamic server-side stuff, but is it possible to run a compiled C program as the intermediary? If so, how? I know it's probably not that useful anyway, but I'm curious.

+2  A: 

You can use CGI with any language, here's an example for C. CGI is slow and not very flexible though, so you should avoid it. If you really need to write a web application in C, try something more robust like OKWS.

That said, writing a web application in C has very little advantages for most cases. Consider it only if your application is CPU bound.

amro
Thanks, that's exactly what I need.
Delan Azabani
A: 

You could use any of PHP's system, exec or shell_exec to run a script from php

Ben