Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.mixmin.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "J.O. Aho" Newsgroups: comp.lang.php Subject: Re: Do I still CLI version of PHP Date: Sun, 19 Feb 2012 10:05:44 +0100 Lines: 18 Message-ID: <9qbsb8FpmvU1@mid.individual.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net cydafri/meQ2L9eLS+Y+agjusKDB9AodhRrHIUvQ2Z+JRDZQSJ Cancel-Lock: sha1:sfrLEcFiji6P1WvedI8j0tmlvf4= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120217 Firefox/10.0.1 SeaMonkey/2.7.1 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.php:4899 sl@exabyte wrote: > 1. Do still need the line '#!/usr/local/bin/php -q' is I call the file via > http, eg http://domain/server_socket.php, because the program is looping ? No, as the web service will be calling the php interpreter, but as soon as you leave the "page" with your browser the script will die. > 2. If the answer to Q1is yes, how do I run my server program (I think the > version on my server is CGI) ? You need to have shell access and run the script in background or in a screen (or rewrite it so it can be run as a daemon). -- //Aho