I'm currently running a python script in my command line that uses blender:

blender -b -P script.py -- argument1

This works fine in my terminal however it returns no output in PHP when used

exec("blender -b -P script.py -- argument1", $test); echo implode($test);

Commands such as "ls" work fine. It's only blender that doesn't want to run.

I saw another question that is pretty much the exact same problem I'm facing. It has not been answered yet.

  • $\begingroup$ Have your checked if any errors are displayed? stackoverflow.com/questions/17914402/… $\endgroup$ – Robert Gützkow Aug 28 '19 at 8:47
  • $\begingroup$ After trying that I'm getting a lot of errors. They go along the lines of "No protocol specified xcb_connection_has_error() returned true" $\endgroup$ – Steven Newhouse Aug 28 '19 at 9:35
  • $\begingroup$ That's strange because when trying the command in the command line (same directory) it works fine. $\endgroup$ – Steven Newhouse Aug 28 '19 at 9:37
  • $\begingroup$ Are you running the PHP command locally or on remote server? $\endgroup$ – Robert Gützkow Aug 28 '19 at 9:40
  • $\begingroup$ Locally. My site is also stored locally with xampp. $\endgroup$ – Steven Newhouse Aug 28 '19 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.