-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Call to undefined function Liuch\DmarcSrg\getallheaders() #110
Comments
Hello @zackw |
I am very interested in knowing in what conditions getallheaders is missing. A polyfill for the missing function: https://github.com/ralouphie/getallheaders |
@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. |
@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. |
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 |
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.
The text was updated successfully, but these errors were encountered: