RE: [PHP] Infinate looping

From: Date: Sun, 19 Sep 2004 19:04:42 +0000
Subject: RE: [PHP] Infinate looping
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-197215@lists.php.net to get a copy of this message
> i haven't paid a lot of attention to your setup. are you running this > through your web server or via the php-cli? Basically I have a file that connects to a database, before the loop, and then checks the database for new messages. If there are, it displays them accordingly > if via php through the > web server i suspect you're running into a "maxclients" problem (your > client connections aren't closing fast enough so you're using up all > the client connections). I was thinking this could be the case. Is there any way not to use up maxclients? I'm just running one loop, though it may be infinite. > if you're running this through your web server, a much more efficient > approach would be via a php-cli or perl application. either of these > should be able to run as continuous tasks without causing other > problems. I would run through command line but I'm not sure how. This is a chat script anyway, and I'm not sure if I have command line abilities on my production server. Also, I was thinking of maybe using a socket server. Are socket servers allowed by mainstream web hosts or do you need certain privileges to open a socket and connect to them? Thanks, Stephen Craton

« previous php.general (#197215) next »