I use php (7.3.7) to run an octave script on a web server (iis on windows 10).
In particular the octave script solves a set of differential equations and produces a text file.
The php script is the following:
<?php
system('cd C:\inetpub\wwwroot\BRwebapp\ && "C:\Octave\Octave-5.1.0.0\octave.vbs" --no-gui --persist compart.m');
?>
Strangely enough, the command:
C:\inetpub\wwwroot\BRwebapp\ && "C:\Octave\Octave-5.1.0.0\octave.vbs" --no-gui --persist compart.m
runs fine when executed on cmd and produces the desired output (.txt file).
The php script, however, hangs. The browser (I have tried both Chrome and Firefox) is just loading with no results (not displaying any errors in the console). I have also used exec() instead on system(), with no results. I have verified that php works (by using <?php phpinfo(); ?>
).
Any ideas? Thanks a lot!
UPDATE I have finally solved this issue by following the instructions presented here by Marle1: Foo.cmd won't output lines in process (on website)