it's a little complicated. :-) I have a website written in PHP that should call an external program written in .NET running under Mono. It calls the program with:
/path/mono /path/executable arguments...
as usual (I also tried putting this in a bash script and calling the script itself from PHP).
As far as I can tell, everything is set up as needed. Mono is working fine, the executable (or script) with the rights of the executable, the owners are fine. The correct configuration can also be established from the fact that if I issue the command line above (or call the script) from the command line on the server (Debian Lenny), everything works fine, my executable executes without errors.
But if PHP calls the same thing (using exec (), system () or any other option), I immediately get the exit code from 6 from Mono, and my executable does not start at all (to check it, I use the "Hello" executable World ", which does nothing but emits a single output string and returns 0). Compiled without any additional dependency, just the real "Hello Word". He is absolutely sure that this program will not return exit code 6, it should be from Mono, but I could not find it anywhere in the documents.
I can call anything else from PHP, so this is not safe mode or any similar restriction that prevents me from running external programs from PHP.
Thanks for any idea ...
Peter source share