RE: crazy problem

2003-01-17 Thread Tom Murphy

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



Re: crazy problem

2003-01-17 Thread Perrin Harkins
Ray Zimmerman wrote:

I have a bizarre problem and I've run out of ideas ...

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

Something is different.  Environment variables, PATH, user, current 
directory, etc.  You have to go through all of them until you find the 
one that's the problem.  Depending on how your server is set up, CGI 
could be executing as a different user.

- Perrin