Hi I'm running a process with popen;-
$handle = popen('python scriptos.py', "r");
while (!feof($handle)) {
$data = fgets($handle);
echo "> ".$data;
}
And I'm only getting 3 lines from a process that returns 5 lines. I run this exact command in CLi and I will get more response. It's as if it stops reading early (it can take time to complete and updates the next 2 lines whilst working, it's a progress indicator).
Am I doing anything wrong? Is proc_open more suitable (i've started seeing if I can try that).