Hello:
We had a version of gretl running in our PHP application but it stopped working after a fresh install (and an upgrade most likely). We’ve worked out some issues with the command reference and can get everything to work using gretlcli from a shell, but the same commands run from within PHP fail. We cannot figure out what the error is. In the PHP output, all we see is this:
gretl is process 10625, '/usr/bin/gretlcli'
gretldir is maybe '/usr/share/gretl/'?
There should be a results file created per the code, which works when running in the shell. However when running from PHP, the results file is never created. I believe there is some problem with the environment. We had to setup a HOME environment variable for the apache user because we kept getting permission denied errors from gretl trying to access “/root/.gretl” and “/root/gretl”.
I have not been able to find any good examples on this should work, nor why it’s not working now when the prior version worked successfully. I’ve tried creating an environment variable for gretldir, thinking that might be the problem from the error log, but it does not help. We have no idea what gretl is looking for in terms of the environment that is present from a shell but not the apache user, which is obviously limited.
Any thoughts on getting gretlcli working from within PHP?
--
Ryan Dagey