php and povray

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

I'm trying to cause povray to render an image dynamically with php.
I've tried  system() and get the same result.

$cmd = "/usr/local/bin/povray +Itest.pov -d +W800 +H600 +Q9 +A0.3 +FN
$str = exec($cmd);    // Segmentation fault (core dumped)

header("Content-Type: image/png");
$im = imagecreatefrompng("test.png");

Does anyone know why this won't work?

If I run the povray command on the command line it works fine. I see
some status output on the screen as it renders. Could that be the

I also tried passthru($cmd), but couldn't get that to work. The error
message was something like "the image cannot be displayed because it
contains errors".


Site Timeline