fixed problem with quotas when not using proc_open

This commit is contained in:
katagia 2003-11-10 14:24:17 +00:00
parent 2e46c96335
commit dcc1afbbb9
1 changed files with 5 additions and 5 deletions

View File

@ -243,9 +243,9 @@ function getquotas($users) {
else { // PHP 4.3> else { // PHP 4.3>
$command = escapeshellarg($_SESSION['lampath']."lib/lamdaemon.pl")." ".$towrite; $command = escapeshellarg($_SESSION['lampath']."lib/lamdaemon.pl")." ".$towrite;
$pipe = popen("echo \"$userstring\"|$command" , 'r'); $pipe = popen("echo \"$userstring\"|$command" , 'r');
$output = '';
while(!feof($pipe)) { while(!feof($pipe)) {
$output .= fread($pipe, 1024); //$output .= fread($pipe, 1024);
$output = fgets($pipe, 1024);
if ($output!='') $output_array[] = $output; if ($output!='') $output_array[] = $output;
} }
pclose($pipe); pclose($pipe);
@ -370,7 +370,7 @@ function setquotas($values2) {
$command = escapeshellarg($_SESSION['lampath']."lib/lamdaemon.pl")." ".$towrite; $command = escapeshellarg($_SESSION['lampath']."lib/lamdaemon.pl")." ".$towrite;
$pipe = popen("echo \"$input\"|$command" , 'r'); $pipe = popen("echo \"$input\"|$command" , 'r');
while(!feof($pipe)) { while(!feof($pipe)) {
$return[] = fread($pipe, 1024); $return[] = fgets($pipe, 1024);
} }
pclose($pipe); pclose($pipe);
} }
@ -424,7 +424,7 @@ function remquotas($users, $type) {
$pipe = popen("echo \"$input\"|$command" , 'r'); $pipe = popen("echo \"$input\"|$command" , 'r');
$output = ''; $output = '';
while(!feof($pipe)) { while(!feof($pipe)) {
$return[] = fread($pipe, 1024); $return[] = fgets($pipe, 1024);
} }
pclose($pipe); pclose($pipe);
} }
@ -533,7 +533,7 @@ function remhomedir($users) {
$pipe = popen("echo \"$input\"|$command" , 'r'); $pipe = popen("echo \"$input\"|$command" , 'r');
$output = ''; $output = '';
while(!feof($pipe)) { while(!feof($pipe)) {
$return[] = fread($pipe, 1024); $return[] = fgets($pipe, 1024);
} }
pclose($pipe); pclose($pipe);
} }