Error message

By looking at the OP’s website, I believe the fail may be caused by Sentry’s integration
(Sentry\Integration\EnvironmentIntegration:58, second vendor frame from the top), in the method updateServerOsContext, where the constructor is called with php_uname as a parameter:

if (null === $osContext) {
    $osContext = new OsContext(php_uname('s'));
}

php_uname had been reported as being a disabled function some time ago, but something must have changed, as Sentry’s implementation also contains a check in lines 53-55 that seems to be bypassed:

if (!\function_exists('php_uname')) {
    return $osContext;
}

Was php_uname modified to return nothing? My own testing with a var_dump seems to yield those results (it prints NULL).

If this is the case, would polyfilling the function to return a generic/anonymized Linux system information be possible, and of help?

7 Likes