LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > PHP > PHP 4.4.2 lsapi and SetEnv equivalent

Reply
 
Thread Tools Display Modes
  #1  
Old 04-04-2006, 06:44 AM
ukmattlaw ukmattlaw is offline
New Member
 
Join Date: Apr 2006
Posts: 7
Default PHP 4.4.2 lsapi and SetEnv equivalent

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.
Reply With Quote
  #2  
Old 04-04-2006, 10:08 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
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.
Reply With Quote
  #3  
Old 04-04-2006, 12:34 PM
ukmattlaw ukmattlaw is offline
New Member
 
Join Date: Apr 2006
Posts: 7
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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 01:50 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.