Re: [PHP] Help on running external command / Partially solved

2008-02-20 Thread Chris
Daniel Brown wrote: On Feb 20, 2008 10:30 AM, Mário Gamito <[EMAIL PROTECTED]> wrote: Please keep the replies on-list, Mario. It helps others out, and ensures that you'll get better advice from a larger group of talented people. \n"; print_r($ret); echo "\n"; echo isset($err) ? "Error: ".

Re: [PHP] Help on running external command / Partially solved

2008-02-20 Thread Daniel Brown
On Feb 20, 2008 10:30 AM, Mário Gamito <[EMAIL PROTECTED]> wrote: Please keep the replies on-list, Mario. It helps others out, and ensures that you'll get better advice from a larger group of talented people. > > > $username = "lixo"; > > exec('su -c - vpopmail "/var/qmail/bin/maildirmake >

Re: [PHP] Help on running external command / Partially solved

2008-02-20 Thread Mário Gamito
Hi, > $username = "lixo"; > exec('su -c - vpopmail "/var/qmail/bin/maildirmake > /home/vpopmail/domains/wwlib.lan/'.$username.'"',$ret,$err); > echo "\n"; > print_r($ret); > echo "\n"; > echo isset($err) ? "Error: ".$err : null; > ?> No output at all and I have "display_errors = On" in php.ini

Re: [PHP] Help on running external command / Partially solved

2008-02-20 Thread Daniel Brown
On Feb 20, 2008 9:59 AM, Mário Gamito <[EMAIL PROTECTED]> 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

Re: [PHP] Help on running external command / Partially solved

2008-02-20 Thread Mário Gamito
Of course the code is: $username = 'lixo'; exec("su -c - vpopmail \"/var/qmail/bin/maildirmake /home/vpopmail/domains/wwlib.lan/\"$username"); Mário Gamito wrote: Hi, Thank you for your answers. I got it working with: "//$username = 'lixo'; exec("su -c - vpopmail \"/var/qmail/bin/maildirm

Re: [PHP] Help on running external command / Partially solved

2008-02-20 Thread Daniel Brown
On Feb 20, 2008 9:52 AM, Mário Gamito <[EMAIL PROTECTED]> wrote: > Now, if I run it from the shell, it creates the directory. > From a page on the web server it doesn't. Chances are, the user as which the HTTP server (probably Apache) is running does not have permission to write/create in tha

Re: [PHP] Help on running external command / Partially solved

2008-02-20 Thread Mário Gamito
Hi, Thank you for your answers. I got it working with: "//$username = 'lixo'; exec("su -c - vpopmail \"/var/qmail/bin/maildirmake /home/vpopmail/domains/wwlib.lan/\"$username");" Now, if I run it from the shell, it creates the directory. From a page on the web server it doesn't. Directory /