Errors when trying to launch MATLAB through PHP
Ältere Kommentare anzeigen
What's being attempted: PHP, running under IIS, is calling an executable that runs a MATLAB program
Where it's breaking: In the executable (written in C++), the engOpen(NULL) command is not launching the MATLAB engine successfully
Confusion: When logging in as a normal user and manually running the executable, the MATLAB engine launches fine and the program runs successfully. However, when IIS tries to run it the executable fails halfway through, at the point where engOpen is called.
Relevant Code:
#include "engine.h"
Engine *ep = NULL;
if (!(ep = engOpen(NULL))) {
log_out << "Error opening engine." << endl;
log_out.close();
exit(-1);
}
Any help would be appreciated. We're currently unsure if the program is a MATLAB issue or a PHP/IIS issue, and could really use some pointers in the right direction.
3 Kommentare
Kaustubha Govind
am 16 Sep. 2011
On Windows, engOpen creates a COM channel to MATLAB. Perhaps MATLAB is not registered as a COM server? Try executing "matlab /regserver" on your server to see if engOpen is then successful.
Walter Roberson
am 16 Sep. 2011
You might need to run the "matlab /regserver" as administrator.
Brian Carty
am 19 Sep. 2011
Antworten (0)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!