Forum Post Assistant too many redirects Topic is solved

This Forum board is about discussions about the FPA tool.
User avatar
RussW
Joomla! Exemplar
Joomla! Exemplar
Posts: 9362
Joined: Sun Oct 22, 2006 4:42 am
Location: Sunshine Coast, Queensland, Australia
Contact:

Re: Forum Post Assistant too many redirects

Post by RussW » Thu Dec 03, 2020 8:46 pm

Again, I feel I am obviously not accurately or adequately getting the point across here regarding this specific "type" of problem.

For this specific problem, and other similar potential issues, where as soon as the FPA starts to run, either PHP produces an immediate fatal error or the server reacts with a 500 error, FPA is stopped dead in it's tracks, there is no output, no UI available for anyone to "tick" anything.

At this time and in this specific case (redirections), PHP is not actually producing a fatal error, it is the server reacting to a request and a response that it doesn't know how to manage, it retires until a timer is popped and ultimately calls a 500, killing the web-server thread and PHP process.

In todays modern and fast moving web environment reverse proxies (commonly nginx), content delivery networks (like CloudFlare), load balancers (commonly seen in Elastic/Cloud platforms) and caching proxies (commonly varnish) ie:upstream servers, are actually in use hugely already today (not the suggested 1%) and FPA works exactly as expected. The difference here, I believe, is when the upstream server is using a different return protocol than the downstream server is, so FPA attempts to redirect to the https protocol on the downstream server and the upstream server subsequently redirects it back to http only, causing a loop.

This occurs when, for example, the downstream server (where the users website is hosted) doesn't use https (maybe the host doesn't offer free certificates and the user decided to use the SSL provided by the upstream server instead), and FPA detects that the connection from the browser to the upstream server (the proxy/balancer) uses https, however the connection between the downstream server and upstream uses http. This is quite a common configuration (unfortunately, think of sites using a CDN and the CDN's SSL, but not having a certificate on their own host.
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
The Styleguyz https://www.thestyleguyz.com/

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 39462
Joined: Sat Apr 05, 2008 9:58 pm

Re: Forum Post Assistant too many redirects

Post by Webdongle » Fri Dec 04, 2020 9:58 am

OK as soon as the script is run ... not when the button to run the fpa is clicked. Two words ... Penny drop :D
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein.

User avatar
RussW
Joomla! Exemplar
Joomla! Exemplar
Posts: 9362
Joined: Sun Oct 22, 2006 4:42 am
Location: Sunshine Coast, Queensland, Australia
Contact:

Re: Forum Post Assistant too many redirects

Post by RussW » Fri Dec 04, 2020 8:35 pm

There's a new test/dev branch on github, it's purpose is to test for certain known conditions, including upstream servers, prior to ultimately completing the redirect if the previous conditions are met. I've tested it on a couple of different CDN providers that can be configured to create/replicate the scenario in this post. I'll be trying on AWS with load balancers at some point, but obviously don't have access to all the "upstream server" infrastructures out there.
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
The Styleguyz https://www.thestyleguyz.com/


Post Reply

Return to “Forum Post Assistant (FPA)”