Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73072 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 19594 invoked from network); 12 Mar 2014 08:49:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Mar 2014 08:49:49 -0000 Authentication-Results: pb1.pair.com header.from=ant_mail@inbox.ru; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=ant_mail@inbox.ru; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain inbox.ru designates 94.100.177.107 as permitted sender) X-PHP-List-Original-Sender: ant_mail@inbox.ru X-Host-Fingerprint: 94.100.177.107 smtp47.i.mail.ru Received: from [94.100.177.107] ([94.100.177.107:50493] helo=smtp47.i.mail.ru) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/30-17005-BAF10235 for ; Wed, 12 Mar 2014 03:49:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=inbox.ru; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Subject:To:Message-ID:From:Date; bh=RA0UJielvoGSc24R1fKP6Fl3BxEXbVbtqOD787DK+P0=; b=YKzGAZzItFLwMKN7mw/uet1tu79UWcYpTp6yxb9M4HKqQ+c/yjAgIamqPASpGqnv3qnS5BHa8eFwF8m/2lMN6rBaoDi98PvvI2FRrV6yB3J9sVwYIA298EDOKCy00ioc3WwEi2JOJQtJyX/Skz6ZQoq0x5P9f2Eq92iD2otBr2M=; Received: from [91.190.115.253] (port=65076 helo=[192.168.192.11]) by smtp47.i.mail.ru with esmtpa (envelope-from ) id 1WNer9-0000NU-Qp for internals@lists.php.net; Wed, 12 Mar 2014 12:49:44 +0400 Date: Wed, 12 Mar 2014 12:49:41 +0400 X-Priority: 3 (Normal) Message-ID: <1057219742.20140312124941@inbox.ru> To: internals@lists.php.net In-Reply-To: <343525739.20140310213122@inbox.ru> References: <343525739.20140310213122@inbox.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam: Not detected X-Mras: Ok Subject: Re: [PHP-DEV] PHP as FastCGI Authorizer From: ant_mail@inbox.ru (Anthony Pankov) Please, anybody, explain the current FastCGI support status. FastCGI specification provides 3 roles: responder, authorizer and filter (http://www.fastcgi.com/drupal/node/6?q=node/22#S6). PHP (and php-fpm) support only 1 of 3 - responder. May be i missed something and PHP has support for Authorizer? > Dear All! > Is there any chance to use php as FastCGI authorizer? > As i see, php-fpm has no options to use predefined script and support > only Responder role. > I tried php-cgi as authorizer as following: > 1. Configure apache to use php-cgi as FastCGIServer (php-cgi under > FastCGI process management), than start php-cgi as "php-cgi -f > .../authscript.php". > I see this in sapi/cgi/cgi_main.c line 2246: > if (script_file) { > /* override path_translated if -f on command line */ > So i used -f switch. > There no output (including errors) in any log and no evidence that script was launched. > May be there is a broken magic in determination of fastcgi mode: > sapi/cgi/fastcgi.c > if (getpeername(0, (struct sockaddr *)&sa, &len) != 0 && errno == ENOTCONN) { > fcgi_setup_signals(); > return is_fastcgi = 1; > } else { > return is_fastcgi = 0; > } > Because of fcgi_listen contain unambiguous: > is_fastcgi = 1; > i tried next variant: > 2. Configure apache to use php-cgi as FastCGIExternalServer. Php > used as > "php-cgi -b .../gsock -f .../authscript.php" > Socket is created, FastCGI report that connection is done. > But, again, no output in any log and no evidence that script was launched. > In every apache configuration script included as FastCGIAuthorizer , of course. > Any suggestion? > -- > Best regards, > Anthony mailto:ant_mail@inbox.ru -- Best regards, Anthony mailto:ant_mail@inbox.ru