Closed zackw closed 11 months ago
Hello @zackw Could you please let me know which version of dmarc-srg you are using?
I am very interested in knowing in what conditions getallheaders is missing.
See: https://github.com/slimphp/Slim-Psr7/pull/273
A polyfill for the missing function: https://github.com/ralouphie/getallheaders
@liuch Git master as of this morning, rev 7c1caa3ab21f9e679be22491ac0b111d11cd43ab.
@williamdes I don't know PHP at all but searching for the error message gives me the impression that it may or may not be there depending on the "SAPI" in use. And my hosting provider has their own custom SAPI so anything I could say about it would probably be useless to you.
@williamdes This feature was not available in FPM SAPI, but has been available since version 7.3.0. I believe this issue is because of "their own CGI replacement".
@zackw Thank you for the information.
@liuch Git master as of this morning, rev 7c1caa3.
@williamdes I don't know PHP at all but searching for the error message gives me the impression that it may or may not be there depending on the "SAPI" in use. And my hosting provider has their own custom SAPI so anything I could say about it would probably be useless to you.
If you can let me know more about the SAPI and the hosting provider name. I could keep this in mind to document in what cases this function does not exist
@zackw I have just added a polyfill for this function. Could you please test my fix?
@liuch Works, thanks for the quick fix.
@williamdes The hosting provider is https://www.nearlyfreespeech.net/. The only information I have about the SAPI is that it identifies itself as "NearlyFreeSpeech.NET PHP SAPI" in phpinfo() output, and $_SERVER['GATEWAY_INTERFACE']
is NFGI/1.0
.
FWIW I hacked together a slightly different workaround which I'll attach here in case it's of use to you.
Thanks for your workaround. I'm going to rewrite mine a little later. Strictly speaking, I don't need all these checks because I use exactly one header in my code.
May I close this issue?
Loading any page of the web interface causes this error to show up (both as a toast message in my browser, and in the server's error logs).
Line 94 of Core.php is the only occurrence of the word "getallheaders" in the entire source tree.
PHP 8.1.25 / Apache 2.4, on a shared webhosting service that uses their own custom CGI replacement, I don't have any details on that.