PHP 4.4.2 lsapi and SetEnv equivalent

Discussion in 'PHP' started by ukmattlaw, Apr 4, 2006.

  1. ukmattlaw

    ukmattlaw New Member

    Hi,

    I am testing out litespeed on our server. We have installed lsws-2.1.12 with php 4.4.2 and all appears to be working OK.
    However, we have a site which was running on apache 2 and stores it's config in the vhost section in apache's httpd.conf. These are lines like:

    SetEnv SITE_ROOT /home/vhosts/my_site
    SetEnv DB_HOST localhost

    I tried adding these to the apache style configurations section for the vhost but the PHP scripts don't seem to see them in the $_SERVER or $_ENV arrays.

    How do I make this all work?

    Thanks,

    Matt.
  2. mistwang

    mistwang LiteSpeed Staff

    You can use a rewrite rule to set those environment variables.
    Or, create a dedicated lsphp external application for that vhost, then add environment there.
  3. ukmattlaw

    ukmattlaw New Member

    Thanks,

    I just noticed that the global server instance uses an lsphp 'external application' config, so I copied that verbatim and added my environment variables and it seems to work fine.

    I am not sure if those settings are OK for this particular vhost (it will get around 2000 hits/day if it goes live with lsws) but I am sure to find out!

    Thanks for your help :D

Share This Page