Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77072 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89615 invoked from network); 5 Sep 2014 13:52:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Sep 2014 13:52:56 -0000 Authentication-Results: pb1.pair.com header.from=dz@heroku.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dz@heroku.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain heroku.com designates 209.85.220.52 as permitted sender) X-PHP-List-Original-Sender: dz@heroku.com X-Host-Fingerprint: 209.85.220.52 mail-pa0-f52.google.com Received: from [209.85.220.52] ([209.85.220.52:43941] helo=mail-pa0-f52.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DC/02-12208-630C9045 for ; Fri, 05 Sep 2014 09:52:54 -0400 Received: by mail-pa0-f52.google.com with SMTP id eu11so22291889pac.39 for ; Fri, 05 Sep 2014 06:52:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=bMGhbmu26Y6a5FYrBOmszjKCRuVKQUNKz/lEM4jHiAg=; b=TCUcgu2dt3KEnrBK9NgGlbPm4CAMQbz7OhNJZ+yQI/xuw0cgRLcwU0X7c7U4/HMl4o +Per/WJFN6yRGARFayXoKf4199QJ2fuI+PO0/C4fJJBHnvmkFjWzV5pdUjTmBZRFwf+R Uwu/En0zLNygUQtBtx7jsmB/JnKU6Hqxx7GNew+bPAFntsqsOlxNTajq3XOmwf+cPGJK 1XFmaWPr+IbhGzPHqvmvN063bsaGFv+fKRsQj48BijH9J+t9TdhT/yLzLvZWXDvoxjQ9 TyUh+scJNhYiTWv2Upya3onqHElu9t3iF4qdS/oiQ0+a2uMUlw/6MaIfi2L3ZJJ4YmNb RKCQ== X-Gm-Message-State: ALoCoQkoAfjmkvklwBIR71VpUpljbE+uzJDyrupw9w2rP14t79KoOXn+YJr9LOhkv2t4yvqo87r1 X-Received: by 10.70.92.36 with SMTP id cj4mr21999838pdb.156.1409925166161; Fri, 05 Sep 2014 06:52:46 -0700 (PDT) Received: from [192.168.1.252] (c-24-5-51-87.hsd1.ca.comcast.net. [24.5.51.87]) by mx.google.com with ESMTPSA id x1sm1873358pdm.13.2014.09.05.06.52.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Sep 2014 06:52:44 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) In-Reply-To: Date: Fri, 5 Sep 2014 06:52:39 -0700 Cc: Remi Collet , PHP Internals Content-Transfer-Encoding: quoted-printable Message-ID: <7A236296-4583-4A54-B1C9-14936273D00D@heroku.com> References: <54092563.1000802@sugarcrm.com> <54099BF7.8000207@fedoraproject.org> To: Philip Hofstetter X-Mailer: Apple Mail (2.1878.6) Subject: Re: [PHP-DEV] PHP 5.4.33 RC1 => mod_proxy_fcgi still broken From: dz@heroku.com (David Zuelke) The fixes in that ticket were pretty risky as they very late in the game = fiddled with strings. That was brittle should have been fixed earlier = during request processing. The new patch = (https://bugs.php.net/patch-display.php?bug=3D65641&patch=3DAnother_fix_fo= r_mod_proxy_fcgi.patch&revision=3D1409922889) looks better, but doesn't = account for cases where SCRIPT_NAME Is correct (not sure if that can be = checked), and I don't understand why env_script_name is restored back to = its original value after writing it to SCRIPT_NAME. At the very least, = the comment in that if should say "this is for ProxyPass and SCRIPT_NAME = being broken with index.php/foo". But that doesn't matter anyway, because ProxyPass is a bag of hurt for a = million and one reasons. Rewrites are not applied, you can't check if = the file exists et cetera. People should simply use the SetHandler approach instead. If your = version of Apache 2.4 doesn't have that yet, use = https://gist.github.com/progandy/6ed4eeea60f6277c3e39 David P.S.: if you also want to check if the .php file exists: # make sure the file exists so that if = not, Apache will show its 404 page and not FPM SetHandler "proxy:fcgi://127.0.0.1:9003" P.P.S.: as a reminder, if you want to use UDS: disablereuse off # any parameter in here will do so the proxy is = registered during startup and can be referenced later as "fcgi://php" SetHandler "proxy:fcgi://php" On 05.09.2014, at 05:54, Philip Hofstetter = wrote: > On Fri, Sep 5, 2014 at 1:18 PM, Remi Collet = wrote: >=20 >> 2. ProxyPass Configuration >>=20 >> ProxyPass /proxy/ fcgi://127.0.0.1:9003//var/www/html/ >>=20 >> URL =3D /proxy/info.php/a/b?q=3Da >> SCRIPT_NAME =3D /proxy/info.php/a/b >> =3D> Broken >=20 > This is bugging me too on my development machine where I'm stuck at > Apache 2.4.9 which doesn't yet have support for using SetHandler this > way. >=20 > Applying the patch fpm_main-script_name-v2.patch proposed on > https://bugs.php.net/bug.php?id=3D65641 fixes the issue for me. >=20 > This is happening for me with PHP 5.4, 5.5 and 5.6 (which are the ones > I tested). >=20 > Philip >=20 > --=20 > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20