My goal: Writing some C#-code, compile it, and run it at the target server (Apache Web Server, OS: Debian GNU/Linux 32bit) using PHP-command passthru("newfile",...).
Now: Based on the advice I got here I did compile my C#-code with Mono and did create a 32bit Linux-executable file (on my Ubuntu 11.10 32bit system) using
mkbundle -o newfile oldfile.exe --static
However, when calling this newfile via PHP it doesn't give the expected return value "Hello World", but the number 1.
Questions: Am I using mkbundle wrongly? How can I find out where the problem lies?
Additional info: Writing file newfile on the target system gives
newfile: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
My C#-code is a simple Hello-World program printing Hello World into the console. The PhP command I use is <?php passthru("./newfile", $temp); echo "$temp"; ?>
The return value I get from this PhP-file is simply 1. The Apache log files show no error.