Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51556 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2503 invoked from network); 3 Mar 2011 09:13:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Mar 2011 09:13:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=keisial@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=keisial@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: keisial@gmail.com X-Host-Fingerprint: 209.85.161.42 mail-fx0-f42.google.com Received: from [209.85.161.42] ([209.85.161.42:64246] helo=mail-fx0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/E0-30734-D9B5F6D4 for ; Thu, 03 Mar 2011 04:13:01 -0500 Received: by fxm20 with SMTP id 20so851686fxm.29 for ; Thu, 03 Mar 2011 01:12:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=cn1s2u8atgzYROZTG1wAxmX/+I7N4isOW4zCTRKNE1M=; b=GaZvJQ14ShDtDNOvrFoJfHEGzqpMtd6udcUBMP/LsxFo+ud8XliP9LcFAMxGFxybXf XuXXkK786usjmQlP1yLgXsg8ueu2Q2ek6Nppypa/lB8JAsc4jU5BsfJiO0RSx0TUrf4l LC+EPh56+dDXgNC2REiZoOOk9gaoNXrHBcK0Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=MkJ70rcPhgv0H7/stIMZ1snV4rMqK07J7wIjP90oBfC9SZvVJYwpzmCD2MuUTb9TP8 Pm9Q5yUxOQRH3QivjGAgxmfCm+3/w37lFnMjdv3CGP6d1EDQYLtbwbzNYvkFcPuGjQtP utsLBMqbyglks5kPKJ1zRsvpJdEvqLy2Gjt0o= Received: by 10.223.103.5 with SMTP id i5mr1226695fao.38.1299143560412; Thu, 03 Mar 2011 01:12:40 -0800 (PST) Received: from [192.168.1.26] ([80.28.69.129]) by mx.google.com with ESMTPS id n2sm432905fam.28.2011.03.03.01.12.38 (version=SSLv3 cipher=OTHER); Thu, 03 Mar 2011 01:12:39 -0800 (PST) Message-ID: <4D6F5C79.5070104@gmail.com> Date: Thu, 03 Mar 2011 10:16:41 +0100 User-Agent: Thunderbird MIME-Version: 1.0 To: Moriyoshi Koizumi , PHP Developers Mailing List References: <4D6ECD36.1070804@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RFC: built-in web server in CLI. From: keisial@gmail.com ("=?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?=") Moriyoshi Koizumi wrote: >> Regarding the patch (https://gist.github.com/835698): >> I don't see a switch to disable the internal parse on configure. > I don't see any obvious reason it should be able to be turned off > through the build option. The only problem is binary size increase, > which I guess is quite subtle. Seems sufficiently different from normal cli. >> The patch looks messy as it splits main in two functions, so it gets >> hard to follow, >> but is probably good overall. > Assuming you are mentioning about the option parsing portion of the > code, yes, it's a bit messy, but I had to do so because runtime > initialization procedure is very different from the ordinary CLI. Wasn't critizising you. It's a limitation of unified diffs, which can't say "move this bunch of code 25 lines down". A bit hard to follow, but aparently good. >> The change from php_printf to printf in line 3988 looks wrong. > php_printf() eventually redirects the output to > sapi_module.ub_write(), which should only be available after proper > SAPI initialization. The changed part can be reached before the > initialization and it absolutely makes no sense to use php_printf() > when you simply want to print a message text before the script starts > in the console. Fair enough. >> Any special reason to disable it on PHP_CLI_WIN32_NO_CONSOLE ? > cli-win32 version of PHP doesn't have an associated console and is > supposed to use to create applications without console interactions > (i.e. GUI). So, It doesn't make sense to enable this feature for it. With the embedded web server, the interaction would be done via the browser.