in reply to Calling "lyx -e latex" from perl CGI-script

One possible problem is that CGI scripts often start with a different environment than a user. Even after an su, you might not have the right environment.

I would look to see what $ENV{PATH} is, and see if lyx is in the appropriate path.

Also look in your server's error log and see if you have a useful debugging message there.

  • Comment on Re: Calling "lyx -e latex" from perl CGI-script

Replies are listed 'Best First'.
Re: Re: Calling "lyx -e latex" from perl CGI-script
by bgp (Initiate) on Jul 07, 2003 at 12:30 UTC

    I had set $ENV{PATH} in one of the versions of the stripped down script, because I had tried setting the script to setuid root (to see if it was a permissions issue), which forced it into taint mode, which required a manually-set PATH to allow a system call. I had set $ENV{PATH} to include the same directories as are in root's or the apache user's PATH, both of which can successfully call the script (without the PATH line) from the command line. So I don't think it is a PATH issue, but it's a good try.

    Cheers,

    Bruno

      $ENV{PATH} is but one possible environment problem problem. Study %ENV for any differences and see if eliminating them makes the problem go away. For instance LD_LIBRARY_PATH controls finding dynamically loaded libraries on several versions of Unix - that can definitely affect whether lyx can run. It might also want to talk to an X server, which means that things like DISPLAY might be needed. And so on.

      Also you don't say whether or not you looked in your server's error logs. If you haven't done so then replying to people here and getting further rounds of guesses is pretty pointless. We can think of a million things that could go wrong. The server's error logs give you feedback on what is wrong.