(Doing this on OSX, apologize if off-topic)
When I run the line of code
shell_exec("/usr/local/bin/gnuplot gnuplot_script7");
inside a php script, a file named gnuplot_output7.png is generated, as expected. But when I run the similar line of code
shell_exec("gnuplot gnuplot_script7");
no image is generated! This despite that if I type
gnuplot gnuplot_script7
on the OSX command line, the image is successfully generated.
I typed - echo $PATH on the command line and got back
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/PostgreSQL/8.4/bin/:/usr/local/git/bin:/usr/X11/bin
and when I typed
which gnuplot
on the command line I got back
/usr/local/bin/gnuplot