From dcc1afbbb9f252615d70897a162b356331878267 Mon Sep 17 00:00:00 2001 From: katagia Date: Mon, 10 Nov 2003 14:24:17 +0000 Subject: [PATCH] fixed problem with quotas when not using proc_open --- lam/lib/account.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lam/lib/account.inc b/lam/lib/account.inc index c86374e3..a91c2d75 100644 --- a/lam/lib/account.inc +++ b/lam/lib/account.inc @@ -243,9 +243,9 @@ function getquotas($users) { else { // PHP 4.3> $command = escapeshellarg($_SESSION['lampath']."lib/lamdaemon.pl")." ".$towrite; $pipe = popen("echo \"$userstring\"|$command" , 'r'); - $output = ''; while(!feof($pipe)) { - $output .= fread($pipe, 1024); + //$output .= fread($pipe, 1024); + $output = fgets($pipe, 1024); if ($output!='') $output_array[] = $output; } pclose($pipe); @@ -370,7 +370,7 @@ function setquotas($values2) { $command = escapeshellarg($_SESSION['lampath']."lib/lamdaemon.pl")." ".$towrite; $pipe = popen("echo \"$input\"|$command" , 'r'); while(!feof($pipe)) { - $return[] = fread($pipe, 1024); + $return[] = fgets($pipe, 1024); } pclose($pipe); } @@ -424,7 +424,7 @@ function remquotas($users, $type) { $pipe = popen("echo \"$input\"|$command" , 'r'); $output = ''; while(!feof($pipe)) { - $return[] = fread($pipe, 1024); + $return[] = fgets($pipe, 1024); } pclose($pipe); } @@ -533,7 +533,7 @@ function remhomedir($users) { $pipe = popen("echo \"$input\"|$command" , 'r'); $output = ''; while(!feof($pipe)) { - $return[] = fread($pipe, 1024); + $return[] = fgets($pipe, 1024); } pclose($pipe); }