Unable to run matlab script from php

I can happily trigger Matlab script from command line using exec() command but when it comes to doing this via PHP I dont get any success.
exec("\'C:\Program Files\MATLAB\R2019a\bin\matlab.exe\' -nosplash -nodesktop -r \'run('G:\MATLAB_Scripts\sample.m')\" 2>&1");
I have checked php.in file where disable_function =____
I'm lost for what to do now, Google hasnt given me much help apart from unresolved posts to various forums.
Thanks in advance!

1 Comment

Sounds like a PHP problem more than a matlab problem, so you'd be better off asking on a PHP forum.
However, note that the matlab license typically does not allow you to run scripts on a web server, so even if you find a solution you may not be allowed to use it.

Sign in to comment.

Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Products

Release

R2019a

Tags

Commented:

on 21 May 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!