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

Go Back   LiteSpeed Support Forums > External Applications > PHP > spawning multiple php-instances listening on tcp/ip ?

Reply
 
Thread Tools Display Modes
  #1  
Old 05-04-2006, 11:17 AM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
Default spawning multiple php-instances listening on tcp/ip ?

Hi there,

are there some nice and simple command-line options to let litespeed start multiple php-fcgi instances (those are different versions) listening on different ports (needed for multi-server usage) instead of using a socket?

I'm currently using spawn-fcgi but that install takes only one php instance either. I might try to experiment with it further if there's no option in lsws to do this ... just wanted to try this route first .


thanks,

thomas
Reply With Quote
  #2  
Old 05-04-2006, 12:17 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
You can let fcgi application started by LSWS using tcp instead of unix socket. but LSWS only start them on demand, so it may not be a good choice for pure fcgi spawner. :-)

Actually, php-fcgi itself has an option "-b" to bind to an address. It hasnot be implemented in earlier release, but seems now it is.
Reply With Quote
  #3  
Old 05-04-2006, 12:23 PM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
hmm, good point mistwang.
any good pointers for some standalone fcgi-spawner?
I want the two servers being able to use each others php-processes as they will work in a failover environment.
Reply With Quote
  #4  
Old 05-04-2006, 12:28 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Only other standalone fcgi-spawner I know of is the "cgi-fcgi" from FCGI SDK. ;-) May not be anything better than fcgi-spawner.

Maybe I can add an option to let LSWS start FCGI at server startup. :-)
Reply With Quote
  #5  
Old 05-04-2006, 12:30 PM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
> Maybe I can add an option to let LSWS start FCGI at server startup.

yeah, that would be very cool no need for external spawners anymore.
Reply With Quote
  #6  
Old 05-08-2006, 01:28 AM
xing xing is offline
LiteSpeed Staff
 
Join Date: Oct 2003
Location: Los Angeles, California
Posts: 380
Release 2.1.15 now has this feature. You can now optionally set configured external applications to start on server start-up versus on-demand. Enjoy.
Reply With Quote
  #7  
Old 05-08-2006, 02:10 AM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
thanks, I'll try it out ASAP.

just another question:
with spawn-fcgi I have that option in the config:
Code:
## IP adresses where PHP should access server connections
## from
FCGI_WEB_SERVER_ADDRS="127.0.0.1,192.168.0.1"
Is that a simple ENV-variable which is used from php if given or is that something unique to spawn-fcgi?

I think the web is really lacking some description of the php fastcgi setup without using some predefined stuff .
Reply With Quote
  #8  
Old 05-08-2006, 03:38 AM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
just for the record: it seems like those ENV-variables are in the specs.
I found this
http://www.fastcgi.com/devkit/doc/fcgi-spec.html#S2.3
on the fastcgi.com site.
Reply With Quote
  #9  
Old 05-08-2006, 10:02 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Thanks for the information. It may not work well when you need to start multiple instances binding to the same address, may got address is already in use error.
Reply With Quote
  #10  
Old 05-08-2006, 10:05 AM
ts77 ts77 is offline
Senior Member
 
Join Date: Nov 2004
Posts: 288
nah, it works fine. just need to use a different port .
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
replacing system php felosi PHP 3 07-16-2007 11:23 PM
setup php in rails template cswilliams Install/Configuration 2 01-25-2007 08:21 AM
Best configuration for PHP LiteSpeed SAPI jeff Install/Configuration 6 10-19-2005 09:54 AM
php lsapi instances suncare Install/Configuration 1 07-07-2005 07:15 AM


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



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