Access to environmental vars to PHP - Setup

This is a discussion on Access to environmental vars to PHP - Setup ; I would like to run a script at startup. I read and figured out that it can be done using chkconfig and setting the proper runlevel. The problem I have currently is that I depend on system environmental variables being ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Access to environmental vars to PHP

  1. Access to environmental vars to PHP

    I would like to run a script at startup. I read and figured out that
    it can be done using chkconfig and setting the proper runlevel. The
    problem I have currently is that I depend on system environmental
    variables being available for PHP. I am using PHP as a scripting
    language (nothing to do with the web), and this PHP script is called
    at the end of runlevel 3, from an intermediate script, but it cannot
    retrieve any environmental vars at this point.

    Would you know when are environmental vars set and at which runlevel?

    Thanks,

    Slawek


  2. Re: Access to environmental vars to PHP

    On 8 Feb 2007 07:57:44 -0800, Slawek wrote:
    > I would like to run a script at startup. I read and figured out that
    > it can be done using chkconfig and setting the proper runlevel. The
    > problem I have currently is that I depend on system environmental
    > variables being available for PHP. I am using PHP as a scripting
    > language (nothing to do with the web), and this PHP script is called
    > at the end of runlevel 3, from an intermediate script, but it cannot
    > retrieve any environmental vars at this point.
    >
    > Would you know when are environmental vars set and at which runlevel?


    I'll recommend your script source the file(s) which sets those
    environmental vars you need to have.

  3. Re: Access to environmental vars to PHP

    Slawek wrote:

    > I would like to run a script at startup. I read and figured out that
    > it can be done using chkconfig and setting the proper runlevel. The
    > problem I have currently is that I depend on system environmental
    > variables being available for PHP. I am using PHP as a scripting
    > language (nothing to do with the web), and this PHP script is called
    > at the end of runlevel 3, from an intermediate script, but it cannot
    > retrieve any environmental vars at this point.
    >
    > Would you know when are environmental vars set and at which runlevel?


    Yes.


    --
    Dancin in the ruins tonight
    Tayo'y Mga Pinoy

+ Reply to Thread