Desperate: php exec - works in one case, but not other



I am trying to use the php exec function to execute 2 programs, so i
call the exec command twice. I am working on linux. It seems to work
for one executable (which runs fast), but not the other (which is a
slow standalone matlab application), if the php is run via a webpage.
The page hangs for abour 10 seconds and then is done loading...if the
longer program executed, it should take much longer.

The details:
-everything is chmodded to 777
-everything works if i try to run command line (i.e php -f page.php)
-the $output value of the exec function returns an array. if i try to
print it to the screen it just displays "array"
-i have tried exec, system, passthru; same problem
-if i redirect stderr and stdout to a file, the file always comes up
empty
-i am not in safe mode
-set_time_limit is set to 1000000

Any suggestions?

Also, I have been very unsucessful in trying to use passthru to dump
the contents of the output to my webpage, in order to debug. If i run
the php via command line, the executable returns feedback to the prompt
- it wouold be great to see that for the webpage version...

.



Relevant Pages

  • Re: IIS 6.0 on Windows Server 2003
    ... If PHP insists on using CMD.EXE to execute the shellcommand on the ... server, then no, you have no choice -- you must give read permissions to the ... this would be a security vulnerability caused by PHP. ...
    (microsoft.public.inetserver.misc)
  • Re: IIS 6.0 on Windows Server 2003
    ... >If PHP insists on using CMD.EXE to execute the shell ... command on the ... caused by PHP. ... >since IIS directly executes the web page, ...
    (microsoft.public.inetserver.misc)
  • Re: cron jobs in PHP admin to run a PHP file
    ... "command" in cron jobs I don't know what it is looking for? ... All I want to do is run the php script. ... have permission to execute it. ...
    (comp.lang.php)
  • Cant exec() a program that uses mem alloc?
    ... compiled the program and in a command prompt it works like a charm - in my ... case it reads the contents of a text file and copies that to the clipboard. ... I then try using a php script to execute that file using shell_exec, ...
    (php.general)
  • Re: cron jobs in PHP admin to run a PHP file
    ... "command" in cron jobs I don't know what it is looking for? ... All I want to do is run the php script. ... you have to have permission to execute it. ... That's what cron jobs are - command line jobs, ...
    (comp.lang.php)