Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Exec function not displaying in the browser
March 27, 2009, 4:58 am
rate this thread
I am trying to execute the external program through exec function
$a = exec("fdisk -l", $output, $result);
The Output is not displaying in the browser, but if you run this
program through terminal its executing it.
Please any body say why the output is not displaying in browser
- Wolfgang Forstmeier
March 27, 2009, 8:38 am
- C. (http://symcbean.blogspot.c
March 27, 2009, 12:12 pm
Re: Exec function not displaying in the browser
It depends on then OS, but by default all users can execute fdisk on a
linux box - but fdisk -l only produces output for root (something to
with permissions on device files IIRC).
If you must run fdisk from your webserver, then wrap it in a seperate
executable and invoke it via sudo