PHP 7.4.16 (ZTS) with parallel
extension installed running Laravel 7.
ini_get('disable_functions');
returns an empty string.
I can write a script that calls setlocal(0,0)
from the main process and it works without throwing an exception. This error is thrown when a library attempts to invoke it from within a parallel/Runtime
thread.
$disabled = ini_get('disable_functions'); // empty string
//works
setlocale(0,0);
$thread = new \parallel\Runtime(app_path().'/../bootstrap/parallel.php');
$future = $thread->run(function() {
$disabled = ini_get('disable_functions'); // empty string
// throws setlocale() has been disabled for security reasons
setlocale(0, 0);
});
var_dump([
'value' => $future->value(),
'cancelled' => $future->cancelled(),
'done' => $future->done(),
]);
I have dumped all the ini settings, both inside a parallel\Runtime
thread and outside of it. They match exactly and the function is not marked as disabled.
Is this function somehow disabled by a compile-time directive?