Page 1 of 1

Executing Program from PHP

Posted: Wed Feb 08, 2006 1:27 pm
by Krishma
Hi:

I am trying to execute a C program by

$last_line = system('/doc/tmp/filter', $retval);

Where Filter is Output file on Linux located in directory /doc/tmp. My php file is in my web directory. How can I call execuateble file Filter to run it from my php file.

Thanks,
Krishma

Posted: Wed Feb 08, 2006 2:13 pm
by feyd
that should generally be fine, however if php doesn't have the rights to run it, which is likely, then you're stuck.

Hi

Posted: Wed Feb 08, 2006 2:50 pm
by Krishma
I can run ls , cat, ps and all linux commands but not PHP. I don't think this is the issue