On Thu, 30 Oct 2003 11:28:28 +0100, Yves Peysson <pe*****@drfc.cad.cea.fr>
wrote:
I want to execute shell command in php. I tried successfully the following:
<?php
$output = `ls -al`;
echo "<pre>$output</pre>";
?>
However when I want to launch an application like
<?php
$output = `open /Applications/myApplication.app`;
?>
Nothing appears while when I type open /Applications/myApplication.app in
the Terminal window, myApplication is launched properly.
I have the same problem with a cli application passing parameters:
<?php
$output = `./myApplicationcli param1 param 2`;
echo "<pre>$output</pre>";
?>
I see in the web browser that the application run, but nothing is saved !
while in terminal, the application works fine
PHP runs under the web server process, which will have a different environment
and permissions to your terminal.
Check PATH, environment variables, and filesystem permissions.
--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (
http://www.andyh.co.uk)
Space: disk usage analysis tool (
http://www.andyhsoftware.co.uk/space)