> -----Original Message----- > From: gretl-users-bounces(a)lists.wfu.edu [mailto:gretl-users- > bounces(a)lists.wfu.edu] On Behalf Of Hélio Guilherme > Sent: Wednesday, January 30, 2013 5:26 PM > To: Gretl list > Subject: Re: [Gretl-users] gretlcli & PHP > > I think that we are going for a most complicated solution. > > I my scripting I usually create a shell script that calls my commands after > doing > some setups. (I have not done experimentation with gretlcli, but in general) > > In your case, I would create a shell script, say gretl_caller.sh, containing: > # Setup required environment vars > HOME=/tmp > export HOME > # Call gretlcli with eventual arguments (assuming path for gretlcli) > /usr/local/bin/gretlcli $* > > So instead Apache call gretlcli, it would call gretl_caller.sh. > > What you think about this solution? > > Hélio > >
[>] Thanks for the reply Helio. We do use scripts to access some command line programs for various reasons (mainly memory), but it would not help in this case (I did try). The problem is that the script would still be executed as the apache user, and that is the cause of the problem. So even by wrapping the call to gretlcli in a shell script, that shell script starts out under apache, so the resulting call to gretlcli is under apache, yielding the same net result. Have you been successful in getting gretl to work in this fashion using a PHP exec call to the wrapper script? -- Ryan
