Here's the gist ... when I run some code which looks like ...
my result = `/usr/local/bin/matlab input_file.m`;
... from a perl CGI, then matlab (a commercial math package)
segfaults. However, when I run it from mod_perl on the same server it
runs fine (it runs fine from the command line, btw).
Sounds like a dynamic lib problem. W/o knowing your OS its hard
to say what variable Apache is setting but try looking at one of
these SHLIB_PATH,LD_LIBRARY_PATH.
For anyone who may have Matlab available, btw, this is only with
Matlab 6. Matlab 5 (which we no longer have a license for) works just
fine.
Yup, I suspect Matlab 6 requires a newer shared library of some sort.
Cheers,
Tom Murphy