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
Core PHP function dns_get_record
is undefined
#1042
Comments
Here is a quick link to trigger the same error: |
Looking at the PHP source for This forum post implies that the So it may come down to what's available when PHP is being compiled to wasm. Usually there's a |
Closes #1042 by polyfilling the dns_* functions that are missing in the WebAssembly build of PHP. In the PHP source code, these functions are included conditionally when the HAVE_DNS_SEARCH_FUNC constant is true, which it isn't in the Emscripten build. The polyfills return either `false` or an empty array and do not actually perform any DNS checks. In Node.js, we could support actual dns checks. Let's leave that for a subsequent iteration. In the browser, there isn't much we can do. ## Remaining work Rebuild the browser versions of PHP ## Testing instructions Confirm the CI checks pass CC @p-jackson @sejas @wojtekn
The
dns_get_record()
function, which is a core PHP function, is undefined in PHP-WASM. It results in throwing fatal errors when it's used in code.Steps to reproduce:
Notice the fatal error:
The text was updated successfully, but these errors were encountered: