[wplug] CGI + C ?

Rob Prowel tempest766 at yahoo.com
Wed May 11 21:31:50 EDT 2005



Brian Sammon <wplug-list at brisammon.fastmail.fm> wrote:

> 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.


and many webserver configurations will require that your cgi scripts/executables reside in a specific directory such as ${something)/cgi-local

good point about static binaries...better to statically link unless you have real control over the configuration of the server machine.

 

		
---------------------------------
Yahoo! Mail Mobile
 Take Yahoo! Mail with you! Check email on your mobile phone.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.wplug.org/pipermail/wplug/attachments/20050511/8ebadb59/attachment.html


More information about the wplug mailing list