« Previous Next »

Thread: Setting a PATH per site with FastCGI

Last post 03-16-2007 4:38 PM by wadeh. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 03-15-2007, 10:29 AM

    • mollo
    • Not Ranked
    • Joined on 03-15-2007, 2:23 PM
    • Posts 2

    Setting a PATH per site with FastCGI

    Hi,

    Thats a very good new for running Ror Apps under IIS.

    I need to run multiple Rails apps under IIS with TP2, theses apps require different Ruby version (because of some compatibilty issues with ImageMagick, Oracle and so..)

    How specify a PATH variable per IIS site handled by TP2.

     
    One app need c:\ruby\bin

    Other need c:\ruby185\bin

     Thanks.

     

     


     

  • 03-15-2007, 2:50 PM In reply to

    • SoHoAlex
    • Top 150 Contributor
    • Joined on 11-01-2006, 12:25 PM
    • Posts 47

    Re: Setting a PATH per site with FastCGI

    Why not create multiple FastCGI application directories and use a unique dll for each instance?

    For instance:

    c:\ruby\fastcgi\fcgiext.dll for c:\ruby
    c:\ruby185\fastcgi\fcgiext.dll for c:\ruby185

     

    Alex Schoenmaker, SoHosted
    Platform: Windows Server 2003 (SP2), IIS6, PHP4 and PHP5.
  • 03-16-2007, 3:28 AM In reply to

    • mollo
    • Not Ranked
    • Joined on 03-15-2007, 2:23 PM
    • Posts 2

    Re: Setting a PATH per site with FastCGI

    Yes, that's the way i've planned to have many parallel ruby installation.

    But I also need different system variables on each 'site'. for loading different extra DLL.

     

    PATH="c:\ruby\" for one and

    ORA_HOME = "aaaaa"

     

    PATH="c:\ruby185\ for second and

    ORA_HOME= "bbbbb"

     

     

  • 03-16-2007, 4:38 PM In reply to

    • wadeh
    • Top 50 Contributor
    • Joined on 04-19-2005, 10:17 PM
    • Posts 112

    Re: Setting a PATH per site with FastCGI

    When you say "system variables", do you mean system environment variables?

    If so, the FastCGI processes will inherit the environment variables from the worker process in which they are launched.  IIS 6 does not have any built-in facility to provide custom environment variables for worker processes.  It is pretty trivial, though, to write an ISAPI filter that can do this job.  If this is what you need, then let me know and I can set you up with some sample code to do it.

    Also, I should note that IIS 7 does have a built-in facility for doing this.  Specifically, IIS 7 can load the user profile into worker processes.  Thus, different app pools can use different user identities, each getting their own set of environment variables.

    Finally, I was just talking to Rick about the issue, and he pointed out that this variable applies to a database, and your script could easily set ORA_HOME at any time before loading the database

    Thanks,

    -Wade

Page 1 of 1 (4 items)
Microsoft Communities