[wplug] CGI + C ?

Brian Sammon wplug-list at brisammon.fastmail.fm
Wed May 11 21:01:02 EDT 2005


> We are allowed to run CGI scripts (Perl, PHP, etc.) but they must be
> end in .cgi suffix and they must be `chmod +x` and the path to
> executable should be at the top: `#!/bin/perl` etc..
> 
> I tested this with Perl and PHP and it is working fine but I've run
> into a snag trying to run compiled C programs. Is it possible to make
> a SH script `#!/bin/sh` that calls the C program? Or way to do this in
> a perl script?

I don't think this is necessary.
If you name the C program with a .cgi extension and "chmod +x" it, it should 
work.  Another thing that might help is to try using a statically linked
binary.
If the server is using "real" CGI (mod_perl may not qualify), any kind of 
executable file should work.





More information about the wplug mailing list