Laravel Version
12.53.0
PHP Version
8.4.13
Database Driver & Version
No response
Description
Concurrency::run fails silently when zlib.output_compression is enabled. The only visible error is Trying to access array offset on null at ProcessDriver.php:51. After much investigation, it turns out that zlib.output_compression = On in php.ini appends compressed binary data to the child process stdout after the JSON payload. json_decode returns null on the corrupted string, causing the array offset error in the parent.
Suggested fix: add a check in ProcessDriver::run() before spawning processes:
if (ini_get('zlib.output_compression')) {
throw new \RuntimeException('Concurrency process driver requires zlib.output_compression to be disabled.');
}
Steps To Reproduce
In php.ini, set zlib.output_compression = On
Call the following code from any controller:
Concurrency::run([fn() => sleep(1)]);
Observe the cryptic Trying to access array offset on null error at ProcessDriver.php:51
Laravel Version
12.53.0
PHP Version
8.4.13
Database Driver & Version
No response
Description
Concurrency::runfails silently whenzlib.output_compressionis enabled. The only visible error isTrying to access array offset on nullatProcessDriver.php:51. After much investigation, it turns out thatzlib.output_compression = Oninphp.iniappends compressed binary data to the child process stdout after the JSON payload.json_decodereturns null on the corrupted string, causing the array offset error in the parent.Suggested fix: add a check in ProcessDriver::run() before spawning processes:
Steps To Reproduce
In
php.ini, setzlib.output_compression = OnCall the following code from any controller:
Observe the cryptic
Trying to access array offset on nullerror atProcessDriver.php:51