diff options
author | David Zülke <dzuelke@gmail.com> | 2014-06-12 21:45:22 +0200 |
---|---|---|
committer | David Zülke <dzuelke@gmail.com> | 2014-06-12 21:45:22 +0200 |
commit | db537b1f3f75d39505964a055418932ac3067f40 (patch) | |
tree | df2af47564c1440171f495a539459c1a3dab122f /sapi/phpdbg/phpdbg_cmd.c | |
parent | 356c442558661a2be00bfe7acd6a9abc4c7f97d0 (diff) | |
download | php-git-db537b1f3f75d39505964a055418932ac3067f40.tar.gz |
Fix SetHandler proxy:fcgi:// incompatibilities
Apache 2.4.10+ will allow the following:
```
<FilesMatch \.php$>
SetHandler proxy:fcgi://localhost:9000
</FilesMatch>
```
This is much easier than using `ProxyPassMatch` (which prevents rewriting and other stuff) and rewrites (which are a bag of hurt because when combined with user-land `.htaccess` rewrites, there's always rewrite loops, prefix breakage etc (I've tried, for weeks).
It's basically the future of using Apache (via `mod_proxy_fcgi`) together with PHP-FPM. It's also available for older versions as a standalone module, very easy to install: https://gist.github.com/progandy/6ed4eeea60f6277c3e39
However, the two bits of code this commit deletes interfere with that. They both cover CGI-only mode and were copied from that SAPI into the FPM source. See e.g. https://bugs.php.net/bug.php?id=47042
The first deleted part mangled `SCRIPT_NAME` if something like
```
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) index.php/$1 [L]
```
is used (i.e. rewriting to `PATH_INFO`. The second part drops `PATH_INFO` if there was a `REDIRECT_URL` (with CGI mode, `SCRIPT_FILENAME` in Apache is the path to the PHP binary, and `PATH_INFO` contains the name of the script to run).
Clearly, neither applies in the case of FPM, so both are safe to delete.
Diffstat (limited to 'sapi/phpdbg/phpdbg_cmd.c')
0 files changed, 0 insertions, 0 deletions