Re: Help on running external command / Partially solved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Feb 20, 2008 9:59 AM, Mário Gamito <gamito@xxxxxxxxx> wrote:
> Of course the code is:
>
> $username = 'lixo';
>
> exec("su -c - vpopmail \"/var/qmail/bin/maildirmake
> /home/vpopmail/domains/wwlib.lan/\"$username");

    Oh, yes, of course it is!

    That still doesn't mean that Apache has the right privileges.
Change the above to this:
<?
$username = "lixo";
exec('su -c - vpopmail "/var/qmail/bin/maildirmake
/home/vpopmail/domains/wwlib.lan/'.$username.'"',$ret,$err);
echo "<pre />\n";
print_r($ret);
echo "</pre>\n";
echo isset($err) ? "Error: ".$err : null;
?>

-- 
</Dan>

Daniel P. Brown
Senior Unix Geek
<? while(1) { $me = $mind--; sleep(86400); } ?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux