[aur-dev] [PATCH] Add check for if PATH_INFO exists

Lukas Fleischer lfleischer at archlinux.org
Sun Feb 12 11:56:50 UTC 2017


On Wed, 08 Feb 2017 at 18:22:20, Mark Weiman wrote:
> Can you think of a way where you could have an instance where a rewrite to
> /index.php/* is done and PATH_INFO is unset? If it isn't done correctly, you
> would just get your web server's generic 404 page with no notice either (other
> than this file doesn't exist), so I really don't see why this is important to
> consider.

If somebody forgets to setup rewriting and browses the home page, he
immediately seems the PATH_INFO warning and knows that something with
the PATH_INFO setup might be wrong (just like the current situation with
PHP's built-in web server, except that PHP magically fixes the setup
itself). Clicking any other link will then result in the 404 page being
displayed but at this point, the user has already seen the PATH_INFO
warning.

However, as I said, getting rid of the warning where it is desired might
be a small price to pay for having a much simpler test setup. I am fine
with this patch if it is accompanied by a document that describes this
setup.

> To extend, QUERY_STRING is unset for many pages as well when using `php -S` and
> I keep meaning to see if this happens with a setup on Nginx. This one makes
> sense because on some pages, there really isn't a QUERY_STRING.

Yes, QUERY_STRING should be unproblematic, though, because we never rely
on it being defined, right?

> Even right now, INSTALL does not mention how to set up cgit either. Perhaps some
> instruction on that should be added?

Sounds like a good idea!

> I can get to work on writing such a document.

Awesome, thanks!


More information about the aur-dev mailing list