Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] LD_LIBRARY_PATH environment problem

Expand Messages
  • Mike Dillinger
    Original Message: From: Jeff Eggen Date: Thursday August 01 2002 08:33AM PT JE Hi all, JE I have a cgi script that calls a
    Message 1 of 3 , Aug 1, 2002
    • 0 Attachment
      Original Message: From: Jeff Eggen <perl-beginner@yahoogroups.com> Date:
      Thursday August 01 2002 08:33AM PT

      JE> Hi all,

      JE> I have a cgi script that calls a module which uses Sybase::CTlib.
      JE> Unfortunately, the script doesn't load Sybase::CTlib properly unless I
      JE> have the directory /usr/local/lib in the user running the script's
      JE> LD_LIBRARY_PATH contents. I tried setting the LD_LIBRARY_PATH
      JE> environment variable in a BEGIN block in my module, but it had no
      JE> effect. My webserver runs as user nobody, plus it won't source setup
      JE> files so I can't set it for the user globally.

      JE> What other ways are there to set the environment variables before the
      JE> script tries loading modules?

      Hi Jeff,

      Why don't you just add to their shell rc file?

      -MikeD
    • Jeff Eggen
      JE effect. My webserver runs as user nobody, plus it won t source setup JE files so I can t set it for the user globally. ... Sorry, I guess I should have
      Message 2 of 3 , Aug 6, 2002
      • 0 Attachment
        JE> effect. My webserver runs as user nobody, plus it won't source setup
        JE> files so I can't set it for the user globally.

        >Hi Jeff,

        >Why don't you just add to their shell rc file?

        Sorry, I guess I should have explained that sentence of mine above a little better. I can't just add it to the shell rc file because:

        1. User nobody on a unix system has no shell. As he has no shell, he has no shell rc files. Changing this presents security issues.
        2. Even if he did have a shell, the userid is being used in a context that doesn't take rc files into account, as there's no shell attached to the webserver. The init process, like cron, doesn't take environment into account when running scripts / programs.

        So, now you can see the bind I'm in. Well, make that 'was in', as this morning everything seems to be working fine!! I must have a hidden gremlin in the system (read: someone who doesn't believe in change control).

        Thanks for your help, though, and sorry to waste your time.

        Jeff Eggen
        IT Programmer Analyst
        Saskatchewan Government Insurance
        Ph (306) 751-1795
        email jeggen@...
        "The best way to accelerate a Win9x machine is at 9.81m/s2."
      Your message has been successfully submitted and would be delivered to recipients shortly.