I stumbled into an issue with a graph which has several 100 graph items. graph_image.php generates an empty file, no error message whatsoever.
I have traced this down to the command line being too long. It appears that PHP's popen() command refuses to work as soon as the command line reaches 128K. The same is true for other PHP commands such as exec() or passthru(). When I execute the same command line in a shell, the command is executed properly, so I gather this is really a limitation in PHP.
Code: Select all
exec("echo ".str_repeat("-", 128*1024-6), $out, $rc);
-> works as the command line is 131071 (128K-1), $rc is 0
exec("echo ".str_repeat("-", 128*1024-5), $out, $rc);
-> works as the command line is 131072 (128K), $rc is 127
By the way, this is on Linux. I have tried different versions of PHP.
Best regards
Oliver