[imp] SUMMARY: RES: [horde] Quota e

Luiz Alfredo Baggiotto luiz at pucrs.br
Mon Jul 4 12:28:03 PDT 2005


Hello Jan et all

I´ve tried to rewrite the command.php, but I couldn´t. I don´t know PHP sufficiently. :-P
But, at the 1.000 attempt, I finally discovered the problem: the apache´s user normally don´t have permissions to execute the system "quota" command!
I installed the SUDO package in my system and modified command.php to run quota using it:

$junk = exec("sudo $cmdline", $quota_data, $return_code);

Now, the quota display is working very well.

Thanks again and best regards.


> -----Mensagem original-----
> De: imp-bounces at lists.horde.org 
> [mailto:imp-bounces at lists.horde.org] Em nome de Jan Schneider
> Enviada em: domingo, 3 de julho de 2005 07:06
> Para: imp at lists.horde.org
> Assunto: Re: [imp] RES: [horde] Quota e
> 
> Zitat von Luiz Alfredo Baggiotto <luiz at pucrs.br>:
> 
> > Hello Jan
> >
> > Thank´s a lot for your help. :-)
> > I made the change in the line "74" of 
> imp/lib/Quota/command.php file, 
> > following your suggestion below, but the problem persists. 
> I think the 
> > output of quota command is Ok (at least, when I run it in 
> the console, 
> > the results are showed in the monitor), but by any reason PHP can´t 
> > get it.
> > To test the $junk variable, I was changed the following line too:
> >
> > 73:    if (($return_code == 0) && (count($quota_data) == 1)) {
> >
> > to
> >
> > 73:    if ($junk == 0) {
> >
> > Then, I logged in the browser and the code subsequent has been 
> > executed (is it that because the variable is empty, true?), showing 
> > the error
> >
> > Notice: Undefined offset: 0 in .../Quota/command.php on line 74
> > Notice: Undefined offset: 1 in .../Quota/command.php on line 75
> > Notice: Undefined offset: 2 in .../Quota/command.php on line 75
> >
> > Can you see any other alternative?
> 
> You could rewrite the command quota driver to use popen() instead.
> 
> Jan.
> 
> --
> Do you need professional PHP or Horde consulting?
> http://horde.org/consulting/
> 
> --
> IMP mailing list - Join the hunt: 
> http://horde.org/bounties/#imp Frequently Asked Questions: 
> http://horde.org/faq/ To unsubscribe, mail: 
> imp-unsubscribe at lists.horde.org
> 


More information about the imp mailing list