Hello and happy new year to all,
I recently upgraded a Drupal 7 site to Backdrop (version 1.26.3) following the Upgrading from Drupal guide.
The old D7 site and the final Backdrop site are in the same shared hosting environment (OVH) with Apache/PHP 8.1 and a Let's Encrypt SSL certificate.
- D7 site: https://mopud7.babalma.net/
- Backdrop site: https://mopubd.babalma.net/
In HTTPS, the D7 site works as expected in:
- Firefox (Windows and Linux)
- Google Chrome (Windows) and Chromium (Linux)
- MS Edge
The Backdrop site however only works in Firefox. In Chrome and Edge, I get a blank page and the following error in the browser console:
net::ERR_HTTP2_PROTOCOL_ERROR 200 (OK)
(Note: in HTTP the Backdrop site works as expected in all browsers)
The error occurs on all pages of the site.
I tried with no success:
- Accessing the site from another location (to rule out any problem with my internet connection)
- Visiting the site in incognito mode
- Replacing my custom theme with Bartik
- Disabling contrib and custom modules
- Regenerating the SSL certificate
- Enabling/disabling aggregation of CSS and JS files
-
Clearing all caches (via the UI and with
bee cc all
) - Clearing the browser cache, history and cookies (in some rare cases the pages loaded correctly just after that but the next request triggered the error again)
Finding:
The Backdrop site works in Chrome when I comment out the following line in the function backdrop_set_length_headers
(file core/includes/bootstrap.inc):
backdrop_add_http_header('Content-Length', $content_length);
Has anyone experienced this situation?
Any suggestions would be greatly appreciated.
EDIT: For some reason, the site works for visitors in all browsers when I select both "Cache pages for anonymous users" and "Compress cached pages" on the Performance page.
Even with those two options enabled, I still cannot access the admin pages in Chrome and Edge though (I get the ERR_HTTP2_PROTOCOL_ERROR
just after submitting my credentials).
EDIT 2 (SOLVED): For some reason, the issue disappeared after I changed the PHP runtime environment from PHP-FPM to PHP CGI on my shared host (OVH) and this seems to work whether pages are cached or not. Documentation: https://help.ovhcloud.com/csm/en-web-hosting-change-php-version?id=kb_ar...
For some reason, the issue disappeared after I changed the PHP runtime environment from PHP-FPM to PHP CGI on my shared host (OVH) and this seems to work whether pages are cached or not.