Yes I mean to run it from php and probably there is no display environment variable set , so cld u plz elaborate your answer a little bit more
I have asked the same thing in apache mailing list and they told to run matlab in headless mode , and I tried running it but cld get the results , so cld u plz tell how to do it