Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 69196 invoked from network); 16 Nov 2009 12:06:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Nov 2009 12:06:43 -0000 Received: (qmail 21119 invoked by uid 500); 16 Nov 2009 12:06:42 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 21024 invoked by uid 500); 16 Nov 2009 12:06:42 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 21015 invoked by uid 99); 16 Nov 2009 12:06:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Nov 2009 12:06:42 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of trawick@gmail.com designates 209.85.222.199 as permitted sender) Received: from [209.85.222.199] (HELO mail-pz0-f199.google.com) (209.85.222.199) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Nov 2009 12:06:34 +0000 Received: by pzk37 with SMTP id 37so3444081pzk.10 for ; Mon, 16 Nov 2009 04:06:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=XimOpuHmn1E6PbB6euBfWiDN5TCYP0P7QyA5Ay0A9HQ=; b=KduxDEXlw9DNrTtNgRUbyA87/z5WxZ40uCk5oHAqlsnxN9PuuNH4+qKE1JdYEKz7t7 obdsxzEKnQaFM27m74Fwt3LfGAgvnNoflgyc5qh99O5oFnD3/2XyYsquVn9Vy7fgvq84 6xNqGDpC6rT8ebh5BJhJZfCBOLYq6yRguQIGQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Cdsjcf43+njyJlIkfBHHljMNwuzwcBgo7IG11soTeeKSeiV1F4ADUv4K0JCRAnTm6Q mt8Y2UCTbTEBH86T75wm13QXkoGa1DGE3QZJZGJsDSAUNUstbFbtBYjNZtYQ1bWG6ihL bMicfRKPEu54vmSh6p+URf2AodgeAEGA20niI= MIME-Version: 1.0 Received: by 10.142.3.13 with SMTP id 13mr881004wfc.302.1258373172704; Mon, 16 Nov 2009 04:06:12 -0800 (PST) In-Reply-To: <72e3fc8f0911152204k38013dfble89225ddcc46c3c3@mail.gmail.com> References: <72e3fc8f0911121525g6917cac5u7287718047a0dd4f@mail.gmail.com> <72e3fc8f0911131631p16d4f120v80e122052278ff37@mail.gmail.com> <72e3fc8f0911141156k510bf67dra70398d7041da3e1@mail.gmail.com> <72e3fc8f0911141240l64b81f68r9bbdf6598daefba5@mail.gmail.com> <72e3fc8f0911151456q6cdb58a9yfaa8aa766eef412c@mail.gmail.com> <72e3fc8f0911152204k38013dfble89225ddcc46c3c3@mail.gmail.com> Date: Mon, 16 Nov 2009 07:06:12 -0500 Message-ID: Subject: Re: mod_rewrite and mod_fcgid pass wrong fcgi request From: Jeff Trawick To: dev@httpd.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Nov 16, 2009 at 1:04 AM, Felipe Alcacibar wr= ote: > ... >> When comparing modes of PHP execution: >> >> - CGI and FastCGI are directly comparable because the information that >> Apache needs to pass to PHP is the same. =A0(In fact, mod_cgi[d] and >> mod_fcgid use the same core Apache code to build almost all of that >> information.) >> >> You should be able to take your CGI configuration and change the >> handler from cgi-script to fcgid-script and have PHP work as FastCGI. >> One nuance is that if you're relying on ScriptAlias you'll need to use >> both Alias and Options +ExecCGI in the FastCGI equivalent. >> >> - mod_php and mod_fcgid configurations are not comparable. >> > > As you sayed it i made a similar environment (the difference is the > FcgidWrapper line) PHP can be configured via Action instead of FcgidWrapper with mod_fcgid too. That is the most direct comparison. > from mod_cgid to mod_fcgid and the result is the > same, in the mod_cgid environment all runs good and in the mod_fcgid > persisst the problem... > > rohan counter # cat /etc/apache2/modules.d/70_php5_cgi.conf > > =A0 =A0 =A0 =A0ScriptAlias /.httpd/cgi-interpreters /var/cgi-interpreters= / > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0AllowOverride None > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Options None > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Options +ExecCGI > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Order allow,deny > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Allow from all > =A0 =A0 =A0 =A0 > > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0FcgidWrapper "/var/cgi-interpreters/php-cgi" .php > =A0 =A0 =A0 =A0FcgidWrapper "/var/cgi-interpreters/php-cgi" .php2 > =A0 =A0 =A0 =A0FcgidWrapper "/var/cgi-interpreters/php-cgi" .php3 > =A0 =A0 =A0 =A0FcgidWrapper "/var/cgi-interpreters/php-cgi" .php4 > =A0 =A0 =A0 =A0FcgidWrapper "/var/cgi-interpreters/php-cgi" .php5 > =A0 =A0 =A0 =A0FcgidWrapper "/var/cgi-interpreters/php-cgi" .phtml > > =A0 =A0 =A0 =A0FcgidInitialEnv PHP_FCGI_CHILDREN "12" > =A0 =A0 =A0 =A0FcgidInitialEnv PHP_FCGI_MAX_REQUESTS "1" BTW, check the mod_fcgid docs for comments on these two PHP environment variables. > > =A0 =A0 =A0 =A0AddHandler fcgid-script .php .php3 .php4 .php5 .php6 .phtm= l > =A0 =A0 =A0 =A0 > > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0AddHandler php-script .php .php3 .php4 .ph= p5 .php6 .phtml > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Action php-script "/.httpd/cgi-interpreter= s/php-cgi" > =A0 =A0 =A0 =A0 > > =A0 =A0 =A0 =A0 > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Options +ExecCGI > =A0 =A0 =A0 =A0 > > =A0 =A0 =A0 =A0DirectoryIndex index.php index.php3 index.php4 index.php5 = index.phtml > > > > Any suggestion or step to do??... Use Action with mod_fcgid too so that mod_fcgid processing works through the same mechanisms as with your mod_cgid setup. I'll try to find some time today to play with that as well. Eventually I'd like the documentation to show an Action-based example, with support for easily switching between CGI and FastCGI for debugging or other purposes.