docker-php-nginx icon indicating copy to clipboard operation
docker-php-nginx copied to clipboard

?q= missing since 3.8.0

Open WouterGritter opened this issue 5 months ago • 2 comments

I relied on the q parameter being available in index.php for my project, however it seems to have been removed since 3.8.0 by this commit.

Any particular reason for the removal?

WouterGritter avatar Jun 10 '25 10:06 WouterGritter

Hi @WouterGritter,

I'm sorry that it broke your project. I removed it, because it's not a good practice to add the URI as separate query param. This would give unexpected results when the q query param is added to the URL, because that would override it.

I checked out your project, but I couldn't find a reference to the q parameter. Where are you using that? I might be able to suggest a different way of handling it.

TrafeX avatar Jun 11 '25 09:06 TrafeX

That makes sense, thanks. I refactored this logic by using PHP's $_SERVER['DOCUMENT_URI'] along with a custom default.conf nginx config file to override the docker image's default one, so it's all good.

I'm not sure how widely used the docker image is -- might it be a good idea to add a README section for breaking changes like this one? Possibly suggesting a quick fix, e.g. using docker image tag 3.7.0.

Dankjewel!

WouterGritter avatar Jun 16 '25 09:06 WouterGritter

In hindsight, this should've been a major version since it breaks existing behavior. Thank you for pointing that out!

TrafeX avatar Jun 29 '25 13:06 TrafeX