[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PHP help
From: |
Marc Weber |
Subject: |
Re: PHP help |
Date: |
Wed, 23 Jun 2010 02:06:38 +0200 |
User-agent: |
Sup/git |
Excerpts from Elangovan's message of Tue Jun 22 23:15:31 +0200 2010:
>
> Hi,
> I am trying to run octave from PHP. I had the
> "octave myfile.m" in a shell script and i gave shell_exec('sh
> shellscript.sh'). This did not call the octave.
> Then i tried shell_exec('octave myfile'). This did not work either.
There is also system. Maybe that has the advantage that stdout is echoed
directly. Eg try
system('/bin/sh shellscript.sh 2>&1'); // the 2>&1 ensures that you get error
lines as well
If this doesn't work try the most simple command:
system('echo HELLO WORLD'); // ensure that system can be used at all
Report what you've seen
In any case you want to try adding 2>&1 to your shell_exec call.
Also add 2>&1. Try your shell_exec again then.
Marc Weber
- PHP help, Elangovan, 2010/06/22
- Re: PHP help,
Marc Weber <=